/* story.css — production My Story page, Forge design system. */
body.story-page {
  --s-ink: #f4f1ea;
  --s-muted: #bcc5c2;
  --s-line: rgba(188, 197, 194, 0.18);
  --s-card: #151b1d;
  --s-card-strong: #1b2325;
  --s-accent: #bd452f;
  --s-accent-2: #8db7b3;
  --s-brass: #cfb772;
  --s-radius: 18px;
  --s-shadow: 0 22px 58px rgba(0, 0, 0, 0.34);
  --s-serif: var(--font-sans);
  background:
    radial-gradient(circle at 18% 7%, rgba(207, 183, 114, 0.035), transparent 34rem),
    radial-gradient(circle at 84% 28%, rgba(141, 183, 179, 0.025), transparent 40rem),
    linear-gradient(180deg, #0b1112 0%, #070b0c 58%, #040607 100%);
}
body.story-page::before { display: none; }
.story-page .s-container { width: min(1080px, calc(100% - 48px)); margin-inline: auto; }
.story-page main p a, .story-page main li a { text-decoration: underline; text-underline-offset: .18em; }

.s-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 44px; padding: .85rem 1.25rem;
  border: 1px solid var(--s-line); border-radius: 9px;
  font-weight: 760; text-align: center; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.s-btn:hover { transform: translateY(-2px); text-decoration: none; }
.s-btn-primary { background: var(--s-accent); border-color: var(--s-accent); color: #fff; }
.s-btn-primary:hover, .s-btn-primary:focus-visible { background: #ca4c36; border-color: #ca4c36; color: #fff; box-shadow: 0 12px 24px rgba(0,0,0,.28); }
.s-btn-secondary { background: var(--s-card); border-color: #657679; color: var(--s-ink); }
.s-btn-secondary:hover, .s-btn-secondary:focus-visible { background: var(--s-card-strong); border-color: var(--s-accent-2); color: var(--s-ink); }

.s-hero { position: relative; overflow: hidden; padding: clamp(1.4rem, 2.8vw, 2.5rem) 0 clamp(2.4rem, 4.5vw, 4rem); }
.s-hero::after { content: ""; position: absolute; inset: 10% -12% auto auto; width: 42vw; height: 42vw; border-radius: 50%; background: radial-gradient(circle, rgba(141,183,179,.04), transparent 68%); pointer-events: none; }
.s-hero-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(340px,.75fr); gap: clamp(1.5rem,4vw,3.5rem); align-items: center; }
.s-eyebrow, .s-chapter .eyebrow { display: inline-flex; align-items: center; gap: .6rem; color: var(--s-brass); font-size: .78rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.s-eyebrow::before, .s-chapter .eyebrow::before { content: ""; width: 2.75rem; height: 1px; background: var(--s-accent); }
.s-title { margin: 1rem 0 1.2rem; color: var(--s-ink); font-family: var(--font-sans); font-size: clamp(3rem,5.8vw,5.4rem); font-weight: 720; line-height: .96; letter-spacing: -.045em; text-wrap: balance; }
.s-kicker { max-width: 720px; margin: 0; color: #e2dfd8; font-size: clamp(1.1rem,2vw,1.38rem); line-height: 1.48; }
.s-byline { display: flex; align-items: center; gap: .85rem; margin-top: 1.45rem; }
.s-byline img { width: 54px; height: 54px; border: 1px solid var(--s-line); border-radius: 50%; object-fit: cover; }
.s-byline .name { color: var(--s-ink); font-weight: 800; }
.s-byline .role { color: var(--s-muted); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.s-credential { padding: 1.1rem; border: 1px solid var(--s-line); border-radius: var(--s-radius); background: var(--s-card); box-shadow: var(--s-shadow); }
.s-stack { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.s-stack figure { position: relative; aspect-ratio: 4/3; margin: 0; overflow: hidden; border-radius: 11px; background: var(--color-bg-alt); }
.s-stack img { width: 100%; height: 100%; object-fit: cover; object-position: top center; filter: saturate(.9) contrast(1.035); }
.s-stack figcaption { position: absolute; left: .75rem; bottom: .75rem; right: auto; width: fit-content; max-width: calc(100% - 1.5rem); padding: .5rem .8rem; border: 1px solid rgba(255,255,255,.10); border-left: 2px solid var(--s-accent); border-radius: 12px; background: rgba(7,11,12,.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 10px 24px rgba(0,0,0,.28); color: var(--s-ink); font-size: .72rem; line-height: 1.2; font-weight: 840; text-wrap: balance; }

.s-chapternav { position: sticky; top: calc(var(--nav-height) + .6rem); z-index: 10; display: flex; justify-content: center; gap: .45rem; width: min(760px, calc(100% - 28px)); margin: 0 auto; padding: .55rem; border: 1px solid var(--s-line); border-radius: 12px; background: rgba(11,17,18,.97); box-shadow: 0 14px 34px rgba(0,0,0,.25); }
.s-chapternav a { display: inline-flex; align-items: center; gap: .45rem; min-height: 42px; padding: .5rem .8rem; border: 1px solid transparent; border-radius: 7px; color: var(--s-muted); font-size: .86rem; font-weight: 750; text-decoration: none; }
.s-chapternav a:hover, .s-chapternav a:focus-visible { border-color: var(--s-line); background: var(--s-card); color: var(--s-ink); }
.s-chapternav a.active { border-color: var(--s-accent); background: rgba(189,69,47,.17); color: var(--s-ink); }
.s-chapternav .num { color: var(--s-brass); font-weight: 900; }

.s-quick { width: min(960px, calc(100% - 48px)); margin: clamp(2.5rem,5vw,4rem) auto; padding: clamp(1.4rem,3vw,2.2rem); border: 1px solid var(--s-line); border-left: 4px solid var(--s-accent); border-radius: 16px; background: var(--s-card-strong); box-shadow: 0 18px 44px rgba(0,0,0,.25); }
.s-quick h2 { margin: 0 0 1.2rem; font-size: clamp(1.8rem,3vw,2.6rem); }
.s-quick ul { display: grid; gap: .95rem; margin: 0; padding: 0; list-style: none; }
.s-quick li { position: relative; padding-left: 1.4rem; color: var(--s-muted); line-height: 1.68; }
.s-quick li::before { content: ""; position: absolute; top: .68rem; left: 0; width: .48rem; height: .48rem; border-radius: 50%; background: var(--s-accent-2); }
.s-quick strong { color: var(--s-ink); }
.s-quick .personal { margin: 1.3rem 0 0; padding: 1rem 1.1rem; border: 1px solid var(--s-line); border-radius: 10px; background: var(--s-card); color: var(--s-muted); }
.s-quick .cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }

.s-chapter { scroll-margin-top: 145px; margin: clamp(3.5rem,7vw,6rem) 0 clamp(1.4rem,3vw,2.25rem); }
.s-chapter h2 { margin: .65rem 0 .35rem; font-size: clamp(2.45rem,5vw,4.5rem); line-height: .97; letter-spacing: -.045em; }
.s-chapter .sub { margin: 0; color: var(--s-muted); font-size: 1.02rem; font-weight: 650; }
.s-timeline { position: relative; display: grid; gap: 1.25rem; margin: 0 0 2rem; padding-left: 1.8rem; }
.s-timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: .26rem; width: 1px; background: linear-gradient(var(--s-accent), var(--s-accent-2)); opacity: .48; }
.s-item { position: relative; }
.s-dot { position: absolute; top: 1.6rem; left: -1.78rem; width: .58rem; height: .58rem; border: 2px solid #070b0c; border-radius: 50%; background: var(--s-accent); box-shadow: 0 0 0 3px rgba(189,69,47,.18); }
.s-card { padding: clamp(1.2rem,2.6vw,1.8rem); border: 1px solid var(--s-line); border-radius: 15px; background: var(--s-card); box-shadow: 0 14px 34px rgba(0,0,0,.22); }
.s-year { display: inline-block; margin-bottom: .65rem; color: var(--s-brass); font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.s-card h3 { margin: 0 0 .75rem; font-size: clamp(1.25rem,2.4vw,1.65rem); }
.s-card p { margin: 0 0 1rem; color: var(--s-muted); line-height: 1.74; }
.s-card p:last-child { margin-bottom: 0; }
.s-card a { color: var(--s-accent-2); }
.s-impact { margin-top: 1rem; padding: .9rem 1rem; border-left: 3px solid var(--s-accent); border-radius: 0 8px 8px 0; background: var(--s-card-strong); color: var(--s-muted); }
.s-impact strong { color: var(--s-ink); }
.s-media-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: .85rem; margin: 1.2rem 0 .15rem; }
.s-media { position: relative; height: 280px; margin: 0; overflow: hidden; border: 1px solid var(--s-line); border-radius: 12px; background: #0b1112; }
.s-media img { width: 100%; height: 100%; object-fit: contain; }
.s-media .caption { position: absolute; left: .85rem; bottom: .85rem; right: auto; width: fit-content; max-width: calc(100% - 1.7rem); padding: .56rem .88rem; border: 1px solid rgba(255,255,255,.10); border-left: 2px solid var(--s-accent); border-radius: 12px; background: rgba(7,11,12,.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 12px 28px rgba(0,0,0,.30); color: var(--s-ink); font-size: .82rem; line-height: 1.24; font-weight: 820; text-wrap: balance; }
.s-video { display: block; position: relative; width: 100%; height: 100%; }
.s-video img { width: 100%; height: 100%; object-fit: cover; }
.s-video .play { position: absolute; inset: 0; display: grid; width: 54px; height: 54px; margin: auto; place-items: center; border-radius: 50%; background: var(--s-accent); color: #fff; font-size: 1.1rem; box-shadow: 0 12px 28px rgba(0,0,0,.35); }
.s-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.s-badge { display: inline-flex; align-items: center; gap: .4rem; padding: .38rem .62rem; border: 1px solid var(--s-line); border-radius: 7px; background: var(--s-card-strong); color: var(--s-muted); font-size: .76rem; font-weight: 750; }
.s-badge .emoji { font-size: .92rem; }

.s-vision { margin: clamp(3.5rem,7vw,6rem) 0; padding: clamp(1.6rem,4vw,3rem); border: 1px solid var(--s-line); border-radius: 17px; background: var(--s-card-strong); text-align: center; }
.s-vision h2 { margin: 0 0 .8rem; font-size: clamp(2.2rem,4.8vw,4rem); }
.s-vision > p { max-width: 760px; margin: 0 auto; color: var(--s-muted); line-height: 1.78; }
.s-vision .s-media-grid { grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 620px; margin: 1.8rem auto 1.4rem; }
.s-vision .s-media { height: 240px; }
.s-final { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem; margin: clamp(3rem,6vw,5rem) 0; padding: clamp(1.8rem,4vw,3.4rem); border: 1px solid var(--s-line); border-left: 4px solid var(--s-accent); border-radius: 17px; background: linear-gradient(135deg,var(--s-card-strong),var(--color-bg-alt)); box-shadow: var(--s-shadow); }
.s-final h2 { margin: 0 0 .75rem; font-size: clamp(2.2rem,5vw,4.2rem); line-height: .96; letter-spacing: -.045em; }
.s-final p { max-width: 620px; margin: 0; color: var(--s-muted); line-height: 1.7; }

@media (hover:hover) and (prefers-reduced-motion:no-preference) { .s-card { transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; } .s-card:hover { border-color: rgba(189,69,47,.46); transform: translateY(-3px); box-shadow: var(--s-shadow); } }
@media (max-width: 900px) { .s-hero-grid, .s-final { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .story-page .s-container { width: min(100% - 28px,1080px); }
  .s-hero { padding: 1.2rem 0 2rem; }
  .s-hero::after { display: none; }
  .s-title { font-size: clamp(2.65rem,12vw,4rem); }
  .s-credential { padding: .8rem; border-radius: 14px; }
  .s-stack { gap: .55rem; }
  .s-stack figure { border-radius: 9px; }
  .s-chapternav { justify-content: flex-start; overflow-x: auto; top: calc(var(--nav-height) + .35rem); }
  .s-chapternav a { white-space: nowrap; }
  .s-quick { width: min(100% - 28px,960px); padding: 1.15rem; }
  .s-quick .cta { display: grid; grid-template-columns: 1fr; }
  .s-btn { width: 100%; }
  .s-timeline { padding-left: 1.35rem; }
  .s-dot { left: -1.34rem; }
  .s-card { padding: 1.1rem; border-radius: 12px; }
  .s-media-grid, .s-vision .s-media-grid { grid-template-columns: 1fr; }
  .s-media { height: 230px; }
  .s-stack figcaption,
  .s-media .caption { left: .65rem; bottom: .65rem; max-width: calc(100% - 1.3rem); padding: .48rem .72rem; font-size: .76rem; }
  .s-final { padding: 1.25rem; border-radius: 13px; }
}
@media (max-width: 430px) { .s-stack { grid-template-columns: 1fr; } .s-stack figure { min-height: 190px; } }
@media (forced-colors:active) { .s-btn, .s-card, .s-quick, .s-credential, .s-final { border: 1px solid CanvasText; } }

/* =====================================================================
   V5 HERO AND NEURAL REFINEMENTS
   Controlled two-line heading aligned with the homepage treatment.
   ===================================================================== */
body.story-page {
  --neural-opacity: 0.23;
  --neural-intensity: 1;
}
.s-hero .s-container { width: min(1280px, calc(100% - 48px)); }
.s-hero-grid { grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: clamp(1.5rem, 3.4vw, 3rem); }
.s-title { margin: 1rem 0 1.25rem; font-size: inherit; line-height: .97; text-wrap: initial; }
.s-title-primary,
.s-title-secondary { display: block; }
.s-title-primary {
  white-space: nowrap;
  color: var(--s-ink);
  font-size: clamp(3rem, 4.6vw, 4.75rem);
  font-weight: 720;
  line-height: 1;
  letter-spacing: -.042em;
}
.s-title-secondary {
  margin-top: .10em;
  color: var(--s-accent-2);
  font-size: clamp(3rem, 4.7vw, 4.85rem);
  font-style: italic;
  font-weight: 390;
  line-height: .98;
  letter-spacing: -.045em;
}
@media (max-width: 1180px) {
  .s-title-primary { white-space: normal; }
}
@media (max-width: 680px) {
  .s-title-primary,
  .s-title-secondary { font-size: clamp(2.45rem, 10.5vw, 3.8rem); }
}


/* =====================================================================
   V8 MOBILE LAYOUT CORRECTIONS
   These rules intentionally appear last so desktop hero refinements do
   not override the single-column phone and tablet layouts.
   ===================================================================== */
@media (max-width: 980px) {
  .s-hero .s-container {
    width: min(760px, calc(100% - 36px));
  }

  .s-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
  }

  .s-hero-grid > * {
    min-width: 0;
    width: 100%;
  }

  .s-title-primary {
    white-space: normal;
  }

  .s-credential {
    width: 100%;
    max-width: 680px;
    justify-self: start;
  }
}

@media (max-width: 700px) {
  .s-hero .s-container,
  .story-page .s-container {
    width: calc(100% - 28px);
  }

  .s-hero {
    padding: 1.15rem 0 1.8rem;
  }

  .s-title {
    max-width: 100%;
    margin: .8rem 0 1rem;
  }

  .s-title-primary,
  .s-title-secondary {
    font-size: clamp(2.45rem, 12vw, 3.45rem);
    line-height: 1;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .s-title-secondary {
    margin-top: .12em;
  }

  .s-kicker {
    max-width: none;
    font-size: 1.05rem;
    line-height: 1.55;
  }

  .s-byline {
    max-width: 100%;
  }

  .s-credential {
    margin-top: .15rem;
  }

  .s-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .s-stack figure {
    min-width: 0;
    min-height: 0;
  }
}

@media (max-width: 430px) {
  .s-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .s-stack figure {
    min-height: 0;
  }

  .s-stack figcaption {
    left: .48rem;
    bottom: .48rem;
    max-width: calc(100% - .96rem);
    padding: .4rem .56rem;
    border-radius: 9px;
    font-size: .66rem;
  }
}
