/* ==========================================================================
   site.css · לידאס מערכות לבתי ספר
   קונספט (נעול): כיוון B. חפיסה מאווררת בהירו, רצועת "נשמע מוכר?", חפיסה דביקה של
   מסכים אמיתיים בפרק 2 (position: sticky, גלילה נטיבית, בלי נעילה), צעדים, טופס.
   קודם סטטי: הכל גלוי בלי JS. שני שערים:
     html.js   (boot.js בראש העמוד) · אנימציות פתיחה חד-פעמיות ב-CSS שתמיד נגמרות גלויות
     html.anim (app.js אחרי init תקין) · מצבי "לפני" של חשיפות בגלילה, עם watchdog
   תנועה: transform ו-opacity בלבד. reduced-motion: שום שער לא נוסף.
   ========================================================================== */

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--hdr-h) + 12px);
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-body) / 1.6 var(--f-b);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:where(h1, h2, h3, p, ol, ul, figure) { margin: 0; }
:where(ol, ul) { padding: 0; list-style: none; }
:where(a) { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
:where(img, svg) { display: block; max-width: 100%; }
:where(button, input, select) { font: inherit; color: inherit; }

/* Horizontal guard on main, never on html/body: overflow on body propagates to the viewport, and inside
   an iframe on iOS (the artifact viewer) that is a known source of a stuck or momentum-less page scroll.
   clip is not a scroll container, so position: sticky inside still works. */
main { overflow-x: hidden; }
@supports (overflow: clip) { main { overflow-x: clip; } }
.wrap { width: var(--wrap); margin-inline: auto; }
.ico { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico--wa { stroke: none; }

:focus-visible { outline: 3px solid var(--coral-ink); outline-offset: 3px; border-radius: 8px; }
.day :focus-visible { outline-color: var(--orange); }

.skip {
  position: fixed; inset-block-start: 10px; inset-inline-start: 10px; z-index: var(--z-skip);
  padding: 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* Hebrew eyebrow: body font, tight tracking (Latin-only faces never carry Hebrew) */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font: 700 1rem / 1.3 var(--f-b); letter-spacing: 0.02em;
  color: var(--coral-ink);
}
.eyebrow::before { content: ""; flex: none; width: 34px; height: 2px; background: currentColor; border-radius: 2px; }
.h2 {
  font: 600 var(--fs-h2) / 1.06 var(--f-d);
  letter-spacing: -0.01em;
  margin-top: 14px;
  max-width: 18ch;
  text-wrap: balance;
}
.lead { color: var(--ink-soft); font-size: var(--fs-lead); margin-top: 14px; max-width: 40ch; }

/* words in a clip (hero H1, deck titles): the inner span rises */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-block: 0.06em 0.18em; margin-block: -0.06em -0.18em; }
.wi { display: inline-block; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --bg: transparent; --fg: var(--ink); --bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px;
  border-radius: var(--r-btn); border: 2px solid var(--bd);
  background: var(--bg); color: var(--fg);
  font: 700 1.05rem / 1.2 var(--f-b); text-align: center;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s, border-color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn--primary { --bg: var(--orange); --fg: var(--ink); box-shadow: var(--sh-btn); }
.btn--primary:hover, .btn--primary:focus-visible { --bg: var(--orange-hi); box-shadow: 0 14px 32px rgba(249, 167, 77, 0.55); }
.btn--ghost { --bg: #fff; --bd: rgba(0, 21, 47, 0.18); }
.btn--ghost:hover, .btn--ghost:focus-visible { --bd: var(--ink); }
.btn--ghost .ico { width: 1.05em; height: 1.05em; }
.btn--wa { --bg: var(--wa); --fg: var(--wa-ink); width: 100%; margin-top: 12px; }
.btn--wa .ico { width: 1.4em; height: 1.4em; }
.btn--wa:hover, .btn--wa:focus-visible { --bg: #3ee07a; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.7; cursor: progress; }

/* ---------------------------------------------------------------- header (thin, sticky) */
.hdr {
  position: sticky; inset-block-start: 0; z-index: var(--z-hdr);
  height: var(--hdr-h);
  background: var(--paper);
  transition: box-shadow 0.3s;
}
.hdr.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(0, 21, 47, 0.06); }
.hdr__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hdr__logo { display: block; padding-block: 9px; }
.hdr__logo img { width: auto; height: 27px; }
.hdr__nav { display: flex; align-items: center; gap: 30px; font-weight: 600; font-size: 0.98rem; }
.hdr__nav a { padding-block: 10px; position: relative; }
.hdr__nav a::after {
  content: ""; position: absolute; inset-inline: 0; inset-block-end: 4px; height: 2px;
  background: var(--coral); transform: scaleX(0); transform-origin: right; transition: transform 0.35s var(--ease);
}
.hdr__nav a:hover::after, .hdr__nav a:focus-visible::after { transform: scaleX(1); }
.hdr__nav a:last-child { padding: 9px 18px; border: 1.5px solid rgba(0, 21, 47, 0.2); border-radius: 999px; }
.hdr__nav a:last-child::after { display: none; }
.hdr__nav a:last-child:hover { border-color: var(--ink); }
@media (max-width: 1023px) { .hdr__nav { display: none; } }
@media (max-width: 767px) { .hdr__logo { padding-block: 11px; } .hdr__logo img { height: 23px; } }

/* ---------------------------------------------------------------- 1 · hero */
.hero { position: relative; overflow: hidden; overflow: clip; text-align: center; padding-top: clamp(28px, 4.6vw, 64px); }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 18px 7px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1);
  font-weight: 700; font-size: 0.95rem; color: var(--ink);
  margin-bottom: 22px;
}
.hero__eyebrow img { width: 22px; height: auto; flex: none; }
.hero__h1 { font: 600 var(--fs-h1) / 1.04 var(--f-d); letter-spacing: -0.015em; text-wrap: balance; }
.hero__l1, .hero__l2 { display: block; }
.hero__l2 { color: var(--coral-ink); }
.hero__line { color: var(--ink-soft); font-size: var(--fs-lead); line-height: 1.55; max-width: 50ch; margin: 20px auto 30px; text-wrap: pretty; }
.hero__ctas { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* the fan: 5 real screens. --p (0..1) = how far the hero has scrolled away (app.js) */
.fan {
  --cw: min(62%, 820px);
  position: relative;
  height: clamp(300px, 39vw, 590px);
  margin-top: clamp(44px, 6vw, 76px);
  transform: translateY(calc(var(--p, 0) * -56px));
}
.fan__card {
  --x: 0%; --y: 0%; --r: 0deg; --s: 1;
  position: absolute; top: 0; left: 50%;
  width: var(--cw); margin-left: calc(var(--cw) / -2);
  border-radius: 18px; overflow: hidden; background: #fff;
  box-shadow: var(--sh-2);
  transform-origin: 50% 100%;
  transform:
    translate(calc(var(--x) * (1 + var(--p, 0) * 0.22)), calc(var(--y) - var(--p, 0) * 3%))
    rotate(calc(var(--r) * (1 + var(--p, 0) * 0.35)))
    scale(var(--s));
}
.fan__card .shot { width: 100%; height: auto; }
.fan__card--1 { --x: 62%; --y: 14%; --r: 7deg; --s: 0.82; z-index: 1; }
.fan__card--2 { --x: 32%; --y: 6%; --r: 3.5deg; --s: 0.9; z-index: 2; }
.fan__card--3 { z-index: 5; }
.fan__card--4 { --x: -32%; --y: 6%; --r: -3.5deg; --s: 0.9; z-index: 2; }
.fan__card--5 { --x: -62%; --y: 14%; --r: -7deg; --s: 0.82; z-index: 1; }
.fan__card--1 .shot, .fan__card--5 .shot { opacity: 0.92; }

@media (max-width: 1023px) {
  .fan { --cw: min(72%, 640px); height: auto; padding-bottom: 8%; }
  .fan__card--3 { position: relative; left: auto; margin: 0 auto; }
  .fan__card--1, .fan__card--5 { display: none; }
  .fan__card--2 { --x: 20%; --y: 7%; --r: 4deg; --s: 0.88; }
  .fan__card--4 { --x: -20%; --y: 7%; --r: -4deg; --s: 0.88; }
}
@media (max-width: 767px) {
  .hero { padding-top: 26px; }
  .hero__eyebrow { font-size: 0.85rem; padding: 6px 13px; margin-bottom: 16px; }
  .hero__line { margin: 14px auto 24px; font-size: 1.06rem; }
  .hero__ctas { flex-direction: column; align-items: stretch; gap: 10px; }
  .btn { min-height: 50px; font-size: 1rem; padding: 0 20px; }
  .fan { --cw: 86%; margin-top: 34px; padding-bottom: 12%; transform: translateY(calc(var(--p, 0) * -28px)); }
  .fan__card { border-radius: 12px; }
  .fan__card--2 { --x: 16%; --y: 8%; }
  .fan__card--4 { --x: -16%; --y: 8%; }
}

/* intro (html.js, CSS only, always ends visible): the words rise, the rest follows, the fan opens */
@media (prefers-reduced-motion: no-preference) {
  html.js .hero__h1 .wi { animation: lsWordUp 0.95s var(--ease) backwards; }
  html.js .hero__h1 .wi--2 { animation-delay: 0.06s; }
  html.js .hero__h1 .wi--3 { animation-delay: 0.14s; }
  html.js .hero__h1 .wi--4 { animation-delay: 0.2s; }
  html.js .hero__h1 .wi--5 { animation-delay: 0.26s; }
  html.js .hero__h1 .wi--6 { animation-delay: 0.32s; }
  html.js .hero__h1 .wi--7 { animation-delay: 0.38s; }
  html.js .hero__h1 .wi--8 { animation-delay: 0.44s; }
  html.js .hero__eyebrow { animation: lsFadeUp 0.8s var(--ease) backwards; }
  html.js .hero__line { animation: lsRise 0.9s var(--ease) 0.42s backwards; } /* transform only: it is the LCP text, an opacity fade delays LCP */
  html.js .hero__ctas { animation: lsFadeUp 0.9s var(--ease) 0.52s backwards; }
  html.js .fan__card { animation: lsFanIn 1.4s var(--ease) 0.25s backwards; }
  html.js .fan__card--2, html.js .fan__card--4 { animation-delay: 0.34s; }
  html.js .fan__card--1, html.js .fan__card--5 { animation-delay: 0.42s; }
}
@keyframes lsWordUp { from { transform: translateY(112%); } }
@keyframes lsFadeUp { from { opacity: 0; transform: translateY(16px); } }
@keyframes lsRise { from { transform: translateY(16px); } }
@keyframes lsFanIn { from { transform: translate(0, 16%) rotate(0deg) scale(0.86); } }

/* ---------------------------------------------------------------- 1b · the pain (round 4c: a compact grid)
   Six cards, numbered like the deck cards. When the grid arrives ([data-reveal] .is-in) the headlines
   are struck through in coral, one after another. Static / no-JS / reduced motion = all struck. */
.pain { padding-block: clamp(56px, 7vw, 96px) clamp(76px, 8vw, 112px); }
.pain__in { max-width: 1120px; }
.pain__eye { display: flex; justify-content: center; color: var(--coral-ink); }
.pain__h { font: 600 var(--fs-h2) / 1.06 var(--f-d); letter-spacing: -0.01em; text-align: center; margin-top: 10px; }
.pain__sub span { display: block; }
.pain__sub { margin: 14px auto 0; max-width: 46ch; color: var(--ink-soft); font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem); line-height: 1.55; text-wrap: balance; text-align: center; }
.pains { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); margin-top: clamp(30px, 4vw, 48px); }
.pn {
  position: relative; padding: clamp(18px, 2vw, 26px);
  border-radius: var(--r-card); background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1);
}
.pn::before { /* a coral edge on the start side */
  content: ""; position: absolute; inset-block: 18px; inset-inline-start: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--coral); opacity: 0.85;
}
.pn__top { display: flex; align-items: center; justify-content: space-between; }
.pn__ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: rgba(242, 117, 110, 0.13); color: var(--coral-ink); }
.pn__ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pn__n { font: 700 0.9rem / 1 var(--f-n); color: var(--ink-soft); letter-spacing: 0.06em; opacity: 0.75; }
.pn__t { margin-top: 16px; font: 600 clamp(1.25rem, 1rem + 0.8vw, 1.6rem) / 1.2 var(--f-d); color: var(--ink); text-wrap: balance; }
.pn__x { /* the strike: a coral bar through the middle of every line */
  background: linear-gradient(var(--coral), var(--coral)) no-repeat right 58% / 100% 0.1em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.pn__p { margin-top: 8px; color: var(--ink-soft); font-size: 0.98rem; line-height: 1.5; }
.pain__end { display: flex; flex-direction: column; align-items: center; gap: 22px; margin-top: clamp(32px, 4vw, 48px); }
.pain__line span { display: block; }
.pain__line { max-width: 30ch; font: 600 clamp(1.35rem, 1.05rem + 1vw, 2rem) / 1.25 var(--f-d); color: var(--coral-ink); text-wrap: balance; text-align: center; }

/* arrival: the strikes run in sequence, then the pain steps back (colour, so the coral stays strong) */
html.anim .pn__x { transition: background-size 0.55s var(--ease-io); }
html.anim .pn__t { transition: color 0.5s var(--ease); }
html.anim .pains:not(.is-in) .pn__x { background-size: 0% 0.1em; transition: none; }
html.anim .pains.is-in .pn__t { color: var(--ink-soft); }
html.anim .pains.is-in .pn--1 .pn__x { transition-delay: 0.45s; } html.anim .pains.is-in .pn--1 .pn__t { transition-delay: 0.9s; }
html.anim .pains.is-in .pn--2 .pn__x { transition-delay: 0.65s; } html.anim .pains.is-in .pn--2 .pn__t { transition-delay: 1.1s; }
html.anim .pains.is-in .pn--3 .pn__x { transition-delay: 0.85s; } html.anim .pains.is-in .pn--3 .pn__t { transition-delay: 1.3s; }
html.anim .pains.is-in .pn--4 .pn__x { transition-delay: 1.05s; } html.anim .pains.is-in .pn--4 .pn__t { transition-delay: 1.5s; }
html.anim .pains.is-in .pn--5 .pn__x { transition-delay: 1.25s; } html.anim .pains.is-in .pn--5 .pn__t { transition-delay: 1.7s; }
html.anim .pains.is-in .pn--6 .pn__x { transition-delay: 1.45s; } html.anim .pains.is-in .pn--6 .pn__t { transition-delay: 1.9s; }

@media (max-width: 1023px) { .pains { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  /* phones: two columns, headline only (the detail stays on larger screens), to keep the chapter short */
  .pains { gap: 10px; }
  .pn { padding: 14px 14px 16px; }
  .pn::before { inset-block: 14px; }
  .pn__ico { width: 36px; height: 36px; border-radius: 11px; }
  .pn__ico svg { width: 19px; height: 19px; }
  .pn__n { font-size: 0.8rem; }
  .pn__t { margin-top: 12px; font-size: 1.1rem; }
  .pn__p { display: none; }
  .pain__end { gap: 16px; }
}

/* ---------------------------------------------------------------- 2 · what it does (the dark chapter) */
.day {
  position: relative; z-index: 1;
  background: var(--navy); color: var(--on-navy);
  border-radius: var(--seam) var(--seam) 0 0;
  margin-top: calc(var(--seam) * -1);
  padding-block: clamp(72px, 9vw, 120px) calc(var(--seam) + clamp(36px, 4vw, 56px));
}
.day .eyebrow { color: var(--orange); }
.day__head .h2 { max-width: 16ch; }
.day__note { margin-top: 28px; color: var(--on-navy-soft); font-size: 0.95rem; text-align: center; }

.deck { margin-top: clamp(36px, 5vw, 64px); display: grid; gap: 22px; }
.st { --i: 0; --pad: clamp(20px, 3vw, 40px); }
.st--1 { --i: 0; } .st--2 { --i: 1; } .st--3 { --i: 2; } .st--4 { --i: 3; } .st--5 { --i: 4; } .st--6 { --i: 5; }
.st__in {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: var(--pad);
  border-radius: var(--r-card);
  background: var(--navy-2);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 -24px 60px rgba(0, 6, 16, 0.38);
}
.st:nth-child(even) .st__in { background: var(--navy-3); }
.st__meta { display: flex; align-items: center; gap: 12px; }
.st__num { display: inline-block; padding: 8px 12px; border-radius: 11px; background: var(--orange); color: var(--ink); font: 700 1.05rem / 1 var(--f-n); }
.st__prog { width: 84px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.st__prog i { display: block; height: 100%; background: var(--orange); transform-origin: right; transform: scaleX(calc((var(--i) + 1) / 6)); }
.st__of { font: 500 0.85rem / 1 var(--f-n); letter-spacing: 0.1em; color: var(--on-navy-soft); }
.st__t { font: 600 var(--fs-h3) / 1.1 var(--f-d); margin-top: 22px; text-wrap: balance; }

.frame { border-radius: var(--r-frame); overflow: hidden; background: #fff; box-shadow: 0 24px 60px rgba(0, 4, 12, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08); }
.frame .shot { width: 100%; height: auto; }
.frame--desk { width: 100%; }
.sheets { display: grid; place-items: center; }
.sheets > .frame { grid-area: 1 / 1; border-radius: 6px; width: min(56%, 360px); }
.frame--sheet { transform: rotate(1.5deg); }
.frame--back { transform: translateX(-34%) rotate(-5deg) scale(0.94); opacity: 0.94; }
.phones { display: flex; justify-content: center; align-items: flex-end; gap: clamp(12px, 1.8vw, 24px); }
.frame--phone { width: min(30%, 210px); padding: 7px; border-radius: 32px; background: #050d1a; }
.frame--phone .shot { border-radius: 25px; }
.phones .frame--phone:nth-child(2) { transform: translateY(-18px); }
.duo { position: relative; width: 100%; display: grid; justify-items: start; padding-block-end: 18px; }
.frame--wide { width: 86%; }
.duo__phone { position: absolute; inset-inline-end: 0; bottom: 0; width: 26%; }

/* desktop: the sticky deck. Pure CSS (no JS needed); app.js only adds the cover depth.
   Each card sticks 14px lower than the one before, so the earlier ones peek as a stack. */
@media (min-width: 1024px) and (min-height: 680px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .deck { display: block; padding-bottom: min(6vh, 60px); }
  .st {
    --card-h: min(calc(100vh - var(--hdr-h) - 24px - 5 * 14px - 28px), 572px);
    --vis-h: min(calc(var(--card-h) - var(--pad) * 2), 32vw);
    position: sticky;
    inset-block-start: calc(var(--hdr-h) + 24px + var(--i) * 14px);
    margin-bottom: min(16vh, 150px);
  }
  .st:last-child { margin-bottom: 0; }
  .frame--desk { width: min(100%, calc(var(--vis-h) * 1.6)); }
  .sheets > .frame { width: auto; }
  .sheets .shot { height: calc(var(--vis-h) - 24px); width: auto; }
  .phones .frame--phone { width: auto; }
  .phones .frame--phone .shot { height: calc(var(--vis-h) - 40px); width: auto; }
  .frame--wide { width: min(86%, calc(var(--vis-h) * 1.6 * 0.9)); }
  .duo__phone { width: auto; }
  .duo__phone .shot { height: calc(var(--vis-h) * 0.72); width: auto; }
}
/* cover depth: the card underneath eases back as the next one slides over (written by app.js) */
html.pin .st__in { transform: scale(calc(1 - var(--cover, 0) * 0.05)); transform-origin: 50% 0%; will-change: transform; }
html.pin .st__in::after {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit;
  background: #000a18; opacity: calc(var(--cover, 0) * 0.5); pointer-events: none; will-change: opacity;
}

/* arrival (html.anim, .is-on toggled by app.js, reversible): the screen scales in from .96,
   the title words rise, the progress fills. Flow mode (phones): the whole card also rises in. */
html.anim .st__vis > .tilt { transition: opacity 0.9s var(--ease), scale 1s var(--ease), transform 0.7s var(--ease); }
html.anim .st__t .wi { transition: transform 0.85s var(--ease); }
html.anim .st__line { transition: opacity 0.8s var(--ease) 0.2s, transform 0.8s var(--ease) 0.2s; }
html.anim .st__prog i { transition: transform 1.1s var(--ease) 0.15s; }
html.anim .st.is-on .st__t .wi--2 { transition-delay: 0.06s; }
html.anim .st.is-on .st__t .wi--3 { transition-delay: 0.12s; }
html.anim .st.is-on .st__t .wi--4 { transition-delay: 0.18s; }
html.anim .st.is-on .st__t .wi--5 { transition-delay: 0.24s; }
html.anim .st:not(.is-on) .st__vis > .tilt { opacity: 0; scale: 0.96; }
html.anim .st:not(.is-on) .st__t .wi { transform: translateY(112%); }
html.anim .st:not(.is-on) .st__line { opacity: 0; transform: translateY(12px); }
html.anim .st:not(.is-on) .st__prog i { transform: scaleX(0); }
html.anim:not(.pin) .st__in { transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
html.anim:not(.pin) .st:not(.is-on) .st__in { opacity: 0; transform: translateY(36px); }

@media (max-width: 1023px) {
  .st__in { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .st__t { margin-top: 16px; }
  .st__line { max-width: none; }
}
@media (max-width: 767px) {
  .deck { gap: 16px; }
  .st { --pad: 22px; }
  .st__in { gap: 22px; }
  .st__t { font-size: 1.85rem; margin-top: 14px; }
  .st__line { font-size: 1.08rem; margin-top: 8px; }
  /* phones show the phone screen of the same view, in a phone frame */
  .frame--desk { width: min(62%, 240px); padding: 6px; border-radius: 30px; background: #050d1a; }
  .frame--desk .shot { border-radius: 24px; }
  .sheets > .frame { width: 64%; }
  .frame--back { transform: translateX(-26%) rotate(-5deg) scale(0.92); }
  .phones .frame--phone { width: 46%; padding: 5px; border-radius: 26px; }
  .phones .frame--phone .shot { border-radius: 21px; }
  .phones .frame--third { display: none; }
  .phones .frame--phone:nth-child(2) { transform: translateY(-12px); }
  .frame--wide { width: 88%; border-radius: 10px; }
  .duo__phone { width: 30%; padding: 4px; border-radius: 18px; }
  .duo__phone .shot { border-radius: 14px; }
}

/* ---------------------------------------------------------------- 3 · built for your school */
.build {
  position: relative; z-index: 2;
  margin-top: calc(var(--seam) * -1);
  border-radius: var(--seam) var(--seam) 0 0;
  background: var(--paper-2);
  padding-block: clamp(72px, 9vw, 124px);
}
/* a line drawn through the three numbered dots (RTL: from the right) */
.steps {
  --g: clamp(20px, 3vw, 44px);
  --dot: 64px;
  position: relative;
  margin-top: clamp(40px, 5vw, 64px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--g);
  text-align: center;
}
.steps::before {
  content: ""; position: absolute; z-index: 0;
  top: calc(var(--dot) / 2 - 1px); height: 2px;
  left: calc((100% - 2 * var(--g)) / 6); right: calc((100% - 2 * var(--g)) / 6);
  background: var(--coral); border-radius: 2px;
  transform-origin: right;
}
.step { position: relative; z-index: 1; display: grid; justify-items: center; }
.step__dot {
  display: grid; place-items: center;
  width: var(--dot); height: var(--dot); border-radius: 50%;
  background: var(--orange); color: var(--ink);
  box-shadow: 0 0 0 8px var(--paper-2), var(--sh-1);
}
.step__n { font: 700 1.35rem / 1 var(--f-n); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.step__t { font: 600 clamp(1.7rem, 1.35rem + 1vw, 2.3rem) / 1.1 var(--f-d); margin-top: 22px; }
.step__p { margin-top: 8px; color: var(--ink-soft); max-width: 28ch; }

html.anim .steps::before { transition: transform 1.5s var(--ease-io) 0.15s; }
html.anim .step__dot { transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s; }
html.anim .step__t, html.anim .step__p { transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
html.anim .steps.is-in .step--2 .step__dot { transition-delay: 0.6s; }
html.anim .steps.is-in .step--3 .step__dot { transition-delay: 1.2s; }
html.anim .steps.is-in .step--1 :is(.step__t, .step__p) { transition-delay: 0.15s; }
html.anim .steps.is-in .step--2 :is(.step__t, .step__p) { transition-delay: 0.75s; }
html.anim .steps.is-in .step--3 :is(.step__t, .step__p) { transition-delay: 1.35s; }
html.anim .steps:not(.is-in)::before { transform: scaleX(0); }
html.anim .steps:not(.is-in) .step__dot { opacity: 0; transform: scale(0.55); }
html.anim .steps:not(.is-in) :is(.step__t, .step__p) { opacity: 0; transform: translateY(16px); }

@media (max-width: 767px) {
  .steps { --dot: 52px; grid-template-columns: minmax(0, 1fr); gap: 26px; text-align: start; }
  .steps::before { left: auto; right: calc(var(--dot) / 2 - 1px); top: calc(var(--dot) / 2); bottom: calc(var(--dot) / 2 + 30px); width: 2px; height: auto; transform-origin: top; }
  .step { grid-template-columns: var(--dot) minmax(0, 1fr); column-gap: 18px; justify-items: start; align-items: start; }
  .step__dot { grid-row: 1 / span 2; box-shadow: 0 0 0 6px var(--paper-2), var(--sh-1); }
  .step__n { font-size: 1.15rem; }
  .step__t { margin-top: 8px; font-size: 1.6rem; }
  .step__p { margin-top: 4px; }
  html.anim .steps:not(.is-in)::before { transform: scaleY(0); }
}

/* ---------------------------------------------------------------- 4 · intro call */
/* ---------------------------------------------------------------- 3b · from Leadus */
.about { background: var(--paper); padding-block: clamp(64px, 8vw, 112px) 0; }
.about__card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: clamp(18px, 3vw, 40px);
  padding: clamp(26px, 3.4vw, 44px) clamp(22px, 3.6vw, 48px);
  border-radius: var(--r-card); background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--sh-1);
}
.about__strip { position: absolute; inset-inline: 0; inset-block-start: 0; height: 6px; display: flex; }
.about__strip i { flex: 1; transform-origin: right; }
.about__strip i:nth-child(1) { background: var(--cyan); }
.about__strip i:nth-child(2) { background: var(--lime); }
.about__strip i:nth-child(3) { background: var(--orange); }
.about__strip i:nth-child(4) { background: var(--coral); }
.about__mark { width: clamp(52px, 6vw, 72px); height: auto; }
.about__h { font: 600 clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem) / 1.08 var(--f-d); }
.about__line { margin-top: 8px; color: var(--ink-soft); max-width: 58ch; }
.about__link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: 999px; border: 1.5px solid rgba(0, 21, 47, 0.18);
  font: 700 1rem / 1 var(--f-n); color: var(--ink); white-space: nowrap;
  transition: border-color 0.2s, background-color 0.2s;
}
.about__link .ico { width: 1em; height: 1em; }
.about__link:hover, .about__link:focus-visible { border-color: var(--ink); background: var(--paper); }
html.anim .about__strip i { transition: transform 0.7s var(--ease-io); }
html.anim .about__strip i:nth-child(2) { transition-delay: 0.12s; }
html.anim .about__strip i:nth-child(3) { transition-delay: 0.24s; }
html.anim .about__strip i:nth-child(4) { transition-delay: 0.36s; }
html.anim .about__card:not(.is-in) .about__strip i { transform: scaleX(0); }
@media (max-width: 767px) {
  .about__card { grid-template-columns: auto minmax(0, 1fr); row-gap: 14px; }
  .about__text { grid-column: 1 / -1; grid-row: 2; }
  .about__mark { grid-row: 1; }
  .about__link { grid-row: 1; justify-self: end; }
}

.call { background: var(--paper); padding-block: clamp(56px, 7vw, 96px) clamp(72px, 9vw, 124px); }
.call__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.call__text { padding-top: clamp(0px, 2vw, 24px); }
.call__card {
  background: var(--card); border-radius: var(--r-card);
  padding: clamp(22px, 3vw, 40px);
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
}
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-weight: 700; font-size: 0.95rem; }
.opt { font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; }
.field input, .field select {
  width: 100%; min-height: 52px; padding: 0 14px;
  border-radius: var(--r-field); border: 1.5px solid #E2C9AF; background: #FFFDFB;
  font-size: 1.05rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field select { appearance: none; -webkit-appearance: none; padding-inline-start: 14px; padding-inline-end: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300152F' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 18px; background-position: left 14px center; }
.field input[dir="ltr"] { text-align: right; }
.field input:focus, .field select:focus { outline: none; border-color: var(--coral-ink); box-shadow: 0 0 0 4px rgba(242, 117, 110, 0.18); }
.field.is-bad input, .field.is-bad select { border-color: var(--coral-ink); background: #FFF4F2; }
.consent { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 12px; font-size: 0.98rem; color: var(--ink-soft); cursor: pointer; padding-block: 10px; min-height: 44px; }
.consent input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--coral-ink); cursor: pointer; }
.consent.is-bad span { color: var(--coral-ink); }
.form .btn { grid-column: 1 / -1; margin-top: 4px; }
.form__msg { grid-column: 1 / -1; color: var(--coral-ink); font-weight: 600; min-height: 0; }
.form__msg:empty { display: none; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.thanks[hidden] { display: none !important; }
.thanks { display: grid; justify-items: center; text-align: center; gap: 18px; padding: clamp(40px, 6vw, 72px) 12px; }
.thanks__ok { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--orange); color: var(--ink); }
.thanks__ok .ico { width: 30px; height: 30px; stroke-width: 2.6; }
.thanks__t { font: 600 clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem) / 1.15 var(--f-d); max-width: 16ch; text-wrap: balance; }
@media (max-width: 900px) {
  .call__in { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .form { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

/* ---------------------------------------------------------------- footer */
.ftr { background: var(--paper-2); border-top: 1px solid var(--line); padding-block: 26px calc(26px + env(safe-area-inset-bottom, 0px)); }
.ftr__in { display: flex; justify-content: center; }
.credit { display: inline-flex; align-items: center; gap: 10px; padding: 10px 4px; color: var(--ink-soft); font-size: 0.95rem; font-weight: 600; }
.credit img { width: 24px; height: auto; }
.credit:hover span, .credit:focus-visible span { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---------------------------------------------------------------- floating WhatsApp (only when a number is set) */
.wa-float {
  position: fixed; z-index: var(--z-float);
  right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--wa); color: #fff; box-shadow: 0 10px 26px rgba(7, 94, 84, 0.35);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.wa-float .ico { width: 30px; height: 30px; }
.wa-float.is-away { opacity: 0; transform: scale(0.8); pointer-events: none; }

/* ---------------------------------------------------------------- thanks page */
.thanks-page { min-height: calc(min(100vh, 900px) - var(--hdr-h) - 80px); display: grid; place-items: center; padding-block: 64px; }
.thanks-page__in { display: grid; justify-items: center; gap: 22px; text-align: center; }
.thanks-page .h2 { margin-top: 0; }

/* ==========================================================================
   סבב 3 · "יותר מגניב": הדגמה חיה בהירו, מסכים בתלת ממד עם התראות, גריד אריחים.
   קודם סטטי: ה-HTML הוא הפריים הסופי (הכל אושר, PDF חתום, התראות גלויות, חתימה מצוירת).
   מצבי "לפני" רק תחת .is-live (הלולאה רצה) או html.anim. תנועה: transform ו-opacity
   (החתימה: stroke-dashoffset על SVG קטן). במגע: בלי filter, בלי backdrop-filter.
   ========================================================================== */

/* ---------------------------------------------------------------- hero stage: fan + live demo */
.hero__stage { position: relative; }
.demo {
  --dw: clamp(300px, 27vw, 372px);
  position: absolute; z-index: 8;
  top: clamp(-52px, -3vw, -24px);
  inset-inline-start: max(12px, calc(50% - min(31%, 410px) - clamp(24px, 4vw, 72px)));
  width: var(--dw);
  text-align: start;
  font-family: var(--f-b);
  color: var(--sys-ink);
}
.demo__card {
  position: relative; z-index: 1;
  background: #fff; border-radius: 20px;
  border: 1px solid var(--sys-line);
  box-shadow: 0 2px 6px rgba(0, 21, 47, 0.06), 0 26px 60px rgba(0, 21, 47, 0.2);
  overflow: hidden;
}
.demo__top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 16px 16px 12px; }
.demo__ico { grid-row: 1 / span 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--bordeaux-bg); color: var(--bordeaux); }
.demo__ico svg, .demo__chk svg, .demo__toast-ico svg, .demo__pdf-ok svg, .bub__ico svg { width: 60%; height: 60%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.demo__ttl { min-width: 0; }
.demo__name { font-weight: 800; font-size: 1.02rem; line-height: 1.25; }
.demo__meta { font-size: 0.85rem; color: var(--sys-soft); line-height: 1.35; }
.demo__pill { grid-column: 2; justify-self: start; position: relative; display: inline-grid; align-items: center; padding: 3px 10px 3px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.demo__pill > * { grid-area: 1 / 1; }
.demo__pill i { display: none; }
.demo__p-wait, .demo__p-ok { padding-inline-start: 13px; position: relative; transition: opacity 0.35s; }
.demo__p-wait::before, .demo__p-ok::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: currentColor; }
.demo__pill { background: var(--ok-bg); color: var(--ok-ink); transition: background-color 0.35s, color 0.35s; }
.demo__p-wait { opacity: 0; }
.demo:not(.is-approved) .demo__pill { background: var(--wait-bg); color: var(--wait-ink); }
.demo:not(.is-approved) .demo__p-wait { opacity: 1; }
.demo:not(.is-approved) .demo__p-ok { opacity: 0; }

.demo__bar { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-block: 1px solid var(--sys-line); background: var(--sys-bg); font-size: 0.82rem; font-weight: 700; color: var(--sys-soft); }
.demo__track { flex: 1; height: 6px; border-radius: 6px; background: var(--sys-line); overflow: hidden; }
.demo__track i { display: block; height: 100%; border-radius: 6px; background: var(--ok); transform-origin: right; transform: scaleX(var(--k, 1)); transition: transform 0.7s var(--ease); }
.demo__count { font: 700 0.85rem / 1 var(--f-n); color: var(--sys-ink); font-variant-numeric: tabular-nums; }

.demo__step {
  position: relative;
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 10px 16px; min-height: 46px;
  font-weight: 700; font-size: 0.95rem;
}
.demo__step + .demo__step { border-top: 1px solid var(--sys-line); }
.demo__step::before { /* the row that waits for a decision gets the system's bordeaux edge */
  content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 100%;
  background: var(--bordeaux-bg); border-inline-start: 3px solid var(--bordeaux);
  opacity: 0; transition: opacity 0.35s; z-index: -1;
}
.demo__step.is-now::before { opacity: 1; }
.demo__steps { position: relative; z-index: 0; }
.demo__chk { position: relative; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ok); color: #fff; transition: background-color 0.3s, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.demo__chk > svg { transition: opacity 0.25s; }
.demo__wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--wait); opacity: 0; transition: opacity 0.25s; }
.demo__wait svg { width: 70%; height: 70%; }
.demo__state { display: inline-grid; font-size: 0.8rem; }
.demo__state > span { grid-area: 1 / 1; justify-self: end; padding: 3px 10px; border-radius: 999px; transition: opacity 0.3s, transform 0.4s var(--ease); }
.demo__s-wait { background: var(--sys-bg); color: var(--sys-soft); opacity: 0; }
.demo__s-ok { background: var(--ok-bg); color: var(--ok-ink); }
.demo__step:not(.is-done) .demo__chk { background: #fff; box-shadow: inset 0 0 0 2px var(--wait); }
.demo__step:not(.is-done) .demo__chk > svg { opacity: 0; }
.demo__step:not(.is-done) .demo__wait { opacity: 1; }
.demo__step:not(.is-done) .demo__s-wait { opacity: 1; }
.demo__step:not(.is-done) .demo__s-ok { opacity: 0; transform: scale(0.8); }
.demo__step.is-done .demo__chk { animation: none; }
.demo.is-live .demo__step.is-pop .demo__chk { animation: demoPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes demoPop { 40% { transform: scale(1.22); } }

/* the toast: one notification that pops at every approval */
.demo__toast {
  position: absolute; z-index: 3;
  top: -20px; inset-inline-end: -26px;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 16px 9px 12px; border-radius: 14px;
  background: var(--navy); color: #fff;
  font-weight: 700; font-size: 0.92rem; white-space: nowrap;
  box-shadow: 0 16px 34px rgba(0, 21, 47, 0.3);
  transition: opacity 0.35s var(--ease), transform 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.demo__toast-ico { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ok); }
.demo.is-live:not(.is-pop) .demo__toast { opacity: 0; transform: translateY(10px) scale(0.9); }

/* the signed PDF that lands at the end */
.demo__pdf {
  position: absolute; z-index: 2;
  inset-inline-start: calc(100% - 12px); bottom: 34px;
  width: 152px; padding: 14px 14px 12px;
  border-radius: 10px; background: #fff;
  border: 1px solid var(--sys-line);
  box-shadow: 0 22px 46px rgba(0, 21, 47, 0.22);
  transform: rotate(-6deg);
  transition: opacity 0.4s var(--ease), transform 0.8s cubic-bezier(0.3, 1.45, 0.55, 1);
}
.demo__pdf-tag { position: absolute; top: 10px; left: 10px; /* physical: the tag is dir=ltr */ padding: 2px 7px; border-radius: 6px; background: var(--coral); color: var(--ink); font: 700 0.72rem / 1.3 var(--f-n); letter-spacing: 0.04em; }
.demo__pdf-t { font-weight: 800; font-size: 0.95rem; padding-inline-end: 40px; }
.demo__lines, .paper__lines { display: grid; gap: 6px; margin-top: 10px; }
.demo__lines i, .paper__lines i { display: block; height: 5px; border-radius: 5px; background: var(--sys-line); }
.demo__lines i:nth-child(2), .paper__lines i:nth-child(2) { width: 82%; }
.demo__lines i:nth-child(3), .paper__lines i:nth-child(3) { width: 64%; }
.demo__pdf-ok { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 0.8rem; font-weight: 800; color: var(--ok-ink); }
.demo__pdf-ok svg { width: 16px; height: 16px; padding: 2px; border-radius: 50%; background: var(--ok); color: #fff; stroke-width: 3; }
.demo.is-live:not(.is-final) .demo__pdf { opacity: 0; transform: translateY(-46px) rotate(-16deg) scale(0.9); }
.demo.is-reset *, .demo.is-reset *::before { transition-duration: 0.3s !important; transition-delay: 0s !important; }
.demo.no-tr *, .demo.no-tr *::before { transition: none !important; }

@media (prefers-reduced-motion: no-preference) {
  html.js .demo { animation: lsFadeUp 1s var(--ease) 0.65s backwards; }
}
@media (max-width: 1023px) {
  .demo { --dw: min(380px, 62%); top: 18%; inset-inline-start: 4%; }
}
@media (max-width: 767px) {
  /* phone: the demo sits in the flow, over the lower half of the fan; toast and PDF use the fan above it */
  .hero__stage { padding-bottom: 34px; }
  .demo { position: relative; top: auto; inset-inline-start: auto; width: min(100% - 32px, 350px); margin: -140px auto 0; }
  .demo__top { padding: 13px 13px 10px; gap: 2px 10px; }
  .demo__ico { width: 36px; height: 36px; border-radius: 10px; }
  .demo__name { font-size: 0.95rem; }
  .demo__meta, .demo__bar { font-size: 0.8rem; }
  .demo__bar { padding: 8px 13px; }
  .demo__step { padding: 8px 13px; min-height: 42px; font-size: 0.9rem; gap: 9px; grid-template-columns: 24px minmax(0, 1fr) auto; }
  .demo__chk { width: 24px; height: 24px; }
  .demo__toast { top: -50px; inset-inline-end: auto; inset-inline-start: 4px; font-size: 0.86rem; padding: 8px 13px 8px 10px; }
  .demo__pdf { width: 118px; padding: 10px 10px 9px; inset-inline-start: auto; inset-inline-end: -6px; bottom: auto; top: -112px; }
  .demo__pdf-t { font-size: 0.82rem; padding-inline-end: 34px; }
  .demo__pdf-tag { font-size: 0.66rem; top: 8px; left: 8px; }
  .demo__pdf-ok { font-size: 0.72rem; }
  .demo__lines { gap: 4px; margin-top: 7px; }
}

/* ---------------------------------------------------------------- deck: 3D screens + floating notifications */
/* JS writes --px --py (-1..1) on .st__vis: the pointer on desktop, the scroll position on phones.
   The screen leans toward the text column and follows them; the bubbles drift the other way (depth). */
.st__vis { position: relative; perspective: 1500px; }
.tilt {
  --ry0: 9deg; --rx0: 3deg;
  width: 100%; display: flex; justify-content: center;
  transform: rotateY(calc(var(--ry0) + var(--px, 0) * 7deg)) rotateX(calc(var(--rx0) - var(--py, 0) * 6deg));
  transform-origin: 50% 50%;
}
.st--pdf .tilt, .st--phones .tilt { --ry0: 6deg; }
.bubs { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.bub {
  position: absolute;
  transform: translate3d(calc(var(--px, 0) * -14px), calc(var(--py, 0) * -10px), 0);
}
.bub--a { top: 7%; inset-inline-start: -3%; }
.bub--b { bottom: 9%; inset-inline-end: -2%; }
.bub__in {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 15px 9px 11px; border-radius: 14px;
  background: #fff; color: var(--sys-ink);
  font: 700 0.95rem / 1.25 var(--f-b); white-space: nowrap;
  box-shadow: 0 18px 40px rgba(0, 6, 16, 0.42), 0 0 0 1px rgba(0, 21, 47, 0.06);
}
.bub__ico { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; color: #fff; background: var(--ok); }
.bub__ico--bell { background: var(--orange); color: var(--ink); }
.bub__ico--clock { background: var(--wait-bg); color: var(--wait-ink); }
.bub__ico--doc { background: var(--coral); color: var(--ink); }
html.anim .bub { transition: opacity 0.6s var(--ease), translate 0.8s cubic-bezier(0.34, 1.4, 0.64, 1), scale 0.8s cubic-bezier(0.34, 1.4, 0.64, 1); }
html.anim .st.is-on .bub--a { transition-delay: 0.45s; }
html.anim .st.is-on .bub--b { transition-delay: 0.75s; }
html.anim .st:not(.is-on) .bub { opacity: 0; translate: 0 16px; scale: 0.9; }
@media (hover: hover) and (pointer: fine) {
  .tilt { transition: transform 0.7s var(--ease); }
  .bub { transition: transform 0.7s var(--ease); }
  html.anim .bub { transition: opacity 0.6s var(--ease), translate 0.8s cubic-bezier(0.34, 1.4, 0.64, 1), scale 0.8s cubic-bezier(0.34, 1.4, 0.64, 1), transform 0.7s var(--ease); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html.anim .st.is-on .bub__in { animation: bubBob 5.5s ease-in-out 1.6s infinite; }
  html.anim .st.is-on .bub--b .bub__in { animation-delay: 3.4s; }
}
@keyframes bubBob { 50% { transform: translateY(-6px); } }
@media (max-width: 1023px) {
  .tilt { --ry0: 0deg; --rx0: 4deg; }
  .bub--a { inset-inline-start: 0; }
}
@media (max-width: 767px) {
  .tilt { --rx0: 6deg; transform: rotateX(calc(var(--rx0) - var(--py, 0) * 9deg)); will-change: transform; }
  .bub { transform: translate3d(0, calc(var(--py, 0) * -12px), 0); will-change: transform; }
  .bub--a { top: 4%; inset-inline-start: 0; }
  .bub--b { display: none; }
  .bub__in { font-size: 0.86rem; padding: 7px 12px 7px 9px; gap: 7px; box-shadow: 0 12px 28px rgba(0, 6, 16, 0.45); }
  .bub__ico { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .tilt, .bub { transform: none; }
}

/* ---------------------------------------------------------------- 3 · the bento (replaces the capability chips) */
.bento {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  text-align: start;
}
.tile {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; align-content: space-between; gap: 22px;
  min-height: 260px; padding: clamp(20px, 2.2vw, 30px);
  border-radius: var(--r-card); background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--sh-1);
  -webkit-tap-highlight-color: transparent;
}
.tile--roles { grid-column: span 2; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; align-content: stretch; gap: clamp(18px, 3vw, 40px); }
.tile--phone { grid-row: span 2; background: var(--navy); border-color: var(--navy); color: var(--on-navy); padding-bottom: 0; }
.tile__t { display: flex; align-items: center; gap: 10px; font: 600 clamp(1.35rem, 1.1rem + 0.7vw, 1.7rem) / 1.15 var(--f-d); }
.tile__t .ico { color: var(--coral-ink); width: 1.05em; height: 1.05em; }
.tile--phone .tile__t .ico { color: var(--orange); }
.tile__p { margin-top: 8px; color: var(--ink-soft); font-size: 1.02rem; line-height: 1.5; max-width: 32ch; }
.tile--phone .tile__p { color: var(--on-navy-soft); }
.tile--sign, .tile--phone, .tile--secure { cursor: pointer; }

/* roles: a segmented switch + a tiny screen per role */
.roles { display: grid; gap: 12px; min-width: 0; }
.roles__tabs { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px; border-radius: 14px; background: var(--paper-2); border: 1px solid var(--line); }
.roles__tab { position: relative; z-index: 1; min-height: 44px; border: 0; background: none; border-radius: 10px; font-weight: 700; font-size: 1rem; color: var(--ink-soft); cursor: pointer; transition: color 0.25s; }
.roles__tab[aria-pressed="true"] { color: var(--ink); }
.roles__thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; inset-inline-start: 4px; width: calc((100% - 8px) / 3); border-radius: 10px; background: #fff; box-shadow: var(--sh-1); transform: translateX(calc(var(--k, 0) * -100%)); transition: transform 0.45s var(--ease); }
.mini { min-height: 152px; padding: 12px; border-radius: 16px; background: var(--sys-bg); border: 1px solid var(--sys-line); color: var(--sys-ink); }
.mini__screen[hidden] { display: none !important; }
.mini__screen { animation: miniIn 0.45s var(--ease); }
@keyframes miniIn { from { opacity: 0; transform: translateY(8px); } }
.mini__title { font-weight: 800; font-size: 0.95rem; margin: 2px 4px 10px; }
.mini__rows { display: grid; gap: 7px; }
.mini__rows li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 7px 10px 7px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--sys-line); font-weight: 600; font-size: 0.9rem; }
.mini__rows li > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini__tag { flex: none; padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.mini__tag--wait { background: var(--wait-bg); color: var(--wait-ink); }
.mini__tag--ok { background: var(--ok-bg); color: var(--ok-ink); }
.mini__tag--act { background: var(--bordeaux); color: #fff; border-radius: 8px; padding: 5px 12px; }
.mini__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini__stats span { display: grid; gap: 2px; padding: 12px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--sys-line); font-size: 0.85rem; font-weight: 600; color: var(--sys-soft); }
.mini__stats b { font: 700 1.6rem / 1 var(--f-n); color: var(--sys-ink); }

/* phone: a notification slides down */
.hand { display: flex; justify-content: center; margin-top: 8px; }
.hand__phone {
  position: relative; width: min(100%, 210px); height: 300px;
  padding: 44px 12px 0; border-radius: 34px 34px 0 0;
  background: var(--paper); border: 7px solid #050d1a; border-bottom: 0;
  display: grid; align-content: start; gap: 12px;
}
.hand__notch { position: absolute; top: 8px; left: 50%; width: 64px; height: 18px; margin-left: -32px; border-radius: 12px; background: #050d1a; }
.hand__time { justify-self: center; font: 600 2.4rem / 1 var(--f-n); color: var(--ink); letter-spacing: -0.02em; }
.hand__note {
  display: grid; gap: 3px; padding: 10px 12px; border-radius: 16px;
  background: #fff; color: var(--sys-ink); box-shadow: 0 12px 26px rgba(0, 21, 47, 0.18);
  transition: opacity 0.4s var(--ease), transform 0.6s cubic-bezier(0.34, 1.35, 0.64, 1);
}
.hand__app { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700; color: var(--sys-soft); }
.hand__app img { width: 16px; height: auto; }
.hand__app em { margin-inline-start: auto; font-style: normal; font-weight: 600; }
.hand__msg { font-weight: 700; font-size: 0.88rem; line-height: 1.3; }
.hand__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 6px; padding-inline: 4px; }
.hand__grid i { aspect-ratio: 1; border-radius: 11px; background: var(--paper-2); border: 1px solid var(--line); }
.hand__grid i:nth-child(1) { background: var(--orange); border-color: var(--orange); }
.hand__grid i:nth-child(6) { background: var(--coral); border-color: var(--coral); }
.tile--phone.is-live:not(.is-note) .hand__note { opacity: 0; transform: translateY(-36px) scale(0.94); }

/* signature: drawn when the tile arrives, again on every tap */
.paper {
  position: relative; align-self: end;
  padding: 14px 16px 14px; border-radius: 12px;
  background: var(--paper); border: 1px solid var(--line);
  transform: rotate(-1.5deg);
}
.paper__t { font-weight: 800; font-size: 0.95rem; }
.paper__lines i { transform-origin: right; }
.tile--sign .paper__lines { padding-inline-end: 118px; } /* room for the PDF badge (bottom, inline-end) */
.paper__ok { position: absolute; inset-inline-end: 14px; bottom: 16px; padding: 4px 11px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-ink); font-size: 0.82rem; font-weight: 800; transition: opacity 0.35s var(--ease), transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
html.anim .tile--sign .paper__lines i { transition: transform 0.55s var(--ease-io) 0.1s; }
html.anim .tile--sign .paper__lines i:nth-child(2) { transition-delay: 0.35s; }
html.anim .tile--sign .paper__lines i:nth-child(3) { transition-delay: 0.6s; }
html.anim .tile--sign:not(.is-signed) .paper__lines i { transform: scaleX(0); transition: none; }
html.anim .tile--sign .paper__ok { transition-delay: 1.15s; }
html.anim .tile--sign:not(.is-signed) .paper__ok { opacity: 0; transform: scale(0.7); transition-delay: 0s; }

/* secure: a lock with a slow pulse while the tile is on screen; tap = the shackle clicks shut */
.vault { position: relative; display: grid; place-items: center; height: 112px; }
.vault__lock { position: relative; z-index: 1; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--paper-2); color: var(--coral-ink); border: 1px solid var(--line); }
.vault__lock svg { width: 46px; height: 46px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.vault__lock .lock__sh { transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.tile--secure.is-click .lock__sh { transform: translateY(-5px); transition-duration: 0.12s; }
.vault__ring { position: absolute; width: 76px; height: 76px; border-radius: 50%; border: 2px solid var(--coral); opacity: 0; }
.vault__badge { position: absolute; inset-inline-start: calc(50% + 30px); top: 8px; padding: 4px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-ink); font-size: 0.8rem; font-weight: 800; }
@media (prefers-reduced-motion: no-preference) {
  .tile--secure.is-live .vault__ring { animation: vaultPulse 2.8s var(--ease) infinite; }
  .tile--secure.is-live .vault__ring--2 { animation-delay: 1.4s; }
}
@keyframes vaultPulse { from { opacity: 0.55; transform: scale(1); } to { opacity: 0; transform: scale(1.75); } }

@media (hover: hover) and (pointer: fine) {
  .tile { transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
  .tile:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
}
@media (max-width: 1023px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--roles { grid-column: 1 / -1; }
  .tile--phone { grid-row: span 2; }
}
@media (max-width: 767px) {
  .bento { gap: 12px; grid-template-columns: minmax(0, 1fr); }
  .tile { min-height: 0; padding: 18px; gap: 16px; border-radius: 20px; }
  .tile--roles { grid-template-columns: minmax(0, 1fr); }
  /* phone tile: text beside the phone, so the tile stays short */
  .tile--phone { grid-row: auto; padding-bottom: 0; grid-template-columns: minmax(0, 1fr) 150px; align-items: end; align-content: stretch; }
  .tile--phone .tile__text { align-self: start; padding-bottom: 18px; }
  .tile--phone .hand { margin-top: 0; }
  .paper { max-width: 320px; }
  .vault__lock { width: 66px; height: 66px; }
  .vault__ring { width: 66px; height: 66px; }
  .tile__t { font-size: 1.25rem; gap: 8px; }
  .tile__p { font-size: 0.95rem; }
  .hand__phone { height: 228px; padding: 34px 7px 0; border-width: 6px; border-radius: 26px 26px 0 0; gap: 9px; }
  .hand__time { font-size: 1.8rem; }
  .hand__note { padding: 8px 9px; border-radius: 12px; }
  .hand__msg { font-size: 0.8rem; }
  .hand__app { font-size: 0.75rem; }
  .hand__app em { display: none; }
  .hand__grid { gap: 7px; }
  .hand__grid i { border-radius: 8px; }
  .paper { padding: 11px 12px; }
  .vault { height: 96px; }
  .vault__badge { inset-inline-start: calc(50% + 26px); top: 6px; }
}

/* ---------------------------------------------------------------- generic reveals (gate: html.anim) */
html.anim [data-reveal]:not(.steps) { transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
html.anim [data-reveal]:not(.steps):not(.is-in) { opacity: 0; transform: translateY(30px); }

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
