/* ============================================================================
   BH Digital — הטוקנים נגזרים מ-design.md. אם משהו כאן סותר אותו,
   design.md מנצח. אימות: npm run check:palette
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: oklch(0.185 0.012 62);
  --surface: oklch(0.245 0.014 62);
  --line: oklch(0.335 0.014 62);
  --ink: oklch(0.955 0.008 78);
  --muted: oklch(0.725 0.014 72);
  --accent: oklch(0.78 0.145 68);
  --wa: oklch(0.78 0.17 152);

  --step: clamp(1.25rem, 4vw, 3rem);
  --gap: clamp(3.5rem, 9vw, 7rem);
  --radius: 1.25rem;
  --btn-radius: 0.5rem;

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --bar: calc(62px + env(safe-area-inset-bottom, 0px));
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--muted);
  font-family: 'IBM Plex Sans Hebrew', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  padding-bottom: var(--bar);
}

@media (width >= 768px) {
  body {
    padding-bottom: 0;
  }
}

h1,
h2,
h3 {
  font-family: Karantina, system-ui, sans-serif;
  font-weight: 700;
  color: var(--ink);
  line-height: 0.94;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

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

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

.wrap {
  width: 100%;
  max-width: 78rem;
  margin-inline: auto;
  padding-inline: var(--step);
}

.narrow {
  max-width: 46rem;
}

/* ==== טיפוגרפיה ==== */
.display {
  font-size: clamp(3.2rem, 12vw, 8rem);
}
.h2 {
  font-size: clamp(2.4rem, 7vw, 4.8rem);
}
.h3 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
}

.eyebrow {
  display: inline-block;
  font-family: Cousine, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
}

.lede {
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  max-width: 40ch;
}

/* ==== כפתורים ==== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.5rem;
  padding-inline: 1.75rem;
  border-radius: var(--btn-radius);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color 220ms var(--ease),
    color 220ms var(--ease),
    transform 120ms var(--ease);
}
.btn:active {
  transform: scale(0.98);
}
.btn--wa {
  background: var(--accent);
  color: var(--bg);
}
.btn--wa:hover {
  background: color-mix(in oklch, var(--accent) 88%, white);
}
.btn--ghost {
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover {
  background: var(--surface);
}

.btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ==== ראש ==== */
.top {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 5;
  padding-block: var(--step);
}
.lock {
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  font-size: 1.4rem;
  color: var(--ink);
  direction: ltr;
  text-decoration: none;
  /* קרנטינה נמוכה מאוד, והקישור יצא 23px. מטרת מגע מינימלית 44. */
  min-height: 44px;
  min-width: 44px;
  padding-inline-end: 0.5rem;
}
.lock svg {
  width: 1.02em;
  height: 1.02em;
  flex: none;
  position: relative;
  top: 0.015em;
  color: var(--accent);
}
.lock b {
  font-family: Karantina, system-ui, sans-serif;
  font-weight: 700;
  line-height: 0.78;
}

/* ==========================================================================
   סקשן גלילה — הגובה הוא מרחק הגלילה, והבמה נדבקת בתוכו.
   ========================================================================== */
[data-scrub] {
  position: relative;
  height: calc(var(--scrub-vh, 2.2) * 100svh);
}

.scrub-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.scrub-media {
  position: absolute;
  inset: 0;
  background: var(--bg);
}
.scrub-media img,
.scrub-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* הסטיל נשאר גלוי עד שהווידאו צייר פריים אמיתי. בלי זה iOS מציג שחור. */
.scrub-media video {
  opacity: 0;
  transition: opacity 420ms var(--ease);
}
.scrub-media.is-painted video {
  opacity: 1;
}
.scrub-media.is-painted img {
  opacity: 0;
  transition: opacity 420ms var(--ease);
}

/* הצעיף. הטקסט לבן, ולכן מכהים — ובכיוון הנכון ל-RTL בדסקטופ. */
.scrub-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--bg) 94%, transparent) 0%,
    color-mix(in srgb, var(--bg) 86%, transparent) 42%,
    color-mix(in srgb, var(--bg) 58%, transparent) 74%,
    color-mix(in srgb, var(--bg) 34%, transparent) 100%
  );
}
@media (width >= 768px) {
  .scrub-veil {
    background: linear-gradient(
      to left,
      color-mix(in srgb, var(--bg) 93%, transparent) 0%,
      color-mix(in srgb, var(--bg) 84%, transparent) 46%,
      color-mix(in srgb, var(--bg) 52%, transparent) 74%,
      color-mix(in srgb, var(--bg) 26%, transparent) 100%
    );
  }
}

.scrub-copy {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* ==== הירו ==== */
.hero-meta {
  margin-top: 2.25rem;
  font-family: Cousine, monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ==== סקשנים רגילים ==== */
.band {
  padding-block: var(--gap);
}
.band--surface {
  background: var(--surface);
}

.band__head {
  max-width: 34ch;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.band__head p {
  margin-top: 1.25rem;
}

/* ==== דמואים ==== */
.demos {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
}
@media (width >= 860px) {
  .demos {
    grid-template-columns: 1fr 1fr;
  }
}

.demo {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
/* "המנורה" — נפילת אור ענבר אחת, לא ממורכזת, מאחורי צילום הדמו.
   זו הסיבה שהאתר כהה: הדמואים בהירים, וכאן הם נקראים כמסכים דולקים. */
.demo::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    58% 42% at 74% 6%,
    color-mix(in oklch, var(--accent) 13%, transparent) 0%,
    transparent 68%
  );
}
.demo > * {
  position: relative;
}

.demo__shot {
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 390 / 620;
}
.demo__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.demo__name {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
}
.demo__go {
  margin-top: auto;
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
}

/* ==== רשימת מה נכנס ==== */
.feats {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (width >= 700px) {
  .feats {
    grid-template-columns: 1fr 1fr;
  }
}
@media (width >= 1080px) {
  .feats {
    grid-template-columns: repeat(3, 1fr);
  }
}
.feat {
  background: var(--bg);
  padding: clamp(1.5rem, 3vw, 2rem);
}
.feat__n {
  font-family: Cousine, monospace;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.feat h3 {
  font-size: 1.5rem;
  margin: 0.75rem 0 0.6rem;
}

/* ==== שלבים על הווידאו ==== */
.steps {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
  max-width: 34rem;
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  opacity: 0.34;
  transition:
    opacity 420ms var(--ease),
    transform 420ms var(--ease);
  transform: translateY(4px);
}
.step.is-on {
  opacity: 1;
  transform: none;
}
.step__n {
  font-family: Cousine, monospace;
  font-size: 0.8125rem;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  flex: none;
}
.step.is-on .step__n {
  border-color: var(--accent);
}
.step h3 {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

/* ==== הצעת שלושת הראשונים ==== */
.offer {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 3rem);
  background: var(--surface);
}
.price {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-block: 1.75rem;
}
.price__now {
  font-family: Karantina, system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 5rem);
  line-height: 0.9;
  color: var(--accent);
}
.price__was {
  font-family: Cousine, monospace;
  font-size: 1.0625rem;
  text-decoration: line-through;
  color: var(--muted);
}
.fineprint {
  border-top: 1px solid var(--line);
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  font-size: 0.9375rem;
}

.own {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border-inline-start: 2px solid var(--accent);
  padding-inline-start: 1.5rem;
}
.own p {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  color: var(--ink);
  line-height: 1.4;
  max-width: 30ch;
}

/* ==== טופס ==== */
.form {
  display: grid;
  gap: 1.25rem;
  max-width: 34rem;
}
.field label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.field input,
.field textarea {
  width: 100%;
  min-height: 3.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--btn-radius);
  color: var(--ink);
  font: inherit;
  padding: 0.85rem 1rem;
}
.field textarea {
  min-height: 6rem;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: color-mix(in oklch, var(--muted) 70%, transparent);
}

/* ==== פוטר ==== */
.foot {
  border-top: 1px solid var(--line);
  padding-block: var(--gap) calc(var(--gap) / 2);
  font-family: Cousine, monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
}
.foot__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
}

/* ==== סרגל דביק בנייד ==== */
.bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bar a {
  min-height: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
.bar a + a {
  border-inline-start: 1px solid var(--line);
  color: var(--bg);
  background: var(--accent);
}
@media (width >= 768px) {
  .bar {
    display: none;
  }
}

/* ==========================================================================
   תנועה — כניסה בגלילה. אין GSAP: opacity ו-transform בלבד, ולכן
   CSS מספיק. 70KB של ספרייה בשביל דהייה זו עלות בלי תמורה.
   ========================================================================== */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity 480ms var(--ease),
    transform 480ms var(--ease);
  transition-delay: var(--d, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .step {
    opacity: 1;
    transform: none;
  }
  /* הגלילה כבר לא מניעה זמן — הסקשן מתקצר לגובה מסך אחד */
  [data-scrub] {
    height: auto;
  }
  .scrub-stage {
    position: static;
    height: auto;
    min-height: 100svh;
    padding-block: var(--gap);
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
