/* SkinSwan landing page — built exactly against stages/02-build/brand-kit.md ("Warm Light"). */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/fraunces-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/hanken-grotesk-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/hanken-grotesk-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/hanken-grotesk-var.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/plex-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/plex-mono-500.woff2') format('woff2');
}

:root {
  --paper: #FBF8F4;
  --card: #FFFFFF;
  --sand: #EFE8DD;
  --ink: #2A2521;
  --ink-60: #6B6259;
  --line: #E8E1D7;
  --clay: #C77B5B;
  --clay-soft: #F4E4DB;
  --clay-deep: #A9633F;
  --slate: #7C93A3;
  --eucalyptus: #7A9A7E;
  --brick: #B5544A;

  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-ui: 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-data: 'IBM Plex Mono', ui-monospace, monospace;

  --shadow-card: 0 2px 12px rgba(42, 37, 33, 0.06);
  --radius-card: 16px;
  --radius-button: 12px;
  --radius-chip: 10px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #1B1714;
  --card: #26211D;
  --sand: #322B25;
  --ink: #F2ECE3;
  --ink-60: #A99E92;
  --line: #3A322B;
  --clay: #D98E6D;
  --clay-soft: #3A2A22;
  --slate: #8FA6B5;
  --eucalyptus: #8FB093;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1B1714;
    --card: #26211D;
    --sand: #322B25;
    --ink: #F2ECE3;
    --ink-60: #A99E92;
    --line: #3A322B;
    --clay: #D98E6D;
    --clay-soft: #3A2A22;
    --slate: #8FA6B5;
    --eucalyptus: #8FB093;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 24px;
}

a { color: inherit; }

.eyebrow-none { display: none; } /* placeholder kept intentionally unused — eyebrows dropped per brand's calm tone */

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo img {
  height: 44px;
  width: auto;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-60);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-link:hover,
.nav-link[aria-current="page"] { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  border-radius: var(--radius-button);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--clay);
  color: #FFFFFF;
  padding: 14px 24px;
}
.btn-primary:hover { background: var(--clay-deep); }

.btn-primary-sm {
  background: var(--clay);
  color: #FFFFFF;
  padding: 10px 18px;
  font-size: 14px;
}
.btn-primary-sm:hover { background: var(--clay-deep); }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
  padding: 13px 23px;
}
.btn-ghost:hover { border-color: var(--ink-60); }

/* ---------- Hero (asymmetric split) ---------- */

.hero {
  padding-top: 56px;
  padding-bottom: 96px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 4.5vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 12ch;
}

.hero-copy p {
  margin-top: 20px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-60);
  max-width: 46ch;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

/* Skin Score card — built exactly to brand-kit §6 spec: Ink number in Plex Mono,
   Sand track + Clay progress arc, Fraunces label. Not a fabricated app screenshot;
   this is the one specced component the kit describes in full. */
.score-card {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  padding: 40px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  background-image: linear-gradient(180deg, var(--paper), var(--clay-soft));
}

.score-label {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink-60);
}

.score-ring-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 24px auto;
}

.score-ring-wrap svg { transform: rotate(-90deg); }

.score-track { fill: none; stroke: var(--sand); stroke-width: 10; }
.score-arc {
  fill: none;
  stroke: var(--clay);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 452;
  stroke-dashoffset: 452;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.score-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 48px;
  color: var(--ink);
}

.score-finding {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.score-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--slate);
  margin-top: 7px;
  flex-shrink: 0;
}

.score-finding p { margin: 0; font-size: 14px; color: var(--ink-60); line-height: 1.5; }
.score-finding strong { color: var(--ink); font-weight: 600; display: block; margin-bottom: 2px; }

/* ---------- Section shell ---------- */

section { padding-block: 88px; }

.section-head {
  max-width: 44ch;
  margin-bottom: 48px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.15;
  color: var(--ink);
}

.section-head p {
  margin-top: 14px;
  font-size: 17px;
  color: var(--ink-60);
  line-height: 1.6;
}

/* ---------- Bento (5 items, mixed sizes, real visual variation) ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.bento-item {
  border-radius: var(--radius-card);
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--card);
}

.bento-item.tint { background: var(--clay-soft); border-color: transparent; }

.bento-1 { grid-column: span 3; }
.bento-2 { grid-column: span 3; }
.bento-3 { grid-column: span 2; }
.bento-4 { grid-column: span 2; }
.bento-5 { grid-column: span 2; }

.bento-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sand);
  color: var(--ink);
  margin-bottom: 18px;
}
.bento-item.tint .bento-icon { background: rgba(255,255,255,0.55); }
.bento-icon svg { width: 20px; height: 20px; }

/* scan cell — Slate is quarantined to this one moment per brand-kit rationale */
.bento-icon.icon-scan { background: var(--slate); color: #fff; }

/* progress cell — Eucalyptus is the only "improving" signal, used once */
.trend-line { margin-top: 14px; }
.trend-line svg { width: 100%; height: 36px; }

.bento-item h3 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
}

.bento-item p {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--ink-60);
  line-height: 1.55;
}

/* ---------- How it works (asymmetric timeline, not equal cards) ---------- */

.timeline { border-top: 1px solid var(--line); }

.timeline-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding-block: 28px;
  border-bottom: 1px solid var(--line);
}

.timeline-num {
  font-family: var(--font-data);
  font-size: 14px;
  color: var(--ink-60);
  padding-top: 4px;
}

.timeline-body h3 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
}

.timeline-body p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-60);
  max-width: 56ch;
  line-height: 1.6;
}

/* ---------- Editorial (full-width text block, no bullet spec-sheet) ---------- */

.editorial {
  background: var(--sand);
}

.editorial-inner {
  max-width: 62ch;
}

.editorial h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3vw, 2.375rem);
  line-height: 1.2;
  color: var(--ink);
}

.editorial p {
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-60);
}

.editorial p + p { margin-top: 16px; }

/* ---------- Final CTA (centered banner — distinct family from hero) ---------- */

.cta-banner {
  text-align: center;
  padding-block: 96px;
}

.cta-banner h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--ink);
  max-width: 16ch;
  margin-inline: auto;
}

.cta-banner p {
  margin: 16px auto 0;
  max-width: 46ch;
  color: var(--ink-60);
  font-size: 16px;
}

.cta-banner .btn { margin-top: 28px; }

/* ---------- Waitlist form ---------- */

.waitlist-form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin-inline: auto;
  margin-top: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1 1 220px;
  text-align: left;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.field input {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 15px;
  padding: 12px 14px;
  border-radius: var(--radius-chip);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
}

.field input::placeholder { color: var(--ink-60); opacity: 0.7; }

.field input:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--clay) 25%, transparent);
}

.field-error {
  font-size: 12.5px;
  color: var(--brick);
  display: none;
}

.field.has-error input { border-color: var(--brick); }
.field.has-error .field-error { display: block; }

.form-status {
  margin-top: 14px;
  font-size: 14px;
  color: var(--eucalyptus);
  display: none;
}
.form-status.visible { display: block; }

.form-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-60);
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding-block: 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo img { height: 36px; width: auto; }

.footer-meta {
  font-size: 13px;
  color: var(--ink-60);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: var(--ink-60);
  text-decoration: none;
}
.footer-links a:hover { color: var(--ink); text-decoration: underline; }


/* ---------- App screens (staggered phone frames) ---------- */

.screens-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 260px));
  justify-content: center;
  align-items: start;
  gap: 40px;
}

.screen:nth-child(2) { margin-top: 56px; }

/* Device frame is fixed dark in both themes: it is hardware, not UI. */
.phone {
  aspect-ratio: 9 / 18.5;
  border: 7px solid #2A2521;
  border-radius: 34px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 18px 40px rgba(42, 37, 33, 0.14);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.screen figcaption {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-60);
  text-align: center;
}

/* ---------- Legal pages ---------- */

.legal-head { padding-top: 64px; padding-bottom: 8px; }

.legal-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.legal-updated {
  margin-top: 14px;
  font-family: var(--font-data);
  font-size: 13px;
  color: var(--ink-60);
}

.legal {
  display: grid;
  grid-template-columns: 220px minmax(0, 68ch);
  gap: 72px;
  padding-block: 48px 112px;
}

.toc {
  position: sticky;
  top: 96px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
}

.toc a {
  padding: 6px 0 6px 14px;
  border-left: 2px solid var(--line);
  color: var(--ink-60);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.toc a:hover { color: var(--ink); border-color: var(--clay); }

.legal-body > * + * { margin-top: 16px; }

.legal-body h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.625rem;
  line-height: 1.2;
  margin-top: 56px;
  scroll-margin-top: 96px;
}
.legal-body h2:first-child { margin-top: 0; }

.legal-body h3 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 32px;
}

.legal-body p,
.legal-body li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-60);
}

.legal-body strong { color: var(--ink); font-weight: 600; }

.legal-body ul { padding-left: 20px; }
.legal-body li + li { margin-top: 8px; }

.legal-body a {
  color: var(--clay-deep);
  text-underline-offset: 3px;
}
:root[data-theme="dark"] .legal-body a { color: var(--clay); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .legal-body a { color: var(--clay); }
}

.callout {
  background: var(--clay-soft);
  border-radius: var(--radius-card);
  padding: 24px 28px;
}
.callout p { color: var(--ink); }
.callout > * + * { margin-top: 12px; }

.legal-caps { font-size: 14px !important; letter-spacing: 0.01em; }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .score-arc { transition: none; }
}

/* ---------- Mobile ---------- */

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy h1 { max-width: none; }
  .hero-visual { order: -1; }
  .score-card { max-width: 300px; }

  .bento { grid-template-columns: 1fr 1fr; }
  .bento-1, .bento-2, .bento-3, .bento-4, .bento-5 { grid-column: span 2; }

  .timeline-row { grid-template-columns: 40px 1fr; }

  .screens-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .screen:nth-child(2) { margin-top: 32px; }
  .phone { border-width: 5px; border-radius: 24px; }

  .legal { grid-template-columns: 1fr; gap: 32px; padding-bottom: 80px; }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .toc a { border: 1px solid var(--line); border-radius: var(--radius-chip); padding: 6px 12px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .wrap { padding-inline: 20px; }
  section { padding-block: 64px; }
  .hero { padding-top: 40px; padding-bottom: 64px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .bento { grid-template-columns: 1fr; }
  .bento-1, .bento-2, .bento-3, .bento-4, .bento-5 { grid-column: span 1; }
  .waitlist-form { flex-direction: column; }
  .nav-actions { gap: 16px; }
  .nav-link { display: none; }
  .screens-row { grid-template-columns: 1fr; gap: 40px; }
  .screen { max-width: 260px; margin-inline: auto; }
  .screen:nth-child(2) { margin-top: 0; }
  .legal-head { padding-top: 40px; }
  .callout { padding: 20px; }
}
