/* =============================================================================
   Willow Ahrens — Portfolio
   Design tokens, typography, and motion.
   ===========================================================================*/

:root {
  --ink:        #14151A;   /* primary text / near-black            */
  --canvas:     #F6F5F1;   /* warm off-white page background       */
  --indigo:     #2330D6;   /* brand accent (your hex)              */
  --indigo-700: #1B22A6;   /* darker indigo for hover              */
  --mute:       #5B5E68;   /* secondary text (WCAG AA on canvas)   */
  --tint:       #E7E8FB;   /* periwinkle tint / soft blocks        */
  --line:       #E4E2DB;   /* hairline borders on canvas           */
  --white:      #FFFFFF;

  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----- Base ---------------------------------------------------------------- */
* { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html { scroll-behavior: smooth; }
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

/* ----- Type scale ---------------------------------------------------------- */
.font-display { font-family: "Bricolage Grotesque", "Inter", sans-serif; }
.font-serif   { font-family: "Fraunces", Georgia, serif; }

.display {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.03em;
  font-variation-settings: "wght" 800, "opsz" 36;
}

.eyebrow {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--indigo);
}

.serif-accent {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* fluid display sizes */
.t-hero  { font-size: clamp(2.9rem, 8.5vw, 6.6rem); }
.t-hero-home { font-size: clamp(2.4rem, 6.6vw, 5.2rem); }
/* full-height hero: content vertically centered, scroll cue pinned at the bottom */
.hero-full {
  position: relative; box-sizing: border-box;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 84px; padding-bottom: 100px;
}
/* nav logo mark: matches the height of the Let's Talk button (~56px) */
.nav-logo { display: block; height: 56px; width: auto; }
.nav-logo path { fill: var(--indigo); }
/* one-time wipe reveal on page load (not looping) — same solid-fill wipe technique as the about-page logo */
.nav-logo--reveal { clip-path: inset(0 100% 0 0); animation: navLogoReveal .9s var(--ease) forwards; animation-delay: 120ms; }
@keyframes navLogoReveal { to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) {
  .nav-logo--reveal { animation: none !important; clip-path: none !important; }
}

.hero-scroll {
  /* center with margin-auto (NOT translateX) because the .fade-up animation ends at
     transform:none and would wipe out a translateX, shoving the cue off-center */
  position: absolute; left: 0; right: 0; bottom: 30px; margin-inline: auto; width: max-content;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--mute); transition: color .25s var(--ease);
}
.hero-scroll:hover { color: var(--ink); }
.hero-scroll__label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; }
.hero-scroll__rule {
  position: relative; width: 64px; height: 1.5px; overflow: hidden;
  border-radius: 2px; background: rgba(20, 21, 26, 0.14);
}
.hero-scroll__rule::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 45%;
  border-radius: 2px; background: currentColor;
  animation: scrollRule 2.1s var(--ease) infinite;
}
@keyframes scrollRule {
  0%   { transform: translateX(-130%); }
  100% { transform: translateX(280%); }
}
.t-h1    { font-size: clamp(2.2rem, 5.2vw, 4rem); }
.t-h2    { font-size: clamp(1.7rem, 3.6vw, 2.7rem); }

/* body measure */
.measure { max-width: 64ch; }

/* ----- Links / buttons ----------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 600; font-size: 0.95rem; letter-spacing: -0.01em;
  padding: 0.85rem 1.4rem; border-radius: 999px;
  cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
  border: 1px solid transparent; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--indigo); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--white); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.link-underline {
  background-image: linear-gradient(var(--indigo), var(--indigo));
  background-size: 0% 1.5px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .35s var(--ease);
}
.link-underline:hover { background-size: 100% 1.5px; }

/* ----- Blinking type cursor (hero) ---------------------------------------- */
.type-cursor {
  width: 0.09em;
  align-self: stretch;            /* fill the highlight's full height = type height */
  margin-left: 0.07em;
  background: var(--ink);
  animation: blink 1.05s steps(1, end) infinite;
  animation-delay: 1.3s;
}
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* rotating highlighted word in the hero */
.typed-text {
  display: inline-flex;
  align-items: stretch;          /* cursor stretches to match the type */
  white-space: nowrap;
  color: var(--indigo);
  background: var(--tint);
  padding: 0.05em 0.14em;
  border-radius: 0.1em;
  line-height: 1;
}
/* zero-width spacer keeps the box height stable when the word is mid-transition (empty) */
.typed-text::before { content: "\200B"; }

/* ----- Focus (accessibility) ---------------------------------------------- */
:focus-visible { outline: 2.5px solid var(--indigo); outline-offset: 3px; border-radius: 4px; }

/* ----- Media / cover placeholders ----------------------------------------- */
.media-frame {
  position: relative; overflow: hidden; background: var(--tint);
  border-radius: 14px;
}
.cover-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .8s var(--ease), opacity .6s var(--ease);
}
/* tasteful gradient placeholder shown when an image is missing */
.media-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(120% 120% at 0% 0%, var(--tint) 0%, transparent 60%),
    radial-gradient(120% 120% at 100% 100%, #DFE0F7 0%, transparent 55%),
    linear-gradient(135deg, #EEEDE7, #E7E8FB);
  color: var(--mute);
}
.media-fallback span {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700;
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; opacity: .7;
}

/* ----- Cards --------------------------------------------------------------- */
/* covers that should show in full (e.g. detailed data-viz) rather than crop */
.cover-img.cover-contain { object-fit: contain; }
.media-frame.frame-contain { background: #fff; }

.work-card { cursor: pointer; }
.work-card .media-frame { aspect-ratio: 4/3; }
.work-card:hover .cover-img { transform: scale(1.045); }
.work-card .view-pill {
  position: absolute; left: 14px; bottom: 14px;
  background: var(--white); color: var(--ink);
  font-size: .8rem; font-weight: 600; padding: .45rem .85rem; border-radius: 999px;
  display: inline-flex; align-items: center; gap: .4rem;
  opacity: 0; transform: translateY(8px); transition: opacity .3s var(--ease), transform .3s var(--ease);
  box-shadow: 0 6px 20px rgba(20,21,26,.12);
}
.work-card:hover .view-pill { opacity: 1; transform: translateY(0); }

/* ----- Work page: large case-study cards (full-bleed cover + adaptive scrim) - */
.cs-card {
  position: relative; display: flex; align-items: center; overflow: hidden;
  min-height: 460px; border-radius: 26px; border: 1px solid var(--line); isolation: isolate;
}
/* home page cards are taller than the Work-page ones */
[data-featured-grid] .cs-card { min-height: 580px; }
.cs-card__bg {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .7s var(--ease);
}
.cs-card:hover .cs-card__bg { transform: scale(1.045); }
.cs-card__scrim { position: absolute; inset: 0; z-index: 1; }
/* light covers → canvas scrim + ink text; dark covers → ink scrim + canvas text */
.cs-card--light .cs-card__scrim {
  background: linear-gradient(100deg, var(--canvas) 0%, rgba(246,245,241,.94) 32%, rgba(246,245,241,.6) 54%, rgba(246,245,241,0) 80%);
}
.cs-card--dark .cs-card__scrim {
  background: linear-gradient(100deg, var(--ink) 0%, rgba(20,21,26,.92) 32%, rgba(20,21,26,.58) 54%, rgba(20,21,26,0) 80%);
}
.cs-card--light { color: var(--ink); }
.cs-card--dark { color: var(--canvas); }
.cs-card__body {
  position: relative; z-index: 2; display: flex; flex-direction: column;
  max-width: min(600px, 62%); padding: clamp(30px, 4vw, 56px);
}
.cs-card__eyebrow {
  display: flex; align-items: center; gap: 16px; margin-bottom: 22px;
  font-size: .74rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: inherit;
}
.cs-card__eyebrow::after { content: ""; flex: 1; height: 1px; max-width: 200px; background: currentColor; opacity: .35; }
.cs-card__title {
  font-size: clamp(1.55rem, 3vw, 2.45rem); line-height: 1.12; letter-spacing: -.02em;
  margin-bottom: 16px; max-width: 15ch;
}
.cs-card__summary { font-size: 1rem; line-height: 1.6; max-width: 42ch; margin-bottom: 22px; }
.cs-card--light .cs-card__summary { color: var(--mute); }
.cs-card--dark .cs-card__summary { color: rgba(246,245,241,.82); }
.cs-card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.cs-card__tag {
  font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: .34rem .72rem; border-radius: 999px; border: 1px solid;
}
.cs-card--light .cs-card__tag { border-color: rgba(20,21,26,.22); color: var(--ink); }
.cs-card--dark .cs-card__tag { border-color: rgba(246,245,241,.32); color: var(--canvas); }
.cs-card__btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 9px;
  font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: .82rem 1.55rem; border-radius: 999px; border: 1.5px solid currentColor;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.cs-card--light:hover .cs-card__btn { background: var(--ink); color: var(--canvas); }
.cs-card--dark:hover .cs-card__btn { background: var(--canvas); color: var(--ink); }
@media (max-width: 720px) {
  .cs-card { min-height: 480px; align-items: flex-end; }
  .cs-card__body { max-width: 100%; }
  .cs-card--light .cs-card__scrim {
    background: linear-gradient(to top, var(--canvas) 24%, rgba(246,245,241,.82) 52%, rgba(246,245,241,0) 88%);
  }
  .cs-card--dark .cs-card__scrim {
    background: linear-gradient(to top, var(--ink) 24%, rgba(20,21,26,.8) 52%, rgba(20,21,26,0) 88%);
  }
}

/* ----- Tag chips ----------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center;
  font-size: .76rem; font-weight: 500; color: var(--mute);
  border: 1px solid var(--line); padding: .3rem .7rem; border-radius: 999px;
  background: var(--white);
}

/* ----- Nav ----------------------------------------------------------------- */
.nav-link { color: var(--ink); font-weight: 500; font-size: 1.05rem; opacity: .8; transition: opacity .2s var(--ease); }
.nav-link:hover, .nav-link.active { opacity: 1; }
.nav-link.active { color: var(--indigo); }

.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding-top: 26px; padding-bottom: 26px;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), backdrop-filter .3s var(--ease);
}
/* nav's own Let's talk button is bigger than the site-wide .btn-primary default */
.site-nav .btn-primary { padding: 0.9rem 1.6rem; font-size: 0.95rem; }
.site-nav.scrolled {
  background: rgba(246,245,241,.82);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}


/* ----- Scroll reveal ------------------------------------------------------- */
[data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* hero entrance */
.hero-line { display: block; overflow: hidden; }
.hero-line > span {
  display: block; transform: translateY(110%);
  animation: rise 1s var(--ease) forwards; animation-delay: var(--d, 0ms);
}
@keyframes rise { to { transform: translateY(0); } }
.fade-up { opacity: 0; animation: fadeUp .9s var(--ease) forwards; animation-delay: var(--d, 0ms); }
@keyframes fadeUp { to { opacity: 1; transform: none; } from { opacity: 0; transform: translateY(16px); } }

/* ----- Case-study media gallery -------------------------------------------- */
.cs-media-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .cs-media-grid.is-multi { grid-template-columns: repeat(var(--cols, 2), 1fr); }
}
.cs-media { margin: 0; }
.cs-media--full { grid-column: 1 / -1; }
.cs-media--small { max-width: 480px; }
.cs-media--xs { max-width: 340px; }
.cs-media--xxs { max-width: 250px; }
/* method with image beside its text (text + limitations left, image right) */
.cs-method--aside { display: grid; grid-template-columns: 1fr; gap: 24px; }
.cs-method__aside .cs-media { margin: 0; }
@media (min-width: 768px) {
  /* bottom-align so each image's bottom edge meets its Limitations box */
  .cs-method--aside { grid-template-columns: 1fr 340px; gap: 36px; align-items: end; }
  .cs-method__aside .cs-media { margin: 0 0 0 auto; }
}

/* full-width single row of evenly-sized items */
.cs-row { display: grid; gap: 20px 24px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 560px) { .cs-row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cs-row { grid-template-columns: repeat(var(--cols, 4), 1fr); } }

/* vertical stack, centered */
.cs-stack { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.cs-stack > .cs-media { margin: 0; max-width: 100%; }

/* equal-height row: images share one height, widths follow their proportions */
.cs-erow > .cs-media { margin: 0; }
.cs-erow .flow-img { border-radius: 14px; }
@media (min-width: 1024px) {
  .cs-erow { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
  .cs-erow > .cs-media { flex: 0 0 auto; max-width: 100%; }
  .cs-erow .lightbox-trigger { display: inline-block; width: auto; }
  .cs-erow .media-frame { height: var(--erow-h, 420px); width: fit-content; }
  .cs-erow .flow-img { height: 100%; width: auto; }
}

/* masonry: balanced columns for images of differing heights */
.cs-masonry { columns: 1; column-gap: 24px; }
@media (min-width: 640px) { .cs-masonry { columns: var(--cols, 2); } }
.cs-masonry > .cs-media {
  break-inside: avoid; -webkit-column-break-inside: avoid;
  display: inline-block; width: 100%; margin: 0 0 24px;
}
.cs-media .lightbox-trigger { cursor: zoom-in; }
.cs-media .media-frame { background: var(--tint); }
/* case-study images flow at natural shape (no cropping of diagrams / maps) */
.cs-frame { min-height: 150px; }
.flow-img { width: 100%; height: auto; display: block; transition: opacity .6s var(--ease); }
.flow-video { width: 100%; height: auto; display: block; border-radius: 14px; background: #000; }

/* swipeable horizontal strip (linear workflows) */
.cs-strip-wrap { position: relative; }
.cs-strip {
  display: flex; gap: 16px; align-items: flex-start; overflow-x: auto;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  padding-bottom: 8px; scroll-padding-left: 0;
  scrollbar-width: thin;
}
.cs-strip > .cs-media { flex: 0 0 auto; width: 82%; scroll-snap-align: start; }
@media (min-width: 640px)  { .cs-strip > .cs-media { width: 52%; } }
@media (min-width: 1024px) { .cs-strip > .cs-media { width: 40%; } }
.cs-strip-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 999px;
  display: grid; place-items: center; cursor: pointer; z-index: 2;
  background: var(--white); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(20, 21, 26, .14);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.cs-strip-btn:hover { background: var(--ink); color: var(--white); }
.cs-strip-prev { left: 8px; }
.cs-strip-next { right: 8px; }
.cs-strip-btn[hidden] { display: none; }
/* on touch devices, lean on swipe and hide the arrow buttons */
@media (hover: none) { .cs-strip-btn { display: none; } }

/* ----- Research method blocks (phase sections) ----------------------------- */
.cs-methods > .cs-method + .cs-method {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}
.cs-method__name { font-size: clamp(1.3rem, 2.4vw, 1.65rem); letter-spacing: -0.02em; }
/* sub-parts within a method (e.g. User Modeling → archetype / poke-mapping / dynamic selves) */
.cs-parts { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .cs-parts { grid-template-columns: repeat(var(--cols, 3), 1fr); } }
.cs-part__name { letter-spacing: -0.01em; }
/* uniform same-height part images: contained in a 4:3 frame (no cropping) */
.cs-part .media-frame { aspect-ratio: 4 / 3; background: #fff; }
.cs-part .flow-img { width: 100%; height: 100%; object-fit: contain; }
.cs-limitations {
  background: rgba(20, 21, 26, 0.04);
  border-radius: 12px;
  padding: 16px 20px;
}

/* ----- Section note (e.g. User Story) — smaller, full-width text ------------ */
.cs-note__text { font-size: 0.9rem; line-height: 1.65; text-align: justify; hyphens: auto; }

/* ----- Framework: convergence map — parallel inputs flow into one output --- */
.cs-fwmap__cols { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 768px) { .cs-fwmap__cols { grid-template-columns: repeat(3, 1fr); gap: 32px; text-align: center; } }
.cs-fwmap__label { font-size: 1.02rem; letter-spacing: -0.01em; margin-bottom: 10px; color: var(--ink); }
.cs-fwmap__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
@media (min-width: 768px) { .cs-fwmap__list { justify-items: center; } }
.cs-fwmap__list li { font-size: 0.92rem; color: var(--mute); line-height: 1.4; }
/* the connecting structure only reads as "convergence" once columns sit side by side */
.cs-fwmap__output { margin-top: 18px; text-align: center; }
.cs-fwmap__outlabel { color: var(--indigo); }
@media (min-width: 768px) {
  .cs-fwmap__col { position: relative; }
  .cs-fwmap__col::after {
    content: ""; display: block; width: 1px; height: 26px;
    background: rgba(35, 48, 214, .28); margin: 18px auto 0;
  }
  .cs-fwmap__merge {
    position: relative; height: 1px; margin: 0 16.6667%;
    background: rgba(35, 48, 214, .28);
  }
  .cs-fwmap__merge::after {
    content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 26px;
    background: rgba(35, 48, 214, .28); transform: translateX(-50%);
  }
  .cs-fwmap__output { margin-top: 44px; }
}
.chip--indigo { border-color: rgba(35, 48, 214, .3); color: var(--indigo); background: var(--tint); }
/* keeps the last two chips together as one wrap unit, so the final row never strands a single chip */
.cs-fwmap__chippair { display: inline-flex; flex-wrap: nowrap; gap: 8px; }

.cs-quote { border-left: 3px solid var(--indigo); padding: 2px 0 2px 22px; }
.cs-quote__text { font-size: clamp(1.15rem, 2vw, 1.55rem); line-height: 1.4; color: var(--ink); }

/* ----- Story opening: The Problem lead + Role/Tools/Timeline meta strip ------ */
.cs-story__lead {
  font-family: "Fraunces", serif; font-weight: 400; font-style: normal;
  font-size: clamp(1.5rem, 2.7vw, 2.25rem); line-height: 1.34;
  letter-spacing: -0.015em; color: var(--ink);
}
.cs-story__lead .cs-em { font-weight: 600; font-style: italic; }
/* paired Problem | Research Question row — smaller so both fit side by side */
.cs-story__lead--pair { font-size: clamp(1.2rem, 1.9vw, 1.6rem); line-height: 1.4; }
/* overview + problem + research question row: overview is the decorative serif lead */
.cs-story__overview {
  font-family: "Fraunces", serif; font-weight: 400; font-style: normal;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.55;
  letter-spacing: -0.005em; color: var(--ink);
}
/* problem + research question in that same row: plain Inter, smaller than the paired size above */
.cs-story__lead--sans {
  font-family: "Inter", system-ui, sans-serif; font-weight: 500;
  font-size: clamp(1rem, 1.3vw, 1.1rem); line-height: 1.5;
  letter-spacing: -0.005em; color: var(--ink);
}

/* ----- Stacked layout: Project Overview/Problem/RQ read as one vertical article, not paired columns ----- */
.cs-stacked__lead { font-size: 1.15rem; line-height: 1.6; color: var(--ink); }
.cs-stacked__lead .cs-em { font-weight: 600; font-style: italic; }

/* ----- Pain-point / finding cards (iconcards layout) ------------------------ */
.cs-paingrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .cs-paingrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cs-paingrid { grid-template-columns: 1fr; } }
.cs-paincard {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 32px 26px 28px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(20, 21, 26, 0.04);
}
.cs-paincard::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--indigo); }
.cs-paincard__icon { color: var(--indigo); display: block; margin-bottom: 18px; }
.cs-paincard__title {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 0.92rem; line-height: 1.32; color: var(--ink); margin-bottom: 10px;
}
.cs-paincard__body { color: var(--mute); font-size: 0.93rem; line-height: 1.6; }

/* ----- Sticky scroll-show: prototype screen swaps as you scroll ------------- */
/* stacking cards: each feature card pins (sticky) with a small per-card offset, so
   the next card rises from the bottom and rests on top, leaving a sliver of the
   previous card's edge. Pure CSS — no JS. --i is the card index (set inline). */
/* flow-root = new block formatting context, so the LAST card's margin-bottom is
   contained (not collapsed through) and the last card gets scroll room to pin like the rest */
.cs-stackcards { margin-top: 24px; display: flow-root; }
.cs-stackcard {
  position: sticky;
  top: calc(92px + var(--i) * 26px);
  width: min(880px, 100%);
  margin: 0 auto 42vh;
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 14px 44px rgba(20, 21, 26, 0.10);
  overflow: hidden;
}
/* keep the last card's trailing space too, or it never has room to rise to `top` */
.cs-stackcard__media { width: 100%; aspect-ratio: 16 / 9; background: var(--tint); }
.cs-stackcard__media img { width: 100%; height: 100%; object-fit: contain; padding: 12px; display: block; }
.cs-stackcard__cap { padding: 20px 28px 24px; }
.cs-scrollshow__title { font-size: clamp(1.3rem, 2.2vw, 1.7rem); letter-spacing: -0.02em; line-height: 1.2; }
.cs-scrollshow__body { color: var(--mute); font-size: 1rem; line-height: 1.58; }
@media (max-width: 820px) {
  .cs-stackcard { top: calc(76px + var(--i) * 20px); margin-bottom: 36vh; }
  .cs-stackcard__cap { padding: 16px 20px 20px; }
}
.cs-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem 2rem;
  border-top: 1px solid var(--line); padding-top: 1.5rem;
}
.cs-meta__val { margin-top: 0.4rem; font-weight: 500; color: var(--ink); font-size: 0.97rem; line-height: 1.45; }
@media (min-width: 768px) {
  .cs-meta { grid-template-columns: repeat(4, auto); column-gap: 4.5rem; justify-content: start; }
}

/* ----- Content blocks (sub-headings, defs, numbered lists, stat cards) ------ */
.cs-blocks { display: flex; flex-direction: column; gap: 24px; }
.cs-subhead { font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -0.02em; margin-top: 16px; }
.cs-blocks > .cs-block:first-child .cs-subhead { margin-top: 0; }

.cs-defs { display: grid; gap: 0; }
.cs-def {
  display: grid; grid-template-columns: 170px 1fr; gap: 18px;
  padding: 13px 0; border-top: 1px solid var(--line);
}
.cs-def:last-child { border-bottom: 1px solid var(--line); }
.cs-def dt { color: var(--indigo); }
.cs-def dd { margin: 0; color: var(--ink); }
@media (max-width: 560px) { .cs-def { grid-template-columns: 1fr; gap: 4px; } }

.cs-flist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: f; }
.cs-flist--num li { counter-increment: f; position: relative; padding-left: 38px; color: var(--ink); line-height: 1.5; }
.cs-flist--num li::before {
  content: counter(f); position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--tint); color: var(--indigo);
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 0.82rem;
  display: grid; place-items: center;
}

.cs-stats__q { font-size: 1.05rem; line-height: 1.35; color: var(--ink); margin-bottom: 18px; max-width: 60ch; }
.cs-stats__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 24px; }
.cs-stat__val { display: block; color: var(--indigo); font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1; letter-spacing: -0.02em; }
.cs-stat__label { display: block; margin-top: 6px; color: var(--mute); font-size: 0.9rem; line-height: 1.4; }

/* ----- 5 Whys iteration boxes ---------------------------------------------- */
.cs-fivewhys__problem {
  background: var(--tint);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 16px;
}
.cs-fivewhys__list { list-style: none; display: grid; gap: 12px; margin: 0; padding: 0; }
.cs-why {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
}
.cs-why__num {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--indigo);
  min-width: 1.2em;
}
.cs-why__q { font-weight: 600; color: var(--ink); line-height: 1.4; }
.cs-why__a { margin-top: 6px; color: var(--mute); line-height: 1.55; }

/* ----- Recommendation cards (finding → action) ----------------------------- */
.cs-recs { display: grid; gap: 16px; }
.cs-rec {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 22px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
}
.cs-rec__arrow { display: grid; place-items: center; }
.cs-rec__action {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}
@media (max-width: 640px) {
  .cs-rec { grid-template-columns: 1fr; gap: 14px; }
  .cs-rec__arrow { transform: rotate(90deg); justify-self: start; }
  .cs-rec__action { padding-left: 0; border-left: 0; padding-top: 14px; border-top: 1px solid var(--line); }
}

/* ----- Lightbox ------------------------------------------------------------ */
.lightbox { position: fixed; inset: 0; z-index: 90; display: none; place-items: center;
  background: rgba(20,21,26,.92); padding: 4vw; }
.lightbox.open { display: grid; }
.lightbox img, .lightbox video { max-width: 92vw; max-height: 88vh; border-radius: 10px; }
.lightbox-close { position: absolute; top: 20px; right: 24px; color: #fff; cursor: pointer; }

/* ----- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero-line > span { transform: none !important; }
  .fade-up { opacity: 1 !important; }
  .marquee__track { animation: none !important; }
  .hero-scroll__rule::after { animation: none !important; transform: none !important; }
}

/* ============================================================================
   Concept visuals — bespoke on-brand graphics (layout: "custom")
   Used by the speculative Google Maps project to recreate annotated mockups.
   ========================================================================== */
.concept-card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: clamp(22px, 4vw, 38px);
}
.concept-cap { font-size: .95rem; line-height: 1.65; color: var(--mute); margin-top: 20px; max-width: 60ch; }
.concept-cap strong { color: var(--ink); font-weight: 600; }

/* Trust calibration — certainty meters */
.meters { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 40px); }
.meter__label { font-size: .95rem; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.meter__row { display: flex; align-items: center; gap: 14px; }
.meter__track { position: relative; flex: 1; height: 12px; border-radius: 999px; background: var(--line); }
.meter__fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 999px; background: var(--indigo); }
.meter__fill::after {
  content: ""; position: absolute; right: -2px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%; background: var(--indigo);
  box-shadow: 0 0 0 4px rgba(35,48,214,.16);
}
.meter__val { font-weight: 700; color: var(--ink); font-size: 1rem; min-width: 3ch; }

/* Human agency — two mechanisms side by side */
.agency { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.agency .concept-card { display: flex; flex-direction: column; }
.density__head {
  display: flex; justify-content: space-between; width: 100%; max-width: 184px;
  margin: 4px auto 16px; color: var(--mute); font-size: 1.5rem; font-weight: 500; line-height: 1;
}
.density__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  width: 100%; max-width: 184px; margin: 0 auto;
}
.dot { aspect-ratio: 1; border-radius: 50%; background: var(--line); }
.dot--on { background: var(--indigo); }
.approve { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; flex: 1; justify-content: center; }
.approve__icon { color: var(--indigo); display: inline-flex; }
.approve__msg { font-size: 1.18rem; line-height: 1.42; color: var(--ink); font-weight: 500; max-width: 26ch; }
.approve__mic { color: var(--mute); display: inline-flex; }

@media (max-width: 720px) {
  .meters, .agency { grid-template-columns: 1fr; }
}
