/* =============================================================================
   YesBOS 2.0 — Homepage sections
   Section-scoped styles that build on design-system.css.
   § HERO
   ============================================================================= */

/* ------------------------------------------------------------------- § HERO */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(3rem, 1.5rem + 6vw, 5.5rem);
  align-items: center;
  padding-block: clamp(4.5rem, 3rem + 6vw, 9rem) clamp(4.5rem, 3rem + 5vw, 7.5rem);
}
@media (min-width: 940px) {
  .hero__inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

/* --- Backdrop: a calm, near-white field with the faintest brand wash --- */
.hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__bg::before {
  /* soft light pooling from the upper-right, where the mark sits */
  content: "";
  position: absolute; inset: -10% -10% auto auto;
  width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(closest-side,
    color-mix(in srgb, var(--emerald) 12%, transparent),
    transparent 72%);
  filter: blur(6px);
  opacity: .7;
}
.hero__bg::after {
  /* barely-there horizon wash grounding the section */
  content: "";
  position: absolute; inset: auto 0 0 0; height: 42%;
  background: linear-gradient(to bottom, transparent, var(--forest-wash));
}
/* ultra-subtle dot grid, masked so it fades out */
.hero__grid-lines {
  position: absolute; inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--forest) 16%, transparent) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 72% 34%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse 70% 60% at 72% 34%, #000 0%, transparent 70%);
  opacity: .5;
}

/* --- Copy --- */
.hero__eyebrow { margin-bottom: var(--sp-5); }
.hero__title {
  font-size: clamp(2.3rem, 1.7rem + 2.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.hero__title .accent { color: var(--forest); }
.hero__lead { margin-top: var(--sp-5); max-width: 30rem; font-size: var(--fs-lead); }
.hero__cta { margin-top: var(--sp-7); gap: var(--sp-4); }

.hero__note {
  margin-top: var(--sp-7);
  font-size: var(--fs-sm); color: var(--text-soft);
  letter-spacing: -0.005em;
}

/* --- Visual: a distilled product "moment" — connected → done → a checked answer --- */
.hero__visual { position: relative; display: grid; place-items: center; }
.hero__card {
  position: relative;
  width: min(100%, 440px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  --stagger: 0ms;
}
/* one-time, calm entrance (no infinite loops) */
@media (prefers-reduced-motion: no-preference) {
  .hero__card { animation: heroCardIn .7s var(--ease) both; }
  .hero__card > * { animation: heroRise .6s var(--ease) both; animation-delay: var(--stagger); }
  @keyframes heroCardIn { from { opacity: 0; transform: translateY(16px) scale(.99); } to { opacity: 1; transform: none; } }
  @keyframes heroRise   { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

.hero__card-top {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: var(--sp-4); border-bottom: 1px solid var(--mist);
  --stagger: 120ms;
}
.hero__card-brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--ink); font-size: var(--fs-sm); }
.hero__card-brand svg { width: 18px; height: 20px; overflow: visible; }
.hero__card-brand .stem { stroke: var(--grey); stroke-width: 22; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hero__card-brand .check { stroke: var(--emerald); stroke-width: 22; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hero__card-conn {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: var(--fs-xs); font-weight: 600; color: var(--forest);
  background: var(--forest-tint); border-radius: var(--r-full); padding: .3rem .7rem;
}
.hero__card-conn .dot { width: .45rem; height: .45rem; border-radius: 50%; background: var(--emerald); }

/* Cross-business workspace list — items across every department, all organised */
.hero__card-list { list-style: none; padding: var(--sp-5) 0; margin: 0; display: flex; flex-direction: column; gap: var(--sp-4); --stagger: 200ms; }
.hero__card-list li { display: flex; align-items: center; gap: .7rem; font-size: var(--fs-sm); color: var(--ink); }
/* each row eases in slightly later than the last — you watch work being organised */
.hero__card-list li:nth-child(1){ --stagger: 220ms; }
.hero__card-list li:nth-child(2){ --stagger: 300ms; }
.hero__card-list li:nth-child(3){ --stagger: 380ms; }
.hero__card-list li:nth-child(4){ --stagger: 460ms; }
.hero__card-list li:nth-child(5){ --stagger: 540ms; }
.hero__card-list .chk {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--forest-tint); color: var(--forest);
  display: grid; place-items: center;
}
.hero__card-list .chk svg { width: 12px; height: 12px; }
.hero__card-list .lab { font-weight: 500; }
.hero__card-list .tag {
  margin-left: auto; font-size: 0.6875rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-soft);
}

.hero__card-foot {
  margin-top: var(--sp-2); padding-top: var(--sp-4); border-top: 1px solid var(--mist);
  display: flex; align-items: center; gap: .5rem;
  font-size: var(--fs-sm); font-weight: 600; color: var(--forest); --stagger: 620ms;
}
.hero__card-foot svg { flex: none; width: 16px; height: 16px; color: var(--emerald); }

/* a soft brand halo behind the card, grounding it */
.hero__visual::before {
  content: ""; position: absolute; z-index: -1;
  width: 78%; height: 78%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--emerald) 14%, transparent), transparent 70%);
  filter: blur(30px);
}

/* =============================================================================
   § UNDERSTANDING — the signature scroll-driven story
   Scattered business information drifts into the YesBOS workspace and resolves
   to organised understanding. Scroll-scrubbed; static end-state fallback.
   Design intent: recognisable as YesBOS even without the logo. Calm, software-
   like, never an "AI glowing orb".
   ============================================================================= */
.know { position: relative; background: var(--forest-wash); }

/* The one line that lingers — a held breath between the animation and the steps.
   Shares the wash background so the join is invisible. */
.clarity { background: var(--forest-wash); }
.clarity .container { min-height: 62vh; display: grid; place-items: center; text-align: center; padding-block: var(--sp-8); }
.clarity__line {
  font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3.1rem);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.12;
  color: var(--ink); text-wrap: balance; max-width: 18ch;
}

/* Live (JS + motion allowed): a tall scroll track with a pinned scene.
   Deliberately long so the sequence feels unhurried, almost meditative. */
.know.is-live { min-height: 460vh; padding: 0; }
.know.is-live .know__sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(1.5rem, 1rem + 2vw, 3rem); overflow: hidden; }

/* Static fallback (reduced-motion / no-JS): a normal section showing the end state. */
.know.is-static { padding-block: var(--section-y); }
.know.is-static .know__sticky { position: static; height: auto; gap: var(--sp-7); }
.know.is-static .know-chip { display: none; }
.know.is-static .know-stage { height: auto; min-height: 0; display: flex; justify-content: center; }
.know.is-static .know-card { position: static !important; transform: none !important; margin-inline: auto; }

/* --- Centred narrative --- */
.know__head { max-width: 40rem; margin-inline: auto; text-align: center; }
.know__head h2 { margin-top: var(--sp-3); }
.know__head .lead { margin-top: var(--sp-4); margin-inline: auto; }

/* --- Full-width convergence stage --- */
.know-stage { position: relative; width: 100%; max-width: var(--content); height: clamp(320px, 42vh, 430px); }

/* Scattered information chips — they travel in the open, then tuck behind the
   card as they are absorbed (z below the card). */
.know-chip {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: .55rem .85rem; box-shadow: var(--shadow-md);
  font-size: var(--fs-sm); font-weight: 500; color: var(--ink); white-space: nowrap;
  will-change: transform, opacity; transform: translate(-50%,-50%);
}
.know-chip svg { width: 15px; height: 15px; color: var(--text-soft); flex: none; }

/* The YesBOS workspace card — the destination */
.know-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(320px, 90%);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: var(--sp-5) var(--sp-5) var(--sp-4);
  z-index: 2; will-change: transform;
}
.know-card__top { display: flex; align-items: center; gap: .5rem; padding-bottom: var(--sp-3); border-bottom: 1px solid var(--mist); }
.know-card__top svg { width: 18px; height: 20px; overflow: visible; }
.know-card__top .stem { stroke: var(--grey); stroke-width: 22; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.know-card__top .check { stroke: var(--emerald); stroke-width: 22; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.know-card__top b { font-size: var(--fs-sm); font-weight: 700; }
.know-card__title { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); margin-top: var(--sp-3); }

.know-rows { list-style: none; margin: var(--sp-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.know-rows li { display: flex; align-items: center; gap: .6rem; font-size: var(--fs-sm); color: var(--text-soft); transition: color .55s var(--ease); }
.know-rows .mark { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; transition: border-color .5s var(--ease), background .5s var(--ease); }
.know-rows .mark svg { width: 11px; height: 11px; color: #fff; opacity: 0; transform: scale(.3); transition: opacity .5s var(--ease), transform .55s cubic-bezier(.34,1.56,.64,1); }
.know-rows li.is-on { color: var(--ink); }
.know-rows li.is-on .mark { border-color: var(--emerald); background: var(--emerald); }
.know-rows li.is-on .mark svg { opacity: 1; transform: scale(1); }
/* the row itself gives a barely-there settle as it lands */
.know-rows li.is-on { animation: rowSettle .5s var(--ease); }
@keyframes rowSettle { 0% { transform: translateX(-2px); } 100% { transform: none; } }

.know-card__done {
  margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--mist);
  display: flex; align-items: center; gap: .5rem;
  font-size: var(--fs-sm); font-weight: 600; color: var(--forest);
  opacity: 0; transform: translateY(4px); transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.know-card__done svg { width: 16px; height: 16px; color: var(--emerald); }
.know-card__done.is-on { opacity: 1; transform: none; }

/* --- Horizontal progression stepper: Information → Understanding → Decisions → Confidence --- */
.know-stepper { position: relative; width: 100%; max-width: 660px; margin-inline: auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.know-stepper::before { content: ""; position: absolute; left: 12.5%; width: 75%; top: 11px; height: 2px; background: var(--line); }
.know-stepper__fill { position: absolute; left: 12.5%; top: 11px; height: 2px; width: 0; background: var(--emerald); transition: width .12s linear; }
.know-stepper li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: .7rem; text-align: center; }
.know-stepper .node { width: 24px; height: 24px; border-radius: 50%; background: var(--forest-wash); border: 2px solid var(--line); display: grid; place-items: center; transition: border-color .4s var(--ease); }
.know-stepper .node::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: transparent; transform: scale(.3); transition: background .4s var(--ease), transform .4s var(--ease); }
.know-stepper .label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-soft); transition: color .4s var(--ease); letter-spacing: -0.01em; padding-inline: .25rem; }
.know-stepper li.is-on .node { border-color: var(--emerald); }
.know-stepper li.is-on .node::after { background: var(--emerald); transform: scale(1); }
.know-stepper li.is-on .label { color: var(--ink); }
@media (max-width: 560px) { .know-stepper .label { font-size: var(--fs-xs); } }

/* The quiet bridge into the next section — appears only once everything settles */
.know__next {
  text-align: center; font-size: var(--fs-lead); font-weight: 500; color: var(--ink);
  letter-spacing: -0.01em; margin-top: var(--sp-2);
  opacity: 0; transform: translateY(6px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.know__next.is-on { opacity: 1; transform: none; }

/* Static end state: fill everything in */
.know.is-static .know__next { opacity: 1; transform: none; }
.know.is-static .know-rows li { color: var(--ink); }
.know.is-static .know-stepper li .node { border-color: var(--emerald); }
.know.is-static .know-stepper li .node::after { background: var(--emerald); transform: scale(1); }
.know.is-static .know-stepper li .label { color: var(--ink); }
.know.is-static .know-stepper__fill { width: 75% !important; }
.know.is-static .know-rows li .mark { border-color: var(--emerald); background: var(--emerald); }
.know.is-static .know-rows li .mark svg { opacity: 1; transform: scale(1); }
.know.is-static .know-card__done { opacity: 1; transform: none; }

/* =============================================================================
   § WHAT HAPPENS NEXT — three quiet steps. No diagrams, no paragraphs.
   The homepage gets calmer here, on purpose.
   ============================================================================= */
.steps { background: var(--surface); }
.steps__grid { margin-top: var(--sp-7); }
.step-card {
  position: relative; padding: var(--sp-6) 0 0;
  border-top: 2px solid var(--line);
  transition: border-color var(--dur) var(--ease);
}
.step-card:hover { border-color: var(--emerald); }
.step-card__n {
  font-size: var(--fs-sm); font-weight: 600; color: var(--emerald);
  letter-spacing: .04em; font-variant-numeric: tabular-nums;
}
.step-card h3 { margin-top: var(--sp-4); font-size: var(--fs-h3); font-weight: 700; }
.step-card p { margin-top: var(--sp-3); color: var(--text-muted); font-size: var(--fs-body); max-width: 22rem; }

/* =============================================================================
   § BUILT ON TRUST — a quiet divider. Confidence, not compliance.
   No badges, no logos, no numbers.
   ============================================================================= */
.trust { background: var(--forest-wash); }
.trust__head { text-align: center; max-width: 34rem; margin-inline: auto; }
.trust__row {
  margin-top: var(--sp-7);
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: var(--sp-4) clamp(1.5rem, 1rem + 2vw, 3.5rem);
}
.trust__item { display: inline-flex; align-items: center; gap: .6rem; font-size: var(--fs-body); font-weight: 500; color: var(--ink); }
.trust__item svg { flex: none; width: 18px; height: 18px; color: var(--emerald); }

/* =============================================================================
   § FINAL — end on an idea, not a pitch. Calm, dark, spacious.
   ============================================================================= */
.final { background: var(--night); color: #fff; }
.final__inner { text-align: center; max-width: 40rem; margin-inline: auto; padding-block: clamp(1rem, 0.5rem + 2vw, 2.5rem); }
.final h2 {
  color: #fff; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); font-weight: 800;
  line-height: 1.1; letter-spacing: -0.03em; text-wrap: balance;
}
.final p { margin-top: var(--sp-5); color: var(--on-dark); font-size: var(--fs-lead); }
.final .btn { margin-top: var(--sp-7); }
.final__avail { margin-top: var(--sp-6); display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; font-size: var(--fs-sm); color: var(--on-dark); }
.final .final__philo { margin-top: var(--sp-5); font-size: var(--fs-sm); color: var(--on-dark-soft); max-width: 34rem; margin-inline: auto; text-wrap: pretty; }
.final__philo em { font-style: normal; font-weight: 600; color: var(--emerald); }
