/* ==========================================================================
   EpivaScan — site styles
   1. Tokens   2. Base   3. Layout   4. Chrome (header/footer)
   5. Components   6. Page sections   7. Scan demo   8. Motion
   ========================================================================== */

/* 1. Tokens --------------------------------------------------------------- */
:root {
  --paper: #F6F2EA;
  --paper-2: #EEE7DA;
  --card: #FFFDF9;
  --ink: #16201E;
  --ink-2: #3D4947;
  --muted: #5C6663;
  --line: rgba(22, 32, 30, .13);
  --line-strong: rgba(22, 32, 30, .3);

  --teal: #0E5A53;
  --teal-deep: #0A3F3A;
  --teal-night: #072B28;
  --teal-tint: #DCEAE5;

  --clay: #C25E38;
  --clay-deep: #9A4324;
  --clay-soft: #E8A17F;
  --clay-tint: #F3DDD0;

  --tone-1: #F4D6BF;
  --tone-2: #E6B48F;
  --tone-3: #CB9069;
  --tone-4: #A56C47;
  --tone-5: #77472D;
  --tone-6: #472A1B;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --shadow: 0 1px 2px rgba(22, 32, 30, .05), 0 14px 34px -14px rgba(22, 32, 30, .22);
  --hatch: repeating-linear-gradient(135deg, transparent 0 11px, rgba(22, 32, 30, .04) 11px 12px);

  color-scheme: light;
}

/* 2. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--teal); color: var(--paper); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.05;
  text-wrap: balance;
}
h1, .display { font-size: clamp(2.6rem, 1.5rem + 4.6vw, 4.9rem); line-height: 1; }
h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); }
h3 { font-size: clamp(1.3rem, 1.15rem + .6vw, 1.55rem); line-height: 1.15; letter-spacing: -.01em; }
h1 em, h2 em { font-style: italic; color: var(--teal); }

.lead {
  font-size: clamp(1.125rem, 1.05rem + .4vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 36em;
  text-wrap: pretty;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  font: 500 .75rem/1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal);
}
.eyebrow::before { content: ""; width: 1.6em; height: 1px; background: currentColor; }

.ico {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* 3. Layout --------------------------------------------------------------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.section { padding-block: clamp(64px, 9vw, 124px); }
.section--tint { background: var(--paper-2); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.section--dark { background: var(--teal-night); color: var(--paper); }
.section--dark .lead { color: rgba(246, 242, 234, .78); }
.section--dark .eyebrow { color: var(--clay-soft); }
.section--dark h2 em { color: var(--clay-soft); }

.section__head { max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section__head h2 { margin-top: 16px; }
.section__head .lead { margin-top: 18px; }
.section__head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
}
.section__head--row > div { max-width: 46rem; }

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.split--top { align-items: start; }

.stack > * + * { margin-top: 1.1em; }
.prose p { color: var(--ink-2); max-width: 38em; }

@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

/* 4. Chrome --------------------------------------------------------------- */
site-header {
  display: block;
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__name { font: 600 1.36rem/1 var(--font-display); letter-spacing: -.02em; }
.brand__name em { font-style: italic; font-weight: 500; color: var(--teal); }

.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  padding: 8px 13px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.site-nav a:hover { color: var(--ink); background: rgba(22, 32, 30, .06); }
.site-nav a[aria-current="page"] { color: var(--teal-deep); background: var(--teal-tint); }
.site-nav .site-nav__cta { display: none; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle__bars { position: relative; width: 16px; height: 10px; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform .2s, top .2s;
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { top: 8px; }
.is-open .nav-toggle__bars::before { top: 4px; transform: rotate(45deg); }
.is-open .nav-toggle__bars::after { top: 4px; transform: rotate(-45deg); }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  site-header .site-header__cta { display: none; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px var(--gutter) 22px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 30px -24px rgba(22, 32, 30, .35);
  }
  .is-open .site-nav { display: flex; }
  .site-nav a { padding: 13px 14px; font-size: 1.05rem; border-radius: var(--radius-sm); }
  .site-nav .site-nav__cta {
    display: block;
    margin-top: 10px;
    text-align: center;
    color: var(--paper);
    background: var(--teal-deep);
    border-radius: 999px;
  }
}

site-footer { display: block; }
.site-footer { padding: 64px 0 28px; background: var(--teal-night); color: rgba(246, 242, 234, .78); }
.site-footer .brand__name { color: var(--paper); }
.site-footer .brand__name em { color: var(--clay-soft); }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.site-footer__blurb { margin-top: 16px; max-width: 26em; font-size: .98rem; }
.site-footer__h {
  margin-bottom: 14px;
  font: 500 .72rem/1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(246, 242, 234, .55);
}
.site-footer__links { display: grid; gap: 9px; }
.site-footer__links a { text-decoration: none; }
.site-footer__links a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }
.site-footer__disclaimer {
  margin-top: 44px;
  padding: 18px 20px;
  border: 1px solid rgba(246, 242, 234, .16);
  border-radius: var(--radius);
  font-size: .9rem;
  line-height: 1.55;
}
.site-footer__disclaimer strong { color: var(--paper); }
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  margin-top: 24px;
  font-size: .85rem;
  color: rgba(246, 242, 234, .55);
}
@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__grid > :first-child { grid-column: 1 / -1; }
}

/* 5. Components ----------------------------------------------------------- */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  padding: .85em 1.4em;
  border: 1.5px solid var(--teal-deep);
  border-radius: 999px;
  background: var(--teal-deep);
  color: var(--paper);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--teal); border-color: var(--teal); transform: translateY(-1px); }
.btn .arr { transition: transform .2s; }
.btn:hover .arr { transform: translateX(3px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--light { background: var(--paper); border-color: var(--paper); color: var(--teal-night); }
.btn--light:hover { background: #fff; border-color: #fff; }
.btn--outline-light { background: transparent; border-color: rgba(246, 242, 234, .4); color: var(--paper); }
.btn--outline-light:hover { background: var(--paper); border-color: var(--paper); color: var(--teal-night); }
.btn--sm { padding: .68em 1.1em; font-size: .92rem; }
.btn[aria-disabled="true"],
.btn:disabled { opacity: .55; pointer-events: none; }

.soon {
  padding: .25em .55em;
  border-radius: 999px;
  background: rgba(22, 32, 30, .1);
  font: 500 .62rem/1 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.btn--light .soon { background: rgba(7, 43, 40, .12); }
.btn--outline-light .soon { background: rgba(246, 242, 234, .16); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 5px;
}
.text-link:hover { text-decoration-color: currentColor; }
.text-link[aria-disabled="true"] { text-decoration: none; color: var(--muted); }

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: .42em .75em;
  border-radius: 999px;
  background: var(--teal-tint);
  color: var(--teal-deep);
  font: 500 .68rem/1 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip--clay { background: var(--clay-tint); color: var(--clay-deep); }
.chip--outline { background: transparent; border: 1px dashed var(--line-strong); color: var(--ink-2); }
.chip--dot::before {
  content: "";
  width: .6em;
  height: .6em;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2.4s ease-in-out infinite;
}
.section--dark .chip--outline { border-color: rgba(246, 242, 234, .35); color: rgba(246, 242, 234, .8); }

/* Image slots — fill themselves when a matching file exists (see site.js) */
.slot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: var(--ratio, 4 / 3);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--hatch), var(--paper-2);
  outline: 1.5px dashed var(--line-strong);
  outline-offset: -1.5px;
  color: var(--muted);
}
.section--tint .slot { background: var(--hatch), var(--paper); }
.slot__empty { display: grid; justify-items: center; gap: 8px; padding: 16px; text-align: center; }
.slot__empty .ico { width: 26px; height: 26px; opacity: .65; }
.slot__label {
  font: 500 .74rem/1.35 var(--font-mono);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.slot__path { font: 400 .68rem/1.35 var(--font-mono); word-break: break-all; }
.slot > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot.is-filled { outline: 0; background: var(--paper-2); }
.slot.is-filled .slot__empty { display: none; }
.slot figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 36px 16px 14px;
  background: linear-gradient(transparent, rgba(7, 43, 40, .82));
  color: var(--paper);
  font-size: .9rem;
  line-height: 1.35;
}
.section--dark .slot {
  background: repeating-linear-gradient(135deg, transparent 0 11px, rgba(246, 242, 234, .05) 11px 12px), rgba(246, 242, 234, .04);
  outline-color: rgba(246, 242, 234, .3);
  color: rgba(246, 242, 234, .6);
}
.section--dark .slot__label { color: rgba(246, 242, 234, .85); }

/* Device frames */
.phone {
  --pw: 290px;
  position: relative;
  flex: none;
  width: min(var(--pw), 72vw);
  aspect-ratio: 9 / 19;
  padding: calc(var(--pw) * .031);
  border-radius: calc(var(--pw) * .16);
  background: var(--ink);
  box-shadow: inset 0 0 0 1.5px #2D3A38, 0 40px 70px -30px rgba(7, 43, 40, .55), 0 12px 24px -12px rgba(7, 43, 40, .35);
}
.phone::before {
  content: "";
  position: absolute;
  top: calc(var(--pw) * .062);
  left: 50%;
  z-index: 3;
  width: calc(var(--pw) * .26);
  height: calc(var(--pw) * .066);
  translate: -50% 0;
  border-radius: 999px;
  background: var(--ink);
}
.phone__screen { position: relative; height: 100%; overflow: hidden; border-radius: calc(var(--pw) * .13); background: var(--card); }
.phone .slot { height: 100%; aspect-ratio: auto; border-radius: 0; outline: 0; background: var(--hatch), var(--card); }
.phone--sm { --pw: 232px; }
.phone--xs { --pw: 168px; }
.phone--xs .slot__path { display: none; }
.phone--xs .slot__label { font-size: .62rem; }

.browser {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.browser__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.browser__url {
  flex: 1;
  max-width: 250px;
  margin-left: 10px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(22, 32, 30, .06);
  font: 400 .68rem/1.4 var(--font-mono);
  color: var(--muted);
}
.browser .slot { --ratio: 16 / 10; border-radius: 0; outline: 0; background: var(--hatch), var(--card); }

/* Phone placeholder that looks like a camera viewfinder */
.slot--scan {
  --c: var(--teal);
  --t: 2.5px;
  --l: 24px;
  --from: 14%;
  --to: 52%;
  background:
    radial-gradient(circle at 50% 87%, rgba(14, 90, 83, .16) 0 15px, transparent 15.5px),
    radial-gradient(circle at 50% 87%, transparent 0 19px, var(--line-strong) 19.5px 21px, transparent 21.5px),
    var(--hatch), var(--card) !important;
}
.slot--scan::before {
  content: "";
  position: absolute;
  inset: 14% 13% 47%;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) top left / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) top right / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) bottom left / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) bottom right / var(--t) var(--l);
  background-repeat: no-repeat;
}
.slot--scan::after {
  content: "";
  position: absolute;
  left: 13%;
  right: 13%;
  top: 14%;
  height: 2px;
  border-radius: 2px;
  background: var(--clay);
  box-shadow: 0 0 18px 3px rgba(194, 94, 56, .45);
  animation: sweep 3.4s cubic-bezier(.5, 0, .5, 1) infinite;
}
.slot--scan .slot__empty { position: absolute; inset: 14% 13% 47%; align-content: center; }
.slot--scan .slot__empty .ico { display: none; }
.slot--scan.is-filled::before,
.slot--scan.is-filled::after { display: none; }

/* Result bars */
.result-card {
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.result-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.result-card__title { font-size: .95rem; font-weight: 600; line-height: 1.2; }
.result-card__note { margin-top: 14px; font-size: .74rem; line-height: 1.45; color: var(--muted); }

.bars { display: grid; gap: 13px; }
.bars li { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 7px 12px; }
.bars__name { font-size: .92rem; font-weight: 500; line-height: 1.25; }
.bars__val { font: 500 .88rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.bars__track { grid-column: 1 / -1; height: 6px; overflow: hidden; border-radius: 999px; background: rgba(22, 32, 30, .09); }
.bars__track i {
  display: block;
  width: var(--v, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}
.bars li:first-child .bars__track i { background: var(--clay); }
.bars--lg { gap: 18px; }
.bars--lg .bars__name { font-size: 1.05rem; }
.bars--lg .bars__val { font-size: 1rem; }
.bars--lg .bars__track { height: 8px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 20px; }
.card { padding: 26px 24px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.card .ico { width: 30px; height: 30px; margin-bottom: 26px; color: var(--teal); }
.card h3 { margin-bottom: 9px; }
.card p { font-size: 1rem; color: var(--ink-2); }
.card .chip { margin-bottom: 20px; }

/* Numbered steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { position: relative; padding: 24px 24px 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.step__n { font: 500 .78rem/1 var(--font-mono); letter-spacing: .12em; color: var(--clay-deep); }
.step .ico { position: absolute; top: 20px; right: 22px; width: 30px; height: 30px; color: var(--teal); }
.step h3 { margin: 46px 0 10px; }
.step p { font-size: 1rem; color: var(--ink-2); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } .step h3 { margin-top: 30px; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: clamp(24px, 4vw, 48px); }
.stat { padding-top: 18px; border-top: 1px solid var(--line-strong); }
.stat__num {
  font: 500 clamp(3.2rem, 2rem + 4.4vw, 5.4rem)/.95 var(--font-display);
  letter-spacing: -.03em;
  color: var(--teal);
}
.stat__num span { margin-left: .12em; font-size: .34em; font-style: italic; letter-spacing: 0; }
.stat__label { margin-top: 12px; max-width: 20em; color: var(--ink-2); }
.stat--empty { border-top-style: dashed; }
.stat--empty .stat__num { color: var(--line-strong); }
.section--dark .stat { border-color: rgba(246, 242, 234, .25); }
.section--dark .stat__label { color: rgba(246, 242, 234, .75); }

.source { margin-top: 20px; font-size: .82rem; color: var(--muted); }

/* Callouts */
.callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(194, 94, 56, .28);
  border-radius: var(--radius);
  background: var(--clay-tint);
  color: #57291A;
  line-height: 1.5;
}
.callout .ico { margin-top: 1px; color: var(--clay-deep); }
.callout strong { font-weight: 600; }
.callout--teal { border-color: rgba(14, 90, 83, .22); background: var(--teal-tint); color: var(--teal-night); }
.callout--teal .ico { color: var(--teal); }
.callout--sm { padding: 12px 14px; font-size: .9rem; border-radius: var(--radius-sm); }

/* Spec list */
.spec { border-top: 1px solid var(--line); }
.spec > div {
  display: grid;
  grid-template-columns: minmax(130px, 230px) 1fr;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.spec dt { font: 500 .76rem/1.35 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.spec dd { font-weight: 500; }
.spec .tbd { font-weight: 400; color: var(--muted); }
@media (max-width: 520px) { .spec > div { grid-template-columns: 1fr; gap: 4px; } }

/* Empty states */
.empty {
  padding: clamp(32px, 6vw, 64px) 24px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--hatch);
  text-align: center;
}
.empty h3 { margin: 14px 0 8px; }
.empty p { max-width: 32em; margin-inline: auto; color: var(--ink-2); }

/* FAQ */
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font: 500 clamp(1.15rem, 1.05rem + .4vw, 1.35rem)/1.25 var(--font-display);
  letter-spacing: -.01em;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.5rem/1 var(--font-mono); color: var(--teal); transition: rotate .2s; }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { max-width: 44em; padding-bottom: 24px; color: var(--ink-2); }

/* Skin-tone swatches */
.tones { display: inline-flex; padding-left: 7px; }
.tones i { width: 24px; height: 24px; margin-left: -7px; border: 2px solid var(--card); border-radius: 50%; }
.tones i:nth-child(1) { background: var(--tone-1); }
.tones i:nth-child(2) { background: var(--tone-2); }
.tones i:nth-child(3) { background: var(--tone-3); }
.tones i:nth-child(4) { background: var(--tone-4); }
.tones i:nth-child(5) { background: var(--tone-5); }
.tones i:nth-child(6) { background: var(--tone-6); }

/* Closing call to action */
.cta {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px 48px;
  overflow: hidden;
  padding: clamp(32px, 6vw, 72px);
  border-radius: var(--radius-lg);
  background: var(--teal-deep);
  color: var(--paper);
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(circle at 92% 50%, transparent 0 34px, rgba(246, 242, 234, .07) 34px 35px);
  -webkit-mask-image: radial-gradient(circle at 92% 50%, #000, transparent 60%);
  mask-image: radial-gradient(circle at 92% 50%, #000, transparent 60%);
  pointer-events: none;
}
.cta > * { position: relative; }
.cta h2 em { color: var(--clay-soft); }
.cta p { margin-top: 14px; max-width: 34em; color: rgba(246, 242, 234, .78); }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 820px) { .cta { grid-template-columns: 1fr; } }

/* 6. Page sections -------------------------------------------------------- */

/* Home hero */
.hero { position: relative; overflow: clip; padding-block: clamp(40px, 6vw, 84px) clamp(56px, 8vw, 104px); }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(circle at 76% 47%, transparent 0 38px, rgba(14, 90, 83, .08) 38px 39px);
  -webkit-mask-image: radial-gradient(circle at 76% 47%, #000 0, transparent 58%);
  mask-image: radial-gradient(circle at 76% 47%, #000 0, transparent 58%);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}
.hero__copy .chip { margin-bottom: 26px; }
.hero__copy .lead { margin-top: 26px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink-2);
}
.hero__meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta .ico { width: 19px; height: 19px; color: var(--teal); }

.hero__visual { position: relative; display: flex; justify-content: center; padding-right: clamp(40px, 9vw, 120px); }
.result-card--float { position: absolute; right: 0; bottom: 3%; z-index: 2; width: min(272px, 62%); }

@media (max-width: 900px) {
  .hero::before {
    background: repeating-radial-gradient(circle at 50% 74%, transparent 0 38px, rgba(14, 90, 83, .08) 38px 39px);
    -webkit-mask-image: radial-gradient(circle at 50% 74%, #000 0, transparent 52%);
    mask-image: radial-gradient(circle at 50% 74%, #000 0, transparent 52%);
  }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__visual { flex-direction: column; align-items: center; padding-right: 0; }
  .result-card--float { position: relative; right: auto; bottom: auto; width: min(330px, 100%); margin-top: -64px; }
}

/* Three-up fact band */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.facts > div { padding: 30px 30px 34px; border-left: 1px solid var(--line); }
.facts > div:first-child { padding-left: 0; border-left: 0; }
.facts h3 { margin-bottom: 8px; font-size: 1.3rem; }
.facts p { font-size: 1rem; color: var(--ink-2); }
@media (max-width: 820px) {
  .facts { grid-template-columns: 1fr; }
  .facts > div { padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); }
  .facts > div:first-child { border-top: 0; }
}

/* Phone + browser composition */
.devices { position: relative; padding: 0 0 44px 64px; }
.devices .phone { position: absolute; left: 0; bottom: 0; }
@media (max-width: 520px) { .devices { padding: 0 0 36px 84px; } .devices .phone { --pw: 120px; } }

.photo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .photo-row { grid-template-columns: 1fr 1fr; } .photo-row > :last-child { display: none; } }

/* Inner page hero */
.page-hero { position: relative; overflow: clip; padding-block: clamp(52px, 8vw, 108px) clamp(40px, 6vw, 76px); border-bottom: 1px solid var(--line); }
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(circle at 96% 12%, transparent 0 38px, rgba(14, 90, 83, .08) 38px 39px);
  -webkit-mask-image: radial-gradient(circle at 96% 12%, #000 0, transparent 52%);
  mask-image: radial-gradient(circle at 96% 12%, #000 0, transparent 52%);
  pointer-events: none;
}
.page-hero .wrap { position: relative; }
.page-hero h1 { max-width: 15em; margin-top: 20px; }
.page-hero .lead { margin-top: 24px; }
.page-hero__status { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* How it works — alternating rows */
.rows { display: grid; gap: clamp(48px, 8vw, 104px); }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: clamp(28px, 6vw, 88px); }
.row--flip .row__media { order: 2; }
.row__n { font: 500 .78rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--clay-deep); }
.row h2 { margin: 16px 0 16px; }
.row p { max-width: 30em; color: var(--ink-2); }
.row p + p { margin-top: .9em; }
.stage {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(28px, 5vw, 52px);
  border-radius: var(--radius-lg);
  background: var(--paper-2);
}
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(circle at 50% 50%, transparent 0 34px, rgba(14, 90, 83, .09) 34px 35px);
  -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 72%);
  mask-image: radial-gradient(circle, #000 20%, transparent 72%);
}
.stage > * { position: relative; }
@media (max-width: 820px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .row--flip .row__media { order: 0; }
}

/* Model page pipeline */
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); }
.pipeline li { position: relative; padding: 22px 22px 26px; border: 1px solid var(--line); background: var(--card); }
.pipeline li + li { margin-left: -1px; }
.pipeline li:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.pipeline li:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.pipeline li + li::before {
  content: "→";
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  translate: -50% -50%;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  font-size: .85rem;
  color: var(--teal);
}
.pipeline__n { font: 500 .72rem/1 var(--font-mono); letter-spacing: .12em; color: var(--clay-deep); }
.pipeline h3 { margin: 26px 0 8px; font-size: 1.25rem; }
.pipeline p { font-size: .95rem; color: var(--ink-2); }
@media (max-width: 860px) {
  .pipeline { grid-template-columns: 1fr; }
  .pipeline li + li { margin: -1px 0 0; }
  .pipeline li:first-child { border-radius: var(--radius) var(--radius) 0 0; }
  .pipeline li:last-child { border-radius: 0 0 var(--radius) var(--radius); }
  .pipeline li + li::before { top: 0; left: 50%; rotate: 90deg; }
  .pipeline h3 { margin-top: 14px; }
}

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-row .chip { padding: .7em 1.1em; font-size: .72rem; }

.checklist { display: grid; gap: 0; border-top: 1px solid var(--line); }
.checklist li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.checklist strong { display: block; font-weight: 600; }
.checklist .desc { display: block; font-size: .95rem; color: var(--ink-2); }
.section--dark .checklist,
.section--dark .checklist li { border-color: rgba(246, 242, 234, .2); }
.section--dark .checklist .desc { color: rgba(246, 242, 234, .72); }

/* Impact gallery */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(190px, 25vw, 330px); gap: 16px; }
.gallery .slot { height: 100%; aspect-ratio: auto; }
.gallery .slot:nth-child(1) { grid-column: span 7; }
.gallery .slot:nth-child(2) { grid-column: span 5; }
.gallery .slot:nth-child(3),
.gallery .slot:nth-child(4),
.gallery .slot:nth-child(5) { grid-column: span 4; }
.gallery .slot:nth-child(6) { grid-column: span 12; }
@media (max-width: 720px) {
  .gallery { grid-auto-rows: clamp(170px, 46vw, 260px); gap: 12px; }
  .gallery .slot:nth-child(n) { grid-column: span 6; }
  .gallery .slot:nth-child(1),
  .gallery .slot:nth-child(6) { grid-column: span 12; }
}

/* Team */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 44%), 1fr)); gap: 24px; }
.member .slot { --ratio: 4 / 5; }
.member__name { margin-top: 14px; font-weight: 600; }
.member__role { font-size: .95rem; color: var(--muted); }

/* 7. Scan demo ------------------------------------------------------------ */
.scan { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: start; gap: 24px; }
.scan .results { position: sticky; top: 92px; }
@media (max-width: 900px) {
  .scan { grid-template-columns: minmax(0, 1fr); }
  .scan .results { position: static; }
}

.panel { padding: clamp(20px, 3vw, 30px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 26px; margin-bottom: 18px; }
.panel__step { font: 500 .76rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; color: var(--clay-deep); }

.dropzone {
  --c: var(--line-strong);
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--hatch), var(--paper);
  outline: 1.5px dashed var(--c);
  outline-offset: -1.5px;
  text-align: center;
  cursor: pointer;
  transition: background .2s, outline-color .2s;
}
.dropzone:hover,
.dropzone:focus-within,
.dropzone.is-over { --c: var(--teal); background: var(--teal-tint); }
.dropzone .ico { width: 38px; height: 38px; margin: 0 auto 14px; color: var(--teal); }
.dropzone__title { font: 500 1.35rem/1.2 var(--font-display); letter-spacing: -.01em; color: var(--ink); }
.dropzone__hint { margin-top: 6px; font-size: .92rem; color: var(--muted); }

.preview { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--ink); }
.preview img { width: 100%; height: 100%; object-fit: contain; }
.preview__line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--clay-soft);
  box-shadow: 0 0 22px 5px rgba(232, 161, 127, .6);
  opacity: 0;
}
.preview.is-analysing .preview__line { --from: 2%; --to: 97%; animation: sweep 1.3s cubic-bezier(.5, 0, .5, 1) infinite alternate; }
.preview__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: .9rem; color: var(--muted); }
.preview__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { padding: 0; border: 0; background: none; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; color: var(--ink-2); cursor: pointer; }

.scan__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.scan__actions .btn { flex: 1 1 auto; }
.scan__privacy { display: flex; gap: 8px; margin-top: 16px; font-size: .86rem; line-height: 1.45; color: var(--muted); }
.scan__privacy .ico { width: 18px; height: 18px; margin-top: 1px; color: var(--teal); }

[data-stage="pick"] .when-preview,
[data-stage="preview"] .when-pick { display: none; }
.only-fine { display: none; }
@media (pointer: fine) { .only-touch { display: none; } .only-fine { display: block; } }

.state { display: none; }
[data-state="empty"] .state--empty,
[data-state="ready"] .state--empty,
[data-state="analysing"] .state--analysing,
[data-state="offline"] .state--offline,
[data-state="result"] .state--result,
[data-state="error"] .state--error { display: block; }
.state__text { margin-top: 22px; color: var(--ink-2); }
.state h3 { margin-bottom: 10px; }
.state p + .btn, .state p + p { margin-top: 16px; }
.state .callout { margin-bottom: 20px; }
.state__note { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }

.ghost-bars { display: grid; gap: 18px; }
.ghost-bars li { display: grid; gap: 9px; }
.ghost-bars li::before,
.ghost-bars li::after { content: ""; height: 11px; width: var(--w, 50%); border-radius: 999px; background: rgba(22, 32, 30, .08); }
.ghost-bars li::after { height: 8px; width: 100%; background: rgba(22, 32, 30, .06); }
.state--analysing .ghost-bars li::before,
.state--analysing .ghost-bars li::after { animation: shimmer 1.2s ease-in-out infinite alternate; }

.results .bars__track i { animation: grow .9s cubic-bezier(.2, .7, .2, 1) backwards; }

/* Result: headline match, ranked list, next step */
.verdict { padding: 18px 20px 20px; border-radius: var(--radius); background: var(--teal-tint); color: var(--teal-night); }
.verdict__kicker { font: 500 .72rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
.verdict__main { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-top: 12px; }
.state .verdict__name { margin: 0; font-size: clamp(1.5rem, 1.25rem + 1vw, 1.95rem); overflow-wrap: anywhere; }
.verdict__pct { font: 500 clamp(1.9rem, 1.5rem + 1.6vw, 2.5rem)/1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--teal); }
.state .verdict__read { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(14, 90, 83, .18); font-size: .95rem; line-height: 1.5; }
.verdict__read .chip { margin: 0 10px 6px 0; background: var(--card); vertical-align: middle; }

.verdict + .bars { margin-top: 26px; }
.bars-toggle { margin-top: 8px; padding: 12px 0; font-size: .92rem; }
.bars-toggle[hidden] + .next { margin-top: 26px; }
.preview__meta .link-btn { margin-block: -10px; padding: 10px 0 10px 14px; }

.next { margin-top: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.next__h { margin-bottom: 8px; font: 500 .72rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--clay-deep); }
.next p { font-size: .98rem; line-height: 1.5; color: var(--ink-2); }
.next p + p { margin-top: 0; }
.state .next__urgent { margin-top: 10px; font-weight: 600; color: var(--clay-deep); }

.results__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 20px; }
.results__actions .btn { min-height: 44px; }
.results__actions .text-link { padding-block: 11px; font-size: .95rem; }

.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.tips li { display: flex; gap: 12px; padding: 18px 20px; box-shadow: 0 0 0 .5px var(--line); font-size: .95rem; color: var(--ink-2); }
.tips .ico { width: 22px; height: 22px; color: var(--teal); }
.tips strong { display: block; color: var(--ink); }

/* 8. Motion --------------------------------------------------------------- */
@keyframes sweep {
  0% { top: var(--from, 14%); opacity: 0; }
  12%, 88% { opacity: 1; }
  100% { top: var(--to, 52%); opacity: 0; }
}
@keyframes pulse { 50% { opacity: .35; } }
@keyframes shimmer { to { opacity: .45; } }
@keyframes grow { from { width: 0; } }

@keyframes rise { from { opacity: 0; translate: 0 18px; } }

/* Keyframes rather than transitions, so anything already on screen at load still animates in. */
.js .reveal { opacity: 0; }
.js .reveal.is-in { opacity: 1; animation: rise .7s cubic-bezier(.2, .7, .2, 1) var(--d, 0s) backwards; }
.js .reveal.is-in .bars__track i { animation: grow 1.1s cubic-bezier(.2, .7, .2, 1) calc(var(--d, 0s) + .3s) backwards; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; }
}

@media print {
  site-header { position: static; }
  .js .reveal { opacity: 1 !important; animation: none !important; }
}
