/* ==========================================================================
   Home page — hero · stats · journey timeline · programs · hire band
               · urgency banner · digital-clinic teaser
   Built on tokens.css + the shared components; only page-specific layout here.
   ========================================================================== */

/* ---- Hero -------------------------------------------------------------- */
.hero,
.stats {
  --stats-overlap: 5rem;   /* how far the stats card climbs onto the hero */
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block:
    clamp(3rem, 1.5rem + 5vw, 5.3125rem)
    calc(var(--stats-overlap) + clamp(4.5rem, 1rem + 11vw, 10.875rem));
  color: var(--text-on-dark);
  text-align: center;
  /* the border hides the hairline a fractional hero height leaves under the wave */
  border-block-end: 2px solid var(--tint-cool);
  background:
    radial-gradient(ellipse 48% 70% at 80% 15%, color-mix(in srgb, var(--amber) 20%, transparent), transparent),
    radial-gradient(ellipse 52% 76% at 20% 80%, color-mix(in srgb, var(--burgundy) 32%, transparent), transparent),
    radial-gradient(ellipse 55% 110% at 50% 50%, var(--navy), var(--navy-mid) 68%, var(--navy-deep));
}
/* the photo starts under the sticky header, as in the design, so the same part of it stays in view */
.hero__photo {
  position: absolute;
  inset: calc(-1 * var(--header-h)) 0 0;
  z-index: -2;
  width: 100%;
  height: calc(100% + var(--header-h));
  object-fit: cover;
  object-position: 50% 0;
  opacity: .25;
}
/* burgundy wash + two soft ambient glows over the photo */
.hero::before {
  --glow-amber: color-mix(in srgb, var(--amber) 15%, transparent);
  --glow-burgundy: color-mix(in srgb, var(--burgundy) 25%, transparent);
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle 20rem at calc(100% - 14.5rem) 10rem, var(--glow-amber) 35%, transparent),
    radial-gradient(circle 24rem at 18rem calc(100% - 14rem), var(--glow-burgundy) 35%, transparent),
    color-mix(in srgb, var(--burgundy) 12.5%, transparent);
}
.hero__sparkle {
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.hero__sparkle--star {
  inset-block-start: 3.25rem;
  inset-inline-start: 12%;
  width: 2.625rem;
  height: 2.625rem;
  color: var(--amber);
  opacity: .4;
}
.hero__sparkle--diamond {
  inset-block-end: 9rem;
  inset-inline-end: 12%;
  width: 2.125rem;
  height: 2.125rem;
  color: var(--rose-pale);
  opacity: .35;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}
.hero__badge {
  gap: .625rem;
  letter-spacing: .025em;
  box-shadow: 0 0 20px color-mix(in srgb, var(--amber) 18%, transparent);
}
.hero__title {
  font-size: var(--fs-h1);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -.025em;
  text-wrap: balance;
  text-shadow:
    0 4px 3px color-mix(in srgb, black 7%, transparent),
    0 2px 2px color-mix(in srgb, black 6%, transparent);
}
.hero__lead {
  max-width: 46.25rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--text-on-navy) 90%, transparent);
  text-wrap: pretty;
}
.hero__cta {
  --btn-fg: var(--navy);
  margin-block-start: var(--sp-4);
  padding-inline: clamp(1.75rem, 8vw, 3rem);
  box-shadow:
    inset 0 0 0 1px var(--on-dark-20),
    0 10px 30px -5px color-mix(in srgb, var(--amber) 50%, transparent),
    0 0 22px color-mix(in srgb, var(--amber) 45%, transparent);
}
.hero__wave {
  position: absolute;
  inset-inline: 0;
  inset-block-end: -1px;
  z-index: -1;
  width: 100%;
  height: clamp(1.75rem, 4.9vw, 4.4rem);
  color: var(--tint-cool);
}

/* the text block enters once on load, one line after the other (120ms apart) */
@media (prefers-reduced-motion: no-preference) {
  .hero__content > * { animation: hero-in var(--t-slow) var(--ease) both; }
  .hero__content > :nth-child(2) { animation-delay: 120ms; }
  .hero__content > :nth-child(3) { animation-delay: 240ms; }
  .hero__content > :nth-child(4) { animation-delay: 360ms; }
  /* the two sparkles fade in last, softly */
  .hero__sparkle { animation: hero-sparkle calc(var(--t-reveal) * 1.4) var(--ease-soft) 480ms both; }
  @keyframes hero-in { from { opacity: 0; translate: 0 14px; filter: blur(4px); } }
  @keyframes hero-sparkle { from { opacity: 0; scale: .6; } }
}

/* ---- Trust stats ------------------------------------------------------- */
/* flow-root keeps the card's negative margin from pulling the section ground over the hero */
.stats {
  position: relative;
  z-index: 1;
  display: flow-root;
}
.stats__card {
  --container: 70.875rem;
  --glass: color-mix(in srgb, var(--surface) 90%, transparent);
  position: relative;
  margin-block-start: calc(-1 * var(--stats-overlap));
  padding: clamp(1.75rem, 1rem + 2.4vw, 2.5rem) clamp(1rem, .2rem + 2.6vw, 2.5rem);
  border: 1px solid var(--line-rose-strong);
  border-radius: var(--r-24);
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--burgundy) 6%, var(--glass)),
    color-mix(in srgb, var(--surface) 95%, transparent) 50%,
    color-mix(in srgb, var(--amber) 12%, var(--glass))
  );
  box-shadow: 0 20px 50px color-mix(in srgb, var(--burgundy) 9%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.stats__tag {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: clamp(1rem, 3vw, 2rem);
  translate: 0 -50%;
  padding: .375rem 1rem;
  background-image: var(--grad-burgundy);
  box-shadow: var(--sh-sm);
}
.stats__tag .badge__dot { background: var(--amber); }
.stats__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4) var(--sp-2);
}

.stat {
  --stat-accent: var(--burgundy);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--sp-3);
  text-align: center;
}
.stat--navy { --stat-accent: var(--navy); }
.stat__icon {
  margin-block-end: var(--sp-3);
  color: var(--stat-accent);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--amber) 20%, transparent),
    color-mix(in srgb, var(--stat-accent) 10%, transparent)
  );
  box-shadow: inset 0 2px 4px color-mix(in srgb, black 5%, transparent);
}
.stat__value {
  margin-block-end: var(--sp-1);
  font-size: var(--fs-stat);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.026em;
  color: var(--stat-accent);
}
.stat__label {
  font-size: var(--fs-18);
  font-weight: 700;
  line-height: 1.55;
  color: var(--ink);
}
.stat__note {
  font-size: var(--fs-14);
  line-height: 1.45;
}

@media (min-width: 45rem) {
  .stats__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(.5rem, 2.2vw, 2rem);
  }
  .stat + .stat { border-inline-start: 1px solid var(--line-rose); }
}

/* ---- Journey timeline -------------------------------------------------- */
.journey__head {
  max-width: 51rem;
  margin-block-end: clamp(2.5rem, 1rem + 5vw, 5rem);
}

.timeline {
  --node: 2.75rem;
  --timeline-shadow: 0 4px 20px color-mix(in srgb, black 4%, transparent);
  position: relative;
  display: grid;
  gap: clamp(1.5rem, .5rem + 4.4vw, 4rem);
  max-width: 54rem;
  margin-inline: auto;
  counter-reset: step;
}
/* side slides of the steps stay inside the section (no horizontal scroll while they fly in) */
.journey { overflow-x: clip; }
/* the spine (a real element, so it can draw itself): on the start side on phones, centred from tablet up */
.timeline__spine {
  position: absolute;
  inset-block: 1.5rem;
  inset-inline-start: calc(var(--node) / 2 - 2px);
  width: 4px;
  border-radius: var(--r-full);
  background: linear-gradient(var(--amber), var(--burgundy), var(--navy));
  opacity: .3;
}
.timeline__step {
  --step-tone: var(--burgundy);
  --step-icon: var(--step-tone);
  --step-line: var(--line-rose-strong);
  position: relative;
  display: grid;
  grid-template-columns: var(--node) minmax(0, 1fr);
  align-items: center;
  gap: var(--sp-4);
  counter-increment: step;
}
.timeline__step--cool {
  --step-tone: var(--navy);
  --step-icon: var(--navy-soft);
  --step-line: var(--line-cool);
}
.timeline__step--amber {
  --step-tone: var(--amber);
  --step-icon: var(--amber-ink);
  --step-line: var(--amber-line);
}
.timeline__step--bronze {
  --step-tone: var(--amber-ink);
  --step-line: var(--amber-line);
}

.timeline__node {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--node);
  height: var(--node);
  border-radius: var(--r-12);
  font-size: var(--fs-18);
  font-weight: 900;
  line-height: 1;
  color: var(--navy);
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: var(--sh-amber), 0 0 0 .5rem var(--tint-cool);   /* the ring cuts the spine around the node */
}
.timeline__node::before { content: counter(step, decimal-leading-zero); }
.timeline__node::after {
  content: "";
  position: absolute;
  inset-block-start: -.25rem;
  inset-inline-start: -.25rem;
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  background: var(--step-tone);
}

.timeline__card {
  gap: .625rem;
  padding: clamp(1.25rem, .8rem + 2vw, 2rem);
  border-color: var(--step-line);
  box-shadow: var(--timeline-shadow);
}
.timeline__card--final { box-shadow: var(--timeline-shadow), 0 0 0 2px var(--line-rose); }
.timeline__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.timeline__title { line-height: 1.5; }
.timeline__icon {
  font-size: 1.25rem;
  color: var(--step-icon);
}
.timeline__icon--amber { color: var(--amber); }
.timeline__text {
  font-size: var(--fs-14);
  line-height: 1.7;
}

@media (min-width: 48rem) {
  .timeline { --node: 3.5rem; }
  .timeline__spine { inset-inline-start: calc(50% - 2px); }
  .timeline__step {
    grid-template-columns: minmax(0, 1fr) var(--node) minmax(0, 1fr);
    gap: var(--sp-5);
  }
  .timeline__node {
    grid-area: 1 / 2;
    border-radius: var(--r-16);
    font-size: var(--fs-24);
  }
  .timeline__card { grid-area: 1 / 1; }
  /* the spine is the first child, so the steps at the odd positions 3 and 5 are the 2nd and 4th steps */
  .timeline__step:nth-child(odd) .timeline__card { grid-area: 1 / 3; }
}

/* ---- Programs ---------------------------------------------------------- */
.programs {
  background: linear-gradient(var(--navy-tint), var(--surface) 50%, var(--tint-cool));
  border-block: 1px solid var(--line-cool);
}
.programs__inner {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 1.5rem + 3.2vw, 4rem);
}
.programs__head { max-width: 43.5rem; }
.programs__more {
  --btn-fg: var(--burgundy-deep);
  --btn-bd: var(--burgundy-deep);
  align-self: center;
  min-height: 4rem;
  padding-inline: clamp(1.5rem, 8vw, 3rem);
  font-size: var(--fs-18);
  border-width: 2px;
  border-radius: var(--r-16);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--burgundy-deep) 12%, transparent);
}

/* two columns between 640 and 1024px: the third card would sit alone, so it is centred on its own row */
@media (min-width: 40.0625rem) and (max-width: 64rem) {
  .programs__grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - var(--sp-4));
  }
}

.program-card {
  height: 100%;
  border-color: color-mix(in srgb, var(--line-cool) 40%, transparent);
  box-shadow: 0 8px 30px color-mix(in srgb, black 4%, transparent);
}
.program-card__media {
  --media-ratio: 397 / 224;
  position: relative;
}
.program-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, color-mix(in srgb, black 60%, transparent), transparent 50%);
}
.program-card .card__footer { border-color: var(--line-cool); }

/* ---- Hire band --------------------------------------------------------- */
.hire {
  background: var(--gray);
  border-block-end: 1px solid var(--line-cool);
}
.hire__inner {
  display: grid;
  align-items: center;
  gap: var(--sp-10) var(--sp-8);
}
.hire__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-4);
}
.hire__cta {
  min-height: 3.25rem;
  margin-block-start: var(--sp-4);
}

/* four overlapping round portraits, placed as percentages of a square stage */
.hire__portraits {
  position: relative;
  width: min(100%, 20rem);
  aspect-ratio: 1;
  margin-inline: auto;
}
.hire__portrait {
  position: absolute;
  aspect-ratio: 1;
  overflow: hidden;
  border: 4px solid var(--amber);
  border-radius: 50%;
  box-shadow: var(--sh-lg);
}
.hire__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hire__portrait--a {
  inset-block-start: 0;
  inset-inline-end: 47.5%;
  width: 45%;
}
.hire__portrait--b {
  inset-block-start: 5%;
  inset-inline-end: 2.5%;
  width: 40%;
}
.hire__portrait--c {
  inset-block-start: 60%;
  inset-inline-end: 7.5%;
  width: 35%;
}
.hire__portrait--d {
  inset-block-start: 47.5%;
  inset-inline-end: 37.5%;
  width: 50%;
}

@media (min-width: 48rem) {
  .hire__inner { grid-template-columns: minmax(0, 1fr) clamp(15rem, 28vw, 20rem); }
  .hire__portraits { margin-block: var(--sp-4); }
}
@media (min-width: 80rem) {
  .hire__inner {
    column-gap: 0;
    padding-inline-end: var(--sp-20);
  }
}

/* ---- Urgency banner ---------------------------------------------------- */
.urgency { padding-block-start: var(--section-y); }
.urgency__card {
  --container: 74.625rem;
  --glow-white: color-mix(in srgb, var(--text-on-dark) 7%, transparent);
  --glow-amber: color-mix(in srgb, var(--amber) 10%, transparent);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6) var(--sp-8);
  padding: clamp(1.75rem, .9rem + 3.6vw, 3.5rem);
  color: var(--text-on-dark);
  border: 1px solid color-mix(in srgb, var(--text-on-dark) 16%, transparent);
  border-radius: var(--r-24);
  background:
    radial-gradient(circle 14rem at calc(100% - 5rem) 0, var(--glow-white) 30%, transparent),
    radial-gradient(circle 13rem at 11.5rem 100%, var(--glow-amber) 30%, transparent),
    linear-gradient(to right, var(--burgundy-deep), var(--burgundy) 50%, var(--burgundy-deep) 130%);
  box-shadow: 0 20px 50px color-mix(in srgb, var(--burgundy) 30%, transparent);
}
.urgency__body {
  flex: 1 1 28rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
  max-width: 50.5rem;
}
.urgency__badge {
  gap: var(--sp-2);
  padding-block: .375rem;
  color: var(--rose-pale);
  background: var(--on-dark-15);
  border-color: var(--on-dark-20);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.urgency__badge .badge__dot { background: var(--amber); }
.urgency__title {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.22;
}
.urgency__text {
  font-size: var(--fs-18);
  line-height: 1.55;
  color: color-mix(in srgb, var(--rose-pale) 90%, transparent);
}
.urgency__cta {
  width: 100%;
  padding-inline: 2.25rem;
  font-size: var(--fs-18);
  box-shadow: var(--sh-xl);
}
@media (min-width: 40rem) {
  .urgency__cta {
    width: auto;
    flex: none;
  }
}

/* ---- Digital-clinic teaser --------------------------------------------- */
.clinic { padding-block: clamp(3rem, 1.6rem + 5.2vw, 6.25rem) clamp(3rem, 2.2rem + 2.6vw, 4.125rem); }
.clinic__card {
  --container: 74.625rem;
  position: relative;
  overflow: clip;
  display: grid;
  align-items: center;
  gap: var(--sp-8);
  padding: clamp(2rem, 1.2rem + 3.4vw, 3.5rem) clamp(1.25rem, .2rem + 3.8vw, 3.5rem);
  border: 2px solid var(--line-rose-strong);
  border-radius: var(--r-24);
  background: linear-gradient(
    135deg,
    var(--tint-warm),
    var(--surface) 50%,
    color-mix(in srgb, var(--amber) 8%, var(--surface))
  );
  box-shadow: 0 20px 50px color-mix(in srgb, var(--burgundy) 8%, transparent);
}
.clinic__card::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-start: 0;
  height: .5rem;
  background: linear-gradient(to left, var(--burgundy), var(--amber), var(--navy));
}
.clinic__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-4);
}
.clinic__badge {
  gap: var(--sp-2);
  padding-block: .375rem;
  color: var(--burgundy-deep);
  border-color: color-mix(in srgb, var(--burgundy-deep) 20%, transparent);
  box-shadow: var(--sh-xs);
}
.clinic__badge .icon {
  font-size: .875rem;
  color: var(--amber);
}
.clinic__title {
  font-size: clamp(1.375rem, 1.1rem + 1.1vw, var(--fs-28));
  font-weight: 700;
  line-height: 1.43;
  color: var(--navy);
}
.clinic__text { line-height: 1.75; }
.clinic__cta {
  width: 100%;
  min-height: 3.5rem;
  margin-block-start: var(--sp-4);
  padding-inline: var(--sp-4);
  gap: var(--sp-3);
  white-space: normal;
  text-align: center;
  background-image: linear-gradient(to right, var(--burgundy-deep), var(--burgundy));
  box-shadow:
    0 4px 6px -4px color-mix(in srgb, var(--burgundy) 30%, transparent),
    0 10px 15px -3px color-mix(in srgb, var(--burgundy) 30%, transparent);
}

.clinic__features {
  display: grid;
  gap: .875rem;
}
.feature {
  --feature-line: var(--line-rose);
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  padding: var(--sp-5) .625rem;
  background: var(--surface);
  border: 1px solid var(--feature-line);
  border-radius: var(--r-16);
  box-shadow: var(--sh-xs);
}
.feature--cool { --feature-line: var(--line-cool); }
.feature--amber { --feature-line: var(--amber-line); }
.feature--amber .icon-tile { color: var(--amber-ink); }
.feature__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  min-width: 0;
}
.feature__title {
  font-size: var(--fs-16);
  font-weight: 400;
  line-height: 1.5;
  color: var(--navy);
}
.feature__text {
  font-size: var(--fs-14);
  line-height: 1.45;
}

@media (min-width: 40rem) {
  .clinic__cta {
    width: auto;
    padding-inline: var(--sp-8);
  }
}
@media (min-width: 64rem) {
  .clinic__card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 29.25rem);
    column-gap: var(--sp-10);
  }
}


/* ==========================================================================
   Motion (choreography of the scroll reveals; the shared system lives in components.css)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* programs: three cards fall one after another, each with its own small tilt */
  .programs__grid > :nth-child(1) { --drop-tilt: -3deg; }
  .programs__grid > :nth-child(2) { --drop-tilt: 2deg; }
  .programs__grid > :nth-child(3) { --drop-tilt: -2deg; }

  /* journey: on phones every card comes from the same side (the spine's opposite) */
  @media (max-width: 47.99rem) {
    .js-ready .timeline__step[data-reveal]:not(.is-revealed) { translate: calc(var(--dir) * -48px) 0; }
  }
  /* the numbered nodes pop in after their card, with a small overshoot */
  .js-ready .timeline__node[data-reveal] {
    translate: none;
    scale: .35;
    transition:
      opacity var(--t-slow) var(--ease-soft),
      filter var(--t-slow) var(--ease-soft),
      scale calc(var(--t-reveal) * 1.15) var(--ease-drop);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .js-ready .timeline__node[data-reveal].is-revealed { scale: none; }

  /* hire band: portraits come in one after another (the shared stagger), the nearest one last */
  .js-ready .hire__portrait[data-reveal]:not(.is-revealed) { translate: 0 22px; scale: .6; }
}

/* ---- English (LTR) fixes ---------------------------------------------
   The shared sprite has only a left-pointing arrow (the RTL "forward"); in LTR it is mirrored. */
[dir="ltr"] .icon:not(.icon--back):has(> use[href="#i-arrow-left"]) { scale: -1 1; }
