/* =========================================================
   SKINTHIRST — case study microsite
   Palette + type taken from the Skinthirst brand board
   ========================================================= */

:root {
  --forest: #1E3A2F;
  --forest-deep: #15291F;
  --forest-line: rgba(234, 220, 200, .16);
  --sage: #6A7F4E;
  --terracotta: #B65A4A;
  --terracotta-ink: #9E4636;   /* AA contrast on ivory */
  --sand: #EADCC8;
  --sand-soft: #F1E7D8;
  --ivory: #F8F3EA;
  --wood: #7A5B3F;
  --gold: #D4B574;
  --gold-ink: #8A6A2E;         /* AA contrast on light */
  --ink: #1E2A24;
  --ink-soft: #4A5650;
  --line: rgba(30, 58, 47, .14);

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --space: clamp(72px, 10vw, 136px);
  --nav-h: 68px;

  --r-sm: 4px;
  --r-md: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--forest); color: var(--ivory); text-decoration: none; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; }

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

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  color: var(--ivory);
  transition: background .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}
.nav.is-solid { background: rgba(248, 243, 234, .94); color: var(--forest); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav__inner { max-width: 1320px; margin: 0 auto; height: var(--nav-h); padding: 0 var(--gutter); display: flex; align-items: center; gap: 28px; }
.nav__brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 17px; letter-spacing: .14em; text-decoration: none; white-space: nowrap; }
.nav__mark { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid currentColor; border-radius: 50%; font-size: 15px; letter-spacing: 0; font-style: italic; }
.nav__links { display: flex; gap: clamp(14px, 1.6vw, 24px); margin-left: auto; font-size: 13px; font-weight: 500; }
.nav__links a { text-decoration: none; opacity: .78; padding: 6px 0; position: relative; transition: opacity .2s; }
.nav__links a:hover, .nav__links a.is-active { opacity: 1; }
.nav__links a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; }
.nav__back { font-size: 12.5px; text-decoration: none; padding: 7px 14px; border: 1px solid currentColor; border-radius: 999px; opacity: .85; white-space: nowrap; transition: opacity .2s, background .2s; }
.nav__back:hover { opacity: 1; }
.nav__back--mobile { display: none; }
.nav__toggle { display: none; margin-left: auto; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; position: relative; }
.nav__toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease); }
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 26px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  background:
    radial-gradient(120% 80% at 80% 30%, rgba(106, 127, 78, .35), transparent 60%),
    linear-gradient(170deg, var(--forest) 0%, var(--forest-deep) 100%);
  color: var(--ivory);
  overflow: hidden;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 32px + env(safe-area-inset-top, 0px)) 0 96px;
}
.hero__inner { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero__kicker { font-size: 13px; color: var(--gold); letter-spacing: .06em; margin-bottom: 22px; }
.hero__title { font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 5.9vw, 88px); line-height: .95; letter-spacing: .01em; margin-left: -.04em; }
.hero__lede { font-family: var(--serif); font-size: clamp(20px, 2vw, 27px); line-height: 1.38; max-width: 22ch; margin-top: 26px; color: #F3EADB; }
.hero__meta { display: grid; gap: 10px; margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--forest-line); max-width: 440px; }
.hero__meta div { display: grid; grid-template-columns: 70px 1fr; gap: 12px; font-size: 14px; }
.hero__meta dt { color: rgba(234, 220, 200, .6); }
.hero__meta dd { color: var(--ivory); }
.hero__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; max-width: 480px; }
.hero__tags li { font-size: 12px; padding: 6px 12px; border: 1px solid rgba(212, 181, 116, .45); border-radius: 999px; color: #EBDDBF; }

.hero__stage { position: relative; aspect-ratio: 1 / 1.02; max-width: 620px; width: 100%; justify-self: end; }
.hero__card { position: absolute; margin: 0; transform: rotate(var(--rot, 0deg)) translate3d(0, var(--py, 0px), 0); border-radius: var(--r-md); overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); will-change: transform; }
.hero__card img { width: 100%; height: auto; }
.hero__card--front { width: 64%; left: 18%; top: 2%; z-index: 3; }
.hero__card--back { width: 46%; top: 18%; z-index: 1; filter: saturate(.9) brightness(.82); }
.hero__card--left { left: -2%; --rot: -6deg; }
.hero__card--right { right: -4%; --rot: 5deg; }

.hero__scroll { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .16em; color: rgba(234, 220, 200, .7); text-decoration: none; }
.hero__scroll i { width: 1px; height: 36px; background: linear-gradient(var(--gold), transparent); animation: drip 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* hero load sequence — the page's one orchestrated moment */
.js .hero__copy > *, .js .hero__card { opacity: 0; }
.is-loaded .hero__copy > * { animation: rise .9s var(--ease) forwards; }
.is-loaded .hero__copy > *:nth-child(2) { animation-delay: .08s; }
.is-loaded .hero__copy > *:nth-child(3) { animation-delay: .18s; }
.is-loaded .hero__copy > *:nth-child(4) { animation-delay: .28s; }
.is-loaded .hero__copy > *:nth-child(5) { animation-delay: .36s; }
.is-loaded .hero__card--front { animation: cardIn 1.1s var(--ease) .2s forwards; }
.is-loaded .hero__card--left { animation: cardIn 1.1s var(--ease) .42s forwards; }
.is-loaded .hero__card--right { animation: cardIn 1.1s var(--ease) .52s forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }

/* ---------- RESULTS STRIP ---------- */
.strip { background: var(--ivory); border-bottom: 1px solid var(--line); }
.strip__grid { display: grid; grid-template-columns: 1.25fr 1.25fr 1fr 1fr; }
.stat { padding: 40px 28px 38px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__num { font-family: var(--serif); line-height: 1; color: var(--terracotta-ink); font-variant-numeric: lining-nums tabular-nums; }
.stat--primary .stat__num { font-size: clamp(48px, 5.6vw, 74px); }
.stat--context .stat__num { font-size: clamp(34px, 3.4vw, 44px); color: var(--forest); }
.stat__num small { font-size: .5em; }
.stat__label { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--ink-soft); max-width: 26ch; }
.stat--primary .stat__label { color: var(--ink); font-weight: 500; }

/* ---------- SECTIONS ---------- */
.section { padding: var(--space) 0; position: relative; }
.section--ivory { background: var(--ivory); }
.section--sand { background: var(--sand-soft); }
.section--forest { background: var(--forest); color: var(--ivory); }

.section__head { max-width: 640px; margin-bottom: clamp(40px, 5vw, 64px); }
.section__head--wide { max-width: 760px; }
.section__label { display: flex; align-items: baseline; gap: 12px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 18px; }
.section__label span { font-family: var(--serif); font-weight: 400; font-size: 15px; letter-spacing: 0; color: var(--terracotta-ink); }
.section--forest .section__label { color: var(--gold); }
.section--forest .section__label span { color: #E09A87; }
.section__title { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4.2vw, 54px); line-height: 1.1; letter-spacing: -.01em; color: var(--forest); text-wrap: balance; }
.section--forest .section__title { color: var(--ivory); }
.section__body { margin-top: 22px; font-size: 17px; line-height: 1.7; color: var(--ink-soft); max-width: 60ch; }
.section--forest .section__body { color: rgba(248, 243, 234, .78); }

.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.split .section__head { margin-bottom: 0; }

/* ---------- CHALLENGE ---------- */
.role { margin-top: 30px; padding: 18px 0 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink); max-width: 56ch; }
.role strong { display: block; font-family: var(--serif); font-weight: 500; font-style: italic; color: var(--terracotta-ink); margin-bottom: 4px; }
.constraints { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.constraints li { display: flex; flex-direction: column; gap: 18px; padding: 22px 20px; min-height: 132px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); font-family: var(--serif); font-size: 18px; line-height: 1.3; color: var(--forest); }
.constraints li:last-child { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; }
.constraints svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--terracotta); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- AUDIT ---------- */
.audit-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.audit-meta div { padding: 18px 20px 18px 0; }
.audit-meta div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.audit-meta dt { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 4px; }
.audit-meta dd { font-family: var(--serif); font-size: 16.5px; color: var(--forest); }

.scorecard { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.scorecard__row { display: grid; grid-template-columns: 220px 190px minmax(0, 1fr); gap: 24px; align-items: center; padding: 20px 28px; border-top: 1px solid var(--line); }
.scorecard__row--head { background: var(--forest); color: var(--sand); border-top: 0; padding-top: 14px; padding-bottom: 14px; font-size: 12.5px; font-weight: 500; letter-spacing: .04em; }
.sc-area { font-family: var(--serif); font-size: 18px; color: var(--forest); }
.sc-score { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--ink-soft); }
.sc-score b { font-family: var(--serif); font-weight: 500; font-size: 26px; color: var(--terracotta-ink); line-height: 1; }
.meter { position: relative; display: block; flex: 1; height: 6px; margin-left: 14px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--sand) 0 calc(10% - 3px), transparent calc(10% - 3px) 10%); }
.meter::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--s) * 10%); border-radius: 3px; background: repeating-linear-gradient(90deg, var(--terracotta) 0 calc(100% / var(--s) - 3px), transparent calc(100% / var(--s) - 3px) calc(100% / var(--s))); transform-origin: left; transform: scaleX(0); transition: transform 1.1s var(--ease) .15s; }
.scorecard.is-in .meter::after { transform: scaleX(1); }
.sc-find { font-size: 15px; line-height: 1.55; color: var(--ink); }

.bench { margin-top: clamp(64px, 8vw, 96px); }
.bench__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-bottom: 24px; }
.bench__head h3 { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 32px); color: var(--forest); }
.bench__head p { color: var(--ink-soft); font-size: 15px; }
.bench__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bench__card { padding: 28px 26px 30px; background: var(--ivory); border: 1px solid var(--line); border-top: 3px solid var(--sage); border-radius: var(--r-sm); }
.bench__card h4 { font-family: var(--serif); font-size: 23px; color: var(--forest); margin-bottom: 18px; }
.bench__k { font-size: 12px; font-weight: 600; color: var(--gold-ink); margin-bottom: 4px; }
.bench__card p:not(.bench__k) { font-size: 15px; line-height: 1.55; }
.bench__card p + .bench__k { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.bench__imp { font-family: var(--serif); font-style: italic; font-size: 16.5px !important; color: var(--forest); }

/* ---------- STRATEGY ---------- */
.recs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.rec { grid-column: span 2; position: relative; display: flex; flex-direction: column; padding: 30px 28px 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); }
.rec:nth-child(4) { grid-column: 2 / span 2; }
.rec__n { font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--sage); margin-bottom: 22px; }
.rec h3 { font-family: var(--serif); font-size: 22px; line-height: 1.25; color: var(--forest); margin-bottom: 12px; }
.rec p { font-size: 15px; line-height: 1.62; color: var(--ink-soft); flex: 1; }

/* ---------- CREATIVE SYSTEM ---------- */
.skus { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.2vw, 28px); }
.sku { display: flex; flex-direction: column; }
.sku:nth-child(2) { margin-top: 48px; }
.sku__img { display: block; padding: 0; border: 0; background: var(--forest-deep); border-radius: var(--r-md); overflow: hidden; cursor: zoom-in; aspect-ratio: 1122 / 1402; }
.sku__img img { width: 100%; height: 100%; object-fit: contain; transition: transform .8s var(--ease); }
.sku__img:hover img { transform: scale(1.03); }
.sku__txt { padding: 22px 4px 0; }
.sku__txt h3 { font-family: var(--serif); font-size: 24px; }
.sku__ing { margin-top: 4px; font-size: 13.5px; color: var(--gold); }
.sku__txt ul { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 14px; color: rgba(248, 243, 234, .8); }
.sku__txt li::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 8px; border-radius: 50%; background: var(--terracotta); vertical-align: middle; }

.system { margin-top: clamp(56px, 7vw, 88px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--forest-line); }
.system div { padding: 24px 24px 0 0; }
.system div + div { padding-left: 24px; border-left: 1px solid var(--forest-line); }
.system dt { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--gold); margin-bottom: 8px; }
.system dd { font-size: 14.5px; line-height: 1.6; color: rgba(248, 243, 234, .82); }

/* ---------- VISUAL LANGUAGE ---------- */
.zoom { cursor: zoom-in; }
.board { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #fff; border-radius: var(--r-md); overflow: hidden; box-shadow: 0 30px 70px -40px rgba(30, 58, 47, .55); }
.board img { width: 100%; transition: transform .9s var(--ease); }
.board:hover img { transform: scale(1.012); }
.zoom__hint { position: absolute; right: 16px; bottom: 16px; padding: 8px 14px; font-size: 12.5px; font-weight: 500; background: rgba(30, 58, 47, .88); color: var(--ivory); border-radius: 999px; opacity: 0; transform: translateY(6px); transition: .3s var(--ease); }
.board:hover .zoom__hint, .board:focus-visible .zoom__hint { opacity: 1; transform: none; }

.lang { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); margin-top: clamp(48px, 6vw, 80px); }
.lang h3 { font-family: var(--serif); font-size: 24px; color: var(--forest); margin-bottom: 22px; }
.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; }
.swatches li { display: flex; flex-direction: column; }
.swatches i { display: block; aspect-ratio: 5 / 3; background: var(--c); border-radius: var(--r-sm); margin-bottom: 12px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.swatches b { font-weight: 600; font-size: 14px; color: var(--forest); }
.swatches span { font-size: 12.5px; color: var(--ink-soft); }
.specimen { display: flex; align-items: center; gap: 22px; padding: 18px 0; border-top: 1px solid var(--line); }
.specimen span { font-size: 64px; line-height: 1; color: var(--forest); width: 96px; }
.specimen--serif span { font-family: var(--serif); }
.specimen--sans span { font-family: var(--sans); font-weight: 400; }
.specimen p { display: flex; flex-direction: column; font-size: 13px; color: var(--ink-soft); }
.specimen b { font-size: 19px; font-weight: 500; color: var(--forest); }
.specimen--serif b { font-family: var(--serif); }
.lang__note { margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--serif); font-style: italic; color: var(--wood); }

.details { margin-top: clamp(48px, 6vw, 80px); display: grid; gap: 14px; }
.details__row { display: flex; gap: 14px; }
.detail { position: relative; flex: var(--a) 1 0; min-width: 0; aspect-ratio: var(--a); padding: 0; border: 0; background: #fff; border-radius: var(--r-sm); overflow: hidden; }
.detail img { width: 100%; height: 100%; object-fit: contain; transition: transform .8s var(--ease); }
.detail:hover img { transform: scale(1.04); }

/* ---------- WORK SAMPLES ---------- */
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); align-items: start; }
.g { position: relative; display: block; padding: 0; border: 0; border-radius: var(--r-md); overflow: hidden; background: var(--sand); box-shadow: 0 24px 60px -40px rgba(30, 58, 47, .6); }
.g img { width: 100%; height: auto; transition: transform .9s var(--ease), filter .4s; }
.g:hover img { transform: scale(1.025); }
.g::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(30, 58, 47, .08); pointer-events: none; }
.g--feature { grid-column: span 7; }
.g--side { grid-column: span 5; margin-top: clamp(40px, 10vw, 140px); }
.g--wide { grid-column: 1 / -1; }
.g--third { grid-column: span 4; }

/* ---------- AI WORKFLOW ---------- */
.split--ai { align-items: stretch; }
.ai-result { margin-top: 40px; padding: 26px 0 0; border-top: 1px solid var(--forest-line); display: flex; align-items: center; gap: 22px; }
.ai-result__num { font-family: var(--serif); font-size: clamp(52px, 6vw, 76px); line-height: 1; color: var(--gold); }
.ai-result p:last-child { max-width: 20ch; font-size: 15px; color: rgba(248, 243, 234, .85); }
.uses { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.uses li { padding: 8px 14px; font-size: 13.5px; border: 1px solid rgba(212, 181, 116, .45); border-radius: 999px; color: #EFE3C9; }
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--forest-line); border: 1px solid var(--forest-line); border-radius: var(--r-md); overflow: hidden; }
.tool { display: flex; flex-direction: column; gap: 4px; padding: 22px 22px; background: var(--forest); }
.tool b { font-family: var(--serif); font-weight: 500; font-size: 20px; }
.tool span { font-size: 13.5px; color: rgba(248, 243, 234, .65); }
.tool--ai { background: #25463A; }
.tool--ai b { color: var(--gold); }
.tool--ai span { color: rgba(248, 243, 234, .88); }

/* ---------- RESULTS ---------- */
.results__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: end; padding-bottom: clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.big__num { font-family: var(--serif); font-weight: 400; line-height: .9; letter-spacing: -.03em; color: var(--terracotta-ink); font-variant-numeric: lining-nums tabular-nums; }
.big--primary .big__num { font-size: clamp(110px, 17vw, 240px); }
.big--secondary .big__num { font-size: clamp(72px, 9vw, 132px); color: var(--forest); }
.big__label { margin-top: 18px; font-family: var(--serif); font-size: clamp(18px, 1.7vw, 23px); line-height: 1.35; color: var(--forest); max-width: 24ch; }

.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 0; margin-top: clamp(36px, 4vw, 52px); counter-reset: c; }
.chain li { display: flex; align-items: center; font-family: var(--serif); font-size: clamp(16px, 1.5vw, 20px); color: var(--forest); }
.chain li::after { content: ""; width: clamp(20px, 3vw, 44px); height: 1px; margin: 0 14px; background: var(--gold-ink); position: relative; }
.chain li:last-child::after { display: none; }
.chain li:last-child { color: var(--terracotta-ink); font-style: italic; }
.fineprint { margin-top: 28px; font-size: 13px; color: var(--ink-soft); max-width: 70ch; }

/* ---------- INSIGHT ---------- */
.insight { background: var(--forest-deep); color: var(--ivory); padding: clamp(80px, 11vw, 150px) 0; }
.insight__inner { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
.insight__lead { font-family: var(--serif); font-size: clamp(26px, 3.2vw, 42px); line-height: 1.28; text-wrap: balance; }
.insight__steps { border-left: 1px solid var(--forest-line); padding-left: clamp(20px, 3vw, 40px); display: grid; gap: 14px; }
.insight__steps li { font-size: 15px; color: rgba(248, 243, 234, .82); display: flex; gap: 12px; align-items: baseline; }
.insight__steps li::before { content: ""; width: 12px; height: 1px; background: var(--gold); flex: none; transform: translateY(-4px); }

/* ---------- DOCS ---------- */
.docs .section__head { margin-bottom: 36px; }
.docs__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 900px; }
.doc { display: flex; flex-direction: column; gap: 8px; padding: 28px 30px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; transition: border-color .25s, transform .25s var(--ease), box-shadow .25s; }
.doc:hover { border-color: var(--forest); transform: translateY(-2px); box-shadow: 0 18px 40px -28px rgba(30, 58, 47, .55); }
.doc__type { font-size: 12px; font-weight: 600; color: var(--gold-ink); }
.doc b { font-family: var(--serif); font-weight: 500; font-size: 23px; color: var(--forest); }
.doc span:last-child { font-size: 14.5px; color: var(--ink-soft); }

/* ---------- FOOTER ---------- */
.footer { background: var(--forest); color: rgba(248, 243, 234, .8); padding: 44px 0 calc(44px + env(safe-area-inset-bottom, 0px)); font-size: 14px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.footer__brand { font-family: var(--serif); font-size: 18px; letter-spacing: .14em; color: var(--ivory); margin-bottom: 4px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 24px; }
.footer__links a { text-decoration: none; border-bottom: 1px solid rgba(212, 181, 116, .5); padding-bottom: 2px; }
.footer__links a:hover { color: var(--ivory); border-color: var(--gold); }

/* ---------- LIGHTBOX ---------- */
.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; align-items: center; background: rgba(16, 30, 23, .96); padding: max(20px, env(safe-area-inset-top, 0px)) 12px max(20px, env(safe-area-inset-bottom, 0px)); opacity: 0; transition: opacity .3s var(--ease); }
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lb__figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-width: 0; }
.lb__figure img { max-width: 100%; max-height: calc(100vh - 110px); max-height: calc(100svh - 110px); width: auto; height: auto; object-fit: contain; border-radius: var(--r-sm); transition: opacity .25s; }
.lb__figure img.is-loading { opacity: .25; }
.lb__figure figcaption { display: flex; gap: 16px; font-size: 13.5px; color: rgba(248, 243, 234, .82); text-align: center; }
#lbCount { color: rgba(248, 243, 234, .5); }
.lb__btn { width: 52px; height: 52px; display: grid; place-items: center; background: rgba(248, 243, 234, .08); border: 1px solid rgba(248, 243, 234, .2); border-radius: 50%; color: var(--ivory); cursor: pointer; transition: background .2s; justify-self: center; }
.lb__btn:hover { background: rgba(248, 243, 234, .18); }
.lb__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lb__btn[disabled] { opacity: .25; cursor: default; }
.lb__close { position: absolute; top: max(16px, env(safe-area-inset-top, 0px)); right: 16px; width: 46px; height: 46px; }
body.lb-open { overflow: hidden; }

/* ---------- REVEAL ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) {
  .nav__links { font-size: 12.5px; gap: 14px; }
  .nav__back:not(.nav__back--mobile) { display: none; }
  .scorecard__row { grid-template-columns: 180px 160px minmax(0, 1fr); gap: 18px; padding: 18px 22px; }
  .system { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .system div:nth-child(3) { padding-left: 0; border-left: 0; }
  .system div:nth-child(n+3) { padding-top: 28px; }
}

@media (max-width: 900px) {
  :root { --nav-h: 60px; }
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: calc(var(--nav-h) + env(safe-area-inset-top, 0px)) 0 auto 0;
    flex-direction: column; gap: 0; margin: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--ivory); color: var(--forest);
    box-shadow: 0 20px 40px -24px rgba(30, 58, 47, .45);
    font-size: 16px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .3s var(--ease), opacity .3s var(--ease), visibility .3s;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav__links.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--line); opacity: 1; }
  .nav__links a.is-active::after { display: none; }
  .nav__links a.is-active { color: var(--terracotta-ink); }
  .nav__back--mobile { display: block; margin-top: 16px; border: 1px solid var(--forest) !important; border-radius: 999px; text-align: center; }
  .nav.menu-open { background: var(--ivory); color: var(--forest); }

  .hero { padding-bottom: 88px; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__stage { justify-self: center; max-width: 480px; order: -1; margin-bottom: 8px; }
  .hero__lede { max-width: 30ch; }

  .strip__grid { grid-template-columns: 1fr 1fr; }
  .stat { padding: 30px 20px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }

  .split { grid-template-columns: 1fr; }
  .audit-meta { grid-template-columns: 1fr; }
  .audit-meta div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .audit-meta div { padding: 14px 0; }

  .scorecard { background: transparent; border: 0; border-radius: 0; overflow: visible; display: grid; gap: 12px; }
  .scorecard__row--head { display: none; }
  .scorecard__row { grid-template-columns: 1fr auto; gap: 10px 16px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); }
  .sc-score { min-width: 150px; }
  .sc-find { grid-column: 1 / -1; }

  .bench__grid { grid-template-columns: 1fr; }
  .recs { grid-template-columns: 1fr 1fr; }
  .rec, .rec:nth-child(4) { grid-column: auto; }
  .rec:last-child { grid-column: 1 / -1; }

  .skus { grid-template-columns: 1fr 1fr; }
  .sku:nth-child(2) { margin-top: 0; }
  .sku:last-child { grid-column: 1 / -1; max-width: calc(50% - 10px); }

  .lang { grid-template-columns: 1fr; }
  .details__row { flex-wrap: wrap; }
  .detail { flex-basis: 40%; }

  .gallery { grid-template-columns: 1fr 1fr; }
  .g--feature, .g--side { grid-column: span 1; margin-top: 0; }
  .g--third { grid-column: span 1; }
  .g--third:last-child { grid-column: 1 / -1; max-width: calc(50% - 8px); justify-self: center; }

  .results__grid { grid-template-columns: 1fr; align-items: start; }
  .insight__inner { grid-template-columns: 1fr; }
  .insight__steps { border-left: 0; padding-left: 0; border-top: 1px solid var(--forest-line); padding-top: 28px; }

  .lightbox { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lb__prev, .lb__next { position: absolute; bottom: max(20px, env(safe-area-inset-bottom, 0px)); }
  .lb__prev { left: calc(50% - 64px); }
  .lb__next { right: calc(50% - 64px); }
  .lb__figure { padding-bottom: 72px; }
  .lb__figure img { max-height: calc(100vh - 170px); max-height: calc(100svh - 170px); }
}

@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .hero__title { font-size: clamp(42px, 13.5vw, 64px); }
  .hero__stage { max-width: 360px; }
  .hero__meta div { grid-template-columns: 58px 1fr; }
  .strip__grid { grid-template-columns: 1fr; }
  .stat, .stat:nth-child(odd) { border-left: 0; padding: 26px 0; }
  .stat + .stat { border-top: 1px solid var(--line); }
  .section__body { font-size: 16px; }
  .constraints { grid-template-columns: 1fr; }
  .constraints li { flex-direction: row; align-items: center; min-height: 0; padding: 18px; }
  .scorecard__row { grid-template-columns: 1fr; }
  .sc-score { min-width: 0; }
  .recs { grid-template-columns: 1fr; }
  .skus, .gallery { grid-template-columns: 1fr; }
  .sku:last-child, .g--third:last-child { max-width: none; grid-column: auto; }
  .swatches { grid-template-columns: 1fr 1fr; }
  .detail { flex-basis: 100%; }
  .detail[style*="0.615"] { flex-basis: auto; width: 62%; flex-grow: 0; margin: 0 auto; }
  .docs__grid { grid-template-columns: 1fr; }
  .chain { flex-direction: column; align-items: flex-start; gap: 0; }
  .chain li { flex-direction: column; align-items: flex-start; }
  .chain li::after { width: 1px; height: 18px; margin: 8px 0 8px 10px; }
  .ai-result { flex-direction: column; align-items: flex-start; gap: 10px; }
  .tools { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .hero__scroll { display: none; }
  .system { grid-template-columns: 1fr; }
  .system div, .system div + div, .system div:nth-child(3) { padding: 20px 0 0; border-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal, .js .hero__copy > *, .js .hero__card { opacity: 1 !important; transform: none; translate: none; }
  .meter::after { transform: scaleX(1); }
}
