/* ============================================================
   מתן איבגי · בניית אתרים — דף נחיתה
   עיצוב: אספרסו-חם + חמרה (terracotta)
   ============================================================ */

:root {
  /* רקעים — 4 מדרגות, כולן חמות */
  --bg-0: #0F0E0C;
  --bg-1: #16130F;
  --bg-2: #1D1915;
  --bg-3: #262119;

  /* קווים */
  --line: #2C261E;
  --line-strong: #3D352A;

  /* טקסט */
  --text: #F2EDE4;
  --text-muted: #A8A199;
  --text-faint: #6E675E;

  /* הדגשה */
  --accent: #E8875F;
  --accent-strong: #C96A45;
  --accent-ink: #14100D;
  --accent-glow: rgba(232, 135, 95, 0.10);

  /* צבעי פרויקט — הילות התיק */
  --p-oz: #7C8A4E;
  --p-rav: #2E4A6B;
  --p-halichot: #3FA795;
  --p-madrich: #B99A4F;

  /* טיפוגרפיה */
  --font-display: 'Frank Ruhl Libre', 'Times New Roman', serif;
  --font-body: 'Assistant', 'Segoe UI', sans-serif;

  --fs-hero:  clamp(2.75rem, 7vw, 5rem);
  --fs-h2:    clamp(1.9rem, 4vw, 3rem);
  --fs-h3:    clamp(1.3rem, 2.2vw, 1.65rem);
  --fs-lead:  clamp(1.125rem, 1.6vw, 1.3rem);
  --fs-body:  1.0625rem;
  --fs-label: 0.8125rem;

  --container: 1160px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- בסיס ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

a { color: var(--accent); text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* skip link */
.skip-link {
  position: absolute;
  inset-inline-start: 0; top: 0;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
}
.skip-link:focus {
  width: auto; height: auto;
  clip-path: none; opacity: 1;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.75rem 1.5rem;
  font-weight: 700;
}

/* ---------- גריין ---------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ---------- כפתורים ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  padding: 1rem 1.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease-out);
  min-height: 44px;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-solid:hover { background: var(--accent-strong); }
.btn-outline {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover { border-color: var(--accent); }
.btn-sm { padding: 0.6rem 1.25rem; font-size: 0.95rem; }

.btn .wa-ic { width: 1.15em; height: 1.15em; flex: 0 0 auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 14, 12, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  margin-inline-end: auto;
}
.monogram {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--accent);
  padding-bottom: 2px;
}

.site-nav { display: flex; gap: 1.75rem; }
.site-nav a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.98rem;
  transition: color 0.2s ease;
}
.site-nav a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: clamp(560px, 92vh, 880px);
  display: flex;
  align-items: center;
  padding-block: 6rem 4rem;
}
.hero-glow {
  position: absolute;
  inset: 0;
  z-index: 1; /* מעל שכבת ההכהיה ::after, מתחת ל-container */
  pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 70%) var(--my, 35%), var(--accent-glow), transparent 70%);
}
/* רקע מצולם — הילה חמה משמאל, הצד הימני נשאר כהה לטקסט */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/hero-bg.webp") left center / cover no-repeat;
  opacity: 0.9;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to left, rgba(15, 14, 12, 0.92) 0%, rgba(15, 14, 12, 0.82) 40%, rgba(15, 14, 12, 0.45) 72%, rgba(15, 14, 12, 0.12) 100%),
    linear-gradient(to top, var(--bg-0) 2%, transparent 32%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: var(--fs-label);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 900;
  line-height: 1.12;
  max-width: 24ch;
}

.underline-word {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.underline-word .brush {
  position: absolute;
  inset-inline: -2%;
  bottom: -0.18em;
  width: 104%;
  height: 0.22em;
  overflow: visible;
}
.underline-word .brush path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
}
.brush-in .brush path {
  animation: brushDraw 0.8s var(--ease-out) 0.35s forwards;
}
@keyframes brushDraw { to { stroke-dashoffset: 0; } }

.hero .lead {
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 54ch;
  margin-block: 1.75rem 2.5rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.trust {
  margin-top: 1.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.trust::before {
  content: "";
  display: inline-block;
  width: 26px; height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-inline-end: 0.7rem;
}

/* ---------- סקשנים כללי ---------- */
section { position: relative; }

.section-head { margin-bottom: 3.5rem; }

.label {
  color: var(--accent);
  font-weight: 600;
  font-size: var(--fs-label);
  margin-bottom: 1rem;
}
.label .num {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  margin-inline-end: 0.35rem;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.15;
}

.sub {
  color: var(--text-muted);
  font-size: var(--fs-lead);
  margin-top: 1rem;
  max-width: 60ch;
}

/* ---------- תיק עבודות ---------- */
.works { padding-block: 8rem 6rem; }

.case-list {
  display: flex;
  flex-direction: column;
  gap: 7rem;
}

.case {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 4rem;
  align-items: center;
}
/* אי-זוגי: טקסט מימין (עמודה ראשונה ב-RTL), מסגרת משמאל */
.case:nth-child(even) .case-info { order: 2; }
.case:nth-child(even) .case-media { order: 1; }

.case-media { position: relative; }

.frame-link {
  display: block;
  border-radius: 12px;
}

.frame {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
  transform: rotate(var(--tilt, -1.25deg));
  transition: transform 0.5s var(--ease-out);
}
.case:nth-child(even) .frame { --tilt: 1.25deg; }
.frame-link:hover .frame,
.frame-link:focus-visible .frame {
  transform: rotate(0deg) translateY(-6px);
}

/* הילה צבעונית מאחורי המסגרת */
.case-media::before {
  content: "";
  position: absolute;
  inset: -8%;
  background: radial-gradient(ellipse at center, var(--p, var(--accent)) 0%, transparent 65%);
  opacity: 0.13;
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
}

.frame-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 36px;
  padding-inline: 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  direction: ltr;
}
.dots { display: inline-flex; gap: 6px; }
.dots i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}
.frame-url {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-3);
  border-radius: 999px;
  padding: 2px 14px;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}

.frame-viewport {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-3);
}
.frame-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% var(--crop, 0%);
  transition: object-position 6s ease-in-out;
}
.frame-link:hover .frame-viewport img,
.frame-link:focus-visible .frame-viewport img {
  object-position: 50% 100%;
}

.case-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  margin-bottom: 1rem;
}

.case-info h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.case-type {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.15rem 0.8rem;
  white-space: nowrap;
}

.case-info > p {
  color: var(--text-muted);
  margin-block: 1rem 1.5rem;
  max-width: 44ch;
}

.chips { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.chips i {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--c);
  border: 1px solid rgba(242, 237, 228, 0.18);
}
.chips i.chip-dark {
  background:
    radial-gradient(circle at 32% 30%, rgba(242, 237, 228, 0.32) 0%, rgba(242, 237, 228, 0) 46%),
    var(--c);
  border-color: rgba(242, 237, 228, 0.35);
}

.case-link {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.case-link .arr {
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
}
.case-link:hover .arr { transform: translateX(-4px); }

/* ---------- תהליך ---------- */
.process {
  padding-block: 7rem;
  background: var(--bg-1);
}

.steps { margin-top: 3rem; }

.step {
  display: grid;
  grid-template-columns: 120px 1fr 2fr;
  gap: 2rem;
  padding-block: 2.25rem;
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }

.step-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 1.1;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.step h3 {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
}
.step p { color: var(--text-muted); max-width: 58ch; }

/* ---------- למה איתי ---------- */
.why { padding-block: 7rem; }

.why-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4.5rem;
  align-items: start;
}

.why-statement h2 { max-width: 15ch; }
.why-statement p {
  color: var(--text-muted);
  font-size: var(--fs-lead);
  line-height: 1.65;
  margin-top: 1.5rem;
  max-width: 48ch;
}

.why-points { display: flex; flex-direction: column; gap: 1.9rem; margin-top: 0.5rem; align-self: center; }
.why-point { position: relative; padding-inline-start: 2rem; }
.why-point::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.72em;
  width: 1.1rem;
  height: 2px;
  background: var(--accent);
}
.why-point strong { color: var(--text); }
.why-point p { color: var(--text-muted); display: inline; }

.why-photo {
  margin: 2.75rem 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
}
.why-photo img { display: block; width: 100%; height: auto; }

/* ---------- CTA סופי ---------- */
.cta-final {
  position: relative;
  padding-block: 9rem;
  background: var(--bg-1);
  text-align: center;
  overflow: hidden;
}
.cta-mono {
  position: absolute;
  inset-inline-start: 50%;
  top: 50%;
  transform: translate(50%, -50%);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: min(40vw, 34rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px #4A4033;
  opacity: 0.8;
  pointer-events: none;
  user-select: none;
}
.cta-final .container { position: relative; z-index: 1; }
.cta-final h2 { max-width: 18ch; margin-inline: auto; }
.cta-final .sub { margin-inline: auto; }
.cta-final .hero-ctas { justify-content: center; margin-top: 2.5rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.footer-inner a { color: var(--text-muted); transition: color 0.2s ease; }
.footer-inner a:hover { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; }

/* ---------- פס וואטסאפ נייד ---------- */
.waba {
  display: none;
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 60;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(15, 14, 12, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.4s var(--ease-out);
}
.waba.show { transform: translateY(0); }
.waba .btn { width: 100%; }

/* ---------- Reveal ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease-out);
  transition-delay: var(--rd, 0ms);
}
html.js [data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- מובייל ---------- */
@media (max-width: 900px) {
  /* במסכים צרים רואים בעיקר את הצד הבהיר של תמונת ה-hero — הכהיה אחידה מאחורי הטקסט */
  .hero::after {
    background:
      linear-gradient(to bottom, rgba(15, 14, 12, 0.35) 0%, rgba(15, 14, 12, 0.82) 20%, rgba(15, 14, 12, 0.82) 100%),
      linear-gradient(to top, var(--bg-0) 2%, transparent 32%);
  }

  .case {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .case:nth-child(even) .case-info { order: 2; }
  .case:nth-child(even) .case-media { order: 1; }
  .case-media { order: 1; }
  .case-info { order: 2; }
  .why-grid { grid-template-columns: 1fr; gap: 3rem; }
  .step { grid-template-columns: 64px 1fr; }
  .step p { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .hero { min-height: auto; padding-block: 4.5rem 4rem; }
  .hero h1 br { display: none; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
  .hero-glow { display: none; }

  .site-nav { display: none; }
  .header-cta { display: inline-flex; }

  .works { padding-block: 4.5rem; }
  .process, .why { padding-block: 4.5rem; }
  .cta-final { padding-block: 5.5rem; }
  .case-list { gap: 4.5rem; }

  .frame { transform: rotate(0) !important; }

  .waba { display: block; }
  .site-footer { padding-bottom: 6.5rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .frame, .frame-viewport img, .btn, .case-link .arr { transition: none !important; }
  .frame { transform: none !important; }
  .frame-link:hover .frame-viewport img { object-position: 50% var(--crop, 0%); }
  .brush-in .brush path { animation: none; stroke-dashoffset: 0; }
  .hero-glow { display: none; }
  [data-reveal] {
    transform: none;
    transition: opacity 0.4s ease;
  }
}
