/* =========================================================
   ליאן דהן — Fitness & Nutrition
   Custom layer on top of Tailwind (CDN).
   Holds the design tokens, the infinite marquee, the
   accordion and every custom animation.
   ========================================================= */

:root {
  /* Warm, blue-free palette — cream, white, rosewood and deep espresso brown,
     matching the reference site the client chose */
  --shell: #F5F0EA;
  --paper: #FFFDFB;
  --ink: #43322B;
  --ink-soft: #7A6355;
  --clay: #A8746B;
  --clay-deep: #8C5D57;
  --clay-soft: #E7D5CE;
  --line: #E4DCD2;

  --wrap: 1180px;
  --gutter: 1.25rem;
  --header-h: 74px;

  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(67, 50, 43, .06), 0 8px 24px -18px rgba(67, 50, 43, .28);
  --shadow-md: 0 2px 6px rgba(67, 50, 43, .05), 0 26px 60px -34px rgba(67, 50, 43, .45);

  --ease: cubic-bezier(.22, .61, .36, 1);

  /* Marquee speed — one full loop of the duplicated track.
     63s = 9 cards × 7s; scale it when cards are added or removed. */
  --marquee-duration: 63s;
}

/* ---------------------------------------------------------
   Base
   --------------------------------------------------------- */

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  /* One fixed-width page: vertical scrolling only, never sideways */
  overflow-x: clip;
}

body {
  background: var(--shell);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* The side-entrance reveals overshoot the screen edges by design. Clipping
   them HERE (not just on body) keeps mobile browsers from widening the
   layout viewport — which caused sideways panning and text inflation. */
main {
  overflow-x: clip;
}

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

::selection {
  background: var(--clay-soft);
  color: var(--ink);
}

/* Keyboard focus — one consistent ring everywhere */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  transition: top .2s var(--ease);
}

.skip-link:focus {
  top: 0;
}

/* ---------------------------------------------------------
   Intro splash — heart draws itself, beats once, curtain lifts.
   Shown once per browsing session (html.has-intro / .skip-intro
   are set by the inline head script before first paint).
   --------------------------------------------------------- */

html.has-intro {
  overflow: hidden; /* no scrolling behind the curtain */
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--shell);
  transition: transform .75s cubic-bezier(.65, 0, .3, 1);
}

.intro.is-done {
  transform: translateY(-101%);
}

.intro.is-gone,
.skip-intro .intro,
.no-js .intro {
  display: none;
}

.intro-inner {
  display: grid;
  justify-items: center;
  gap: 1.15rem;
  padding: 1rem;
  text-align: center;
}

.intro-heart {
  width: 76px;
  height: auto;
  overflow: visible;
}

.intro-heart-path {
  fill: rgba(168, 116, 107, 0);
  stroke: var(--clay);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 1; /* pathLength="1" in the SVG */
  stroke-dashoffset: 1;
  transform-origin: center;
  animation:
    intro-draw 1.05s cubic-bezier(.65, 0, .35, 1) .1s forwards,
    intro-fill .5s ease 1s forwards,
    intro-beat .55s cubic-bezier(.3, 0, .35, 1.4) 1.25s;
}

@keyframes intro-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes intro-fill {
  to {
    fill: rgba(168, 116, 107, .92);
    stroke: var(--clay-deep);
  }
}

@keyframes intro-beat {
  40% { transform: scale(1.14); }
  100% { transform: scale(1); }
}

.intro-brand {
  font-family: "Frank Ruhl Libre", serif;
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--ink);
  opacity: 0;
  animation: intro-up .6s cubic-bezier(.2, .7, .3, 1) .4s forwards;
}

.intro-bar {
  position: relative;
  width: 170px;
  height: 2px;
  border-radius: 999px;
  background: var(--clay-soft);
  overflow: hidden;
}

.intro-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--clay-deep), var(--clay));
  transform: scaleX(0);
  transform-origin: right; /* fills right-to-left, like the reading direction */
  animation: intro-load 1.5s cubic-bezier(.4, 0, .2, 1) .3s forwards;
}

@keyframes intro-load {
  to { transform: scaleX(1); }
}

.intro-tag {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .02em;
  color: var(--ink-soft);
  opacity: 0;
  animation: intro-up .6s cubic-bezier(.2, .7, .3, 1) .85s forwards;
}

@keyframes intro-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------
   Typography primitives
   --------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .09em;
  color: var(--clay-deep);
  margin-bottom: 1.1rem;
}

.eyebrow-light {
  color: var(--clay-soft);
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  background: currentColor;
  transform: rotate(45deg);
  display: inline-block;
}

.section-title {
  font-family: "Frank Ruhl Libre", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 1.15rem + 2.1vw, 2.7rem);
  line-height: 1.28;
  letter-spacing: -.01em;
  max-width: 22ch;
  text-wrap: balance;
}

.section-lede {
  margin-top: 1rem;
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 58ch;
}

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

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .95rem 1.7rem;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s var(--ease),
              color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--clay-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary i {
  transition: transform .25s var(--ease);
}

.btn-primary:hover i {
  transform: translateX(-4px); /* RTL: arrow points and moves right-to-left */
}

/* The client-approved submit button: warm clay, like the reference form */
.btn-clay {
  background: var(--clay);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-clay:hover {
  background: var(--clay-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn-sm {
  padding: .65rem 1.25rem;
  font-size: .92rem;
}

.btn-block {
  width: 100%;
}

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 240, 234, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}

.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(245, 240, 234, .95);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--clay-soft);
  border-radius: 12px 12px 12px 2px;
  font-family: "Frank Ruhl Libre", serif;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1;
  padding-bottom: 2px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: "Frank Ruhl Libre", serif;
  font-weight: 700;
  font-size: 1.12rem;
}

.brand-tag {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--clay-deep);
}

.nav-link {
  position: relative;
  padding-bottom: 3px;
  transition: color .2s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--clay);
  transform: scaleX(0);
  /* transform-origin has no logical keywords; page is RTL-only, so left = inline-end */
  transform-origin: left;
  transition: transform .3s var(--ease);
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: right; /* = inline-start in RTL */
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(3rem, 1rem + 7vw, 6.5rem) clamp(3.5rem, 1rem + 8vw, 7rem);
  overflow: hidden;
}

/* Soft clay wash behind the portrait — the only ambient gradient on the page.
   The portrait is the second grid column, i.e. the inline-END side in RTL. */
.hero::before {
  content: "";
  position: absolute;
  inset-block-start: -18%;
  inset-inline-end: -10%;
  width: 55vw;
  height: 75vh;
  background: radial-gradient(closest-side, rgba(168, 116, 107, .16), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 1rem + 5vw, 4.5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.05fr .95fr;
  }
}

.hero-title {
  font-family: "Frank Ruhl Libre", Georgia, serif;
  font-weight: 900;
  font-size: clamp(2.05rem, 1.1rem + 3.9vw, 3.55rem);
  line-height: 1.2;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.hero-title-sub {
  display: block;
  margin-top: 1rem;
  font-family: "Assistant", sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, .85rem + .7vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-soft);
  letter-spacing: normal;
  max-width: 40ch;
}

.hero-lede {
  margin-top: 1.6rem;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero-actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
}

.hero-creds {
  margin-top: 2.8rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.6rem;
}

.hero-creds li {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .93rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.hero-creds i {
  color: var(--clay);
  font-size: .85rem;
}

/* Portrait frame */
.hero-figure {
  position: relative;
}

.hero-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--clay-soft);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 5;
}

.hero-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
}

.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* The portrait has little air above the hair — never crop from the top */
  object-position: 50% 0%;
  display: block;
  /* --par is set by script.js (gentle scroll parallax); the slight scale
     gives the drift headroom so the frame never shows an empty edge */
  transform: translateY(var(--par, 0px)) scale(1.06);
  will-change: transform;
}

.hero-quote {
  position: absolute;
  inset-block-end: -28px;
  inset-inline-start: -18px;
  max-width: 19rem;
  background: var(--ink);
  color: #fff;
  padding: 1.15rem 1.35rem;
  border-radius: var(--radius) var(--radius) var(--radius) 4px;
  box-shadow: var(--shadow-md);
}

.hero-quote blockquote {
  font-family: "Frank Ruhl Libre", serif;
  font-size: 1.02rem;
  line-height: 1.55;
}

.hero-quote figcaption {
  margin-top: .55rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--clay-soft);
}

@media (max-width: 899px) {
  .hero-quote {
    position: static;
    margin-top: 1.25rem;
    max-width: none;
  }
}

/* ---------------------------------------------------------
   Sections
   --------------------------------------------------------- */

.section {
  padding-block: clamp(3.5rem, 1.5rem + 6vw, 6.5rem);
}

.section-paper {
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.section-ink {
  /* The rosewood block from the reference site — white text on warm clay */
  background: linear-gradient(180deg, var(--clay), #97655C);
  color: #fff;
  overflow: hidden;
}

.section-ink .section-title {
  color: #fff;
}

.section-ink .section-lede {
  color: rgba(255, 255, 255, .72);
}


/* ---------------------------------------------------------
   Marquee — infinite, pauses on hover / touch / focus
   --------------------------------------------------------- */

.marquee-hint {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-inline-start: .5rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--clay-soft);
}

.marquee {
  position: relative;
  /* LTR on the overflow container: in the RTL page an oversized track would
     align to the right edge and overflow off-screen to the left */
  direction: ltr;
  margin-top: 1rem;
  padding-block: 1.5rem;
  overflow: hidden;
  /* Fade the edges so cards enter and leave instead of being cut */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}

.marquee-track {
  direction: ltr;
  display: flex;
  /* No gap here: card spacing lives on .tcard as a margin, so that
     translateX(-50%) lands exactly on the cloned half of the track */
  width: max-content;
  animation: marquee-scroll var(--marquee-duration) linear infinite;
  will-change: transform;
}

@keyframes marquee-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* The crucial UX rule: inspection beats motion.
   :hover only on devices that genuinely hover — on touch screens a stale
   emulated hover would freeze the strip after every stray tap. */
@media (hover: hover) {
  .marquee:hover .marquee-track {
    animation-play-state: paused;
  }
}

/* Touch devices: the tap-to-pause toggle (script.js) is the pointer affordance */
@media (hover: none) {
  .marquee {
    cursor: pointer;
  }
}

.marquee:focus-within .marquee-track,
.marquee[data-paused="true"] .marquee-track {
  animation-play-state: paused;
}

/* Transformation card — the signature element */
.tcard {
  direction: rtl;
  flex: 0 0 auto;
  /* Phone-first sizing: ~two cards visible on a mobile screen */
  width: clamp(170px, 46vw, 240px);
  /* Physical margin (the track is LTR); part of the -50% loop math above */
  margin-right: 1.25rem;
}

.tframe {
  position: relative;
  display: flex;
  gap: 2px;
  padding: 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(231, 213, 206, .22);
  border-radius: var(--radius);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}

.marquee:hover .tcard:hover .tframe,
.marquee[data-paused="true"] .tcard:hover .tframe {
  transform: translateY(-6px);
  border-color: var(--clay);
  box-shadow: 0 30px 50px -30px rgba(0, 0, 0, .7);
}

/* One composite photo per card — each source photo already holds the
   before | after pair side by side, exactly as the client sent it */
.tframe img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

/* לפני / אחרי chips pinned over the top of the two photo halves.
   Physical positions on purpose: the halves live in image space. */
.tframe::before,
.tframe::after {
  position: absolute;
  top: 18px;
  z-index: 1;
  transform: translateX(-50%);
  padding: .22rem .6rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
}

.tframe::before {
  content: "לפני";
  left: 25%;
  background: rgba(67, 50, 43, .82);
}

.tframe::after {
  content: "אחרי";
  left: 75%;
  background: var(--clay-deep);
  border: 1px solid rgba(255, 255, 255, .45);
}

/* Composites whose AFTER photo is on the left half */
.ba-flip .tframe::before {
  left: 75%;
}

.ba-flip .tframe::after {
  left: 25%;
}

/* ---------------------------------------------------------
   Method pillars
   --------------------------------------------------------- */

.pillars {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .pillars {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pillar {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}

.pillar:hover {
  transform: translateY(-4px);
  border-color: var(--clay-soft);
  box-shadow: var(--shadow-md);
}

.pillar-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px 12px 12px 3px;
  background: var(--clay-soft);
  color: var(--clay-deep);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.pillar h3 {
  font-family: "Frank Ruhl Libre", serif;
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: .6rem;
}

.pillar p {
  color: var(--ink-soft);
  line-height: 1.75;
}

/* ---------------------------------------------------------
   Testimonials + surprise box (accordion)
   --------------------------------------------------------- */

/* Real WhatsApp screenshots, framed like prints pinned to a board */
.shots-lead {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 800px) {
  .shots-lead {
    grid-template-columns: repeat(2, 1fr);
  }
}

.shot {
  --tilt: 0deg;
  /* Compact on purpose — most visitors read these on a phone */
  max-width: 21rem;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: .9rem .9rem 1rem;
  box-shadow: var(--shadow-md);
  /* The reveal rules compose rotate(var(--tilt)) into their transforms,
     so the tilt survives the slide-in animation */
  transform: rotate(var(--tilt));
}

/* Opposite tilts so the pair reads like two prints, not a grid */
.shots-lead .shot:nth-child(odd),
.surprise-inner .shot:nth-child(odd) {
  --tilt: -1.2deg;
}

.shots-lead .shot:nth-child(even),
.surprise-inner .shot:nth-child(even) {
  --tilt: 1.2deg;
}

.shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: calc(var(--radius-lg) - 8px);
  border: 1px solid var(--line);
}

.shot figcaption {
  margin-top: .8rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.shot figcaption::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25D366; /* WhatsApp green — the "this is a real chat" cue */
  flex: 0 0 auto;
}

/* The "and there are plenty more" card inside the surprise panel */
.shot-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  min-height: 14rem;
  padding: 2rem 1.5rem;
  background: var(--shell);
  border: 2px dashed var(--clay-soft);
  border-radius: var(--radius-lg);
}

.shot-cta p {
  font-family: "Frank Ruhl Libre", serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  max-width: 16ch;
}

.shot-cta-ig {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  color: var(--clay-deep);
  transition: color .25s var(--ease);
}

.shot-cta-ig:hover {
  color: var(--ink);
}

.surprise {
  margin-top: 2rem;
}

.surprise-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  text-align: start;
  background:
    linear-gradient(135deg, rgba(168, 116, 107, .10), rgba(168, 116, 107, 0) 60%),
    var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.surprise-toggle:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.surprise-toggle-text {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.surprise-title {
  font-family: "Frank Ruhl Libre", serif;
  font-weight: 700;
  font-size: clamp(1.15rem, 1rem + .7vw, 1.45rem);
}

.surprise-sub {
  font-size: .92rem;
  color: rgba(255, 255, 255, .65);
}

.surprise-chevron {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--clay);
  color: #fff;
  transition: transform .4s var(--ease), background-color .3s var(--ease);
}

.surprise-toggle[aria-expanded="true"] .surprise-chevron {
  transform: rotate(180deg);
  background: var(--clay-deep);
}

/* The panel animates on max-height; JS sets the exact target height */
.surprise-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .6s var(--ease), opacity .45s var(--ease);
  opacity: 0;
}

.surprise-panel.is-open {
  opacity: 1;
}

.surprise-inner {
  display: grid;
  gap: 1.25rem;
  padding-top: 1.25rem;
}

@media (min-width: 700px) {
  .surprise-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1050px) {
  .surprise-inner {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------------------------------------------------------
   Lead form
   --------------------------------------------------------- */

.lead-form {
  /* Centered single card, exactly like the reference */
  max-width: 34rem;
  margin-inline: auto;
  background: var(--paper);
  color: var(--ink);
  /* Extra-round, like the reference form the client approved */
  border-radius: 28px;
  padding: clamp(1.75rem, 1rem + 2.5vw, 2.75rem);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 1.1rem;
}

.lead-form-title {
  /* Heavy sans, right-aligned — as in the reference */
  font-weight: 800;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem);
  text-align: start;
}

.lead-form-sub {
  text-align: start;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: .4rem;
}

/* The reference button is a soft rounded rectangle, not a pill */
.lead-form .btn {
  border-radius: 16px;
}

.hidden-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.field {
  display: grid;
  gap: .45rem;
}

.field label {
  font-size: .92rem;
  font-weight: 700;
}

.field-optional {
  font-weight: 400;
  color: var(--ink-soft);
}

.field input,
.field select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .85rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.field input::placeholder {
  color: #767066; /* 4.9:1 on the white input background — passes WCAG AA */
}

/* Chromium forces direction:ltr on tel inputs, which breaks the Hebrew
   placeholder ("מה המספר שלך?"). Typed digits still render correctly. */
.field input[type="tel"] {
  direction: rtl;
}

.field input:hover,
.field select:hover {
  border-color: var(--clay-soft);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(168, 116, 107, .16);
}

.field.has-error input,
.field.has-error select {
  border-color: #C0483F;
}

.field-error {
  display: none;
  font-size: .84rem;
  font-weight: 600;
  color: #C0483F;
}

.field.has-error .field-error {
  display: block;
}

/* Privacy consent row — text on the right, checkbox on the left (reference) */
.field-consent .consent {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .6rem;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}

.consent input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .12rem;
  flex: 0 0 auto;
  accent-color: var(--clay);
  cursor: pointer;
}

.consent a {
  color: var(--clay-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consent a:hover {
  color: var(--ink);
}

.form-note {
  font-size: .82rem;
  line-height: 1.6;
  color: var(--ink-soft);
  text-align: center;
}

.form-note i {
  color: var(--clay);
  margin-inline-end: .3rem;
}

/* Always rendered: an aria-live region only announces if the node is already
   in the accessibility tree, so it must never toggle from display:none.
   Empty it has zero height; the box styling arrives with the message. */
.form-status {
  display: block;
  border-radius: 10px;
  font-weight: 600;
  line-height: 1.6;
}

.form-status.is-visible {
  padding: .9rem 1rem;
}

.form-status.is-success {
  background: #EDF5EE;
  color: #256B39;
  border: 1px solid #C9E3CF;
}

.form-status.is-error {
  background: #FBEDEC;
  color: #9C382F;
  border: 1px solid #F0CFCC;
}

/* Submit button spinner */
.btn-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.is-sending .btn-spinner {
  display: block;
}

.is-sending {
  pointer-events: none;
  opacity: .85;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------------------------------------------------------
   Footer + WhatsApp
   --------------------------------------------------------- */

.site-footer {
  background: var(--shell);
  border-top: 1px solid var(--line);
  padding-block: 3rem 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }

  .footer-legal {
    grid-column: 1 / -1;
  }
}

.footer-line {
  margin-top: 1rem;
  color: var(--ink-soft);
  max-width: 34ch;
  line-height: 1.7;
}

.footer-contact {
  display: grid;
  gap: .8rem;
}

.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink-soft);
  font-weight: 600;
  transition: color .2s var(--ease);
}

.footer-contact a:hover {
  color: var(--clay-deep);
}

.footer-contact i {
  color: var(--clay);
  width: 1.1em;
}

.footer-privacy {
  grid-column: 1 / -1;
  font-size: .85rem;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 70ch;
}

.footer-privacy:focus {
  outline: none;
}

.footer-privacy strong {
  color: var(--ink);
}

.footer-credit {
  color: var(--clay-deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s var(--ease);
}

.footer-credit:hover {
  color: var(--ink);
}

.footer-legal {
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  font-size: .85rem;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------
   Reveal-on-scroll + hero load sequence
   --------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

/* Side entrances — "as you scroll, things move in": these come from the
   physical left and right edges of the screen (deliberate, not logical) */
.reveal.from-left {
  transform: translateX(-64px) rotate(var(--tilt, 0deg));
}

.reveal.from-right {
  transform: translateX(64px) rotate(var(--tilt, 0deg));
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal.is-visible.from-left,
.reveal.is-visible.from-right {
  transform: rotate(var(--tilt, 0deg));
}

/* If JS never runs, nothing may stay invisible. The marquee needs no
   fallback — its loop is pure CSS over statically duplicated cards. */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* Without JS the accordion can't open — hide the inert toggle and
   show the extra stories outright */
.no-js .surprise-toggle {
  display: none;
}

.no-js .surprise-panel {
  max-height: none;
  opacity: 1;
}

/* ---------------------------------------------------------
   Reduced motion — keep the page usable, drop the movement
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  /* The marquee stops moving, so let it be scrolled by hand instead */
  .marquee {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .marquee-track {
    animation: none;
  }

  .tcard {
    scroll-snap-align: center;
  }

  /* No curtain, no wait — straight into the content */
  .intro {
    display: none;
  }

  /* The static loop duplicates would read as repeats in a hand-scrolled list */
  .tcard[aria-hidden="true"] {
    display: none;
  }

  .marquee-hint {
    display: none;
  }
}
