/* ZEAUTY · site stylesheet. Tokens in :root (night) and html[data-theme="light"] (day); everything else reads the tokens. */

@font-face {
  font-family: "BankGothic Lt BT";
  src: url("../assets/fonts/BankGothicLtBT.ttf") format("truetype");
  font-weight: 300 400;
  font-display: swap;
}


@font-face { font-family: "Michroma"; src: url("../assets/fonts/Michroma-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Marcellus"; src: url("../assets/fonts/Marcellus-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../assets/fonts/HankenGrotesk-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../assets/fonts/HankenGrotesk-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../assets/fonts/HankenGrotesk-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: oklch(1 0 0);
  --surface: oklch(0.96 0 0);
  --ink: oklch(0.17 0 0);
  --muted: oklch(0.42 0 0);
  --line: oklch(0.86 0 0);
  --accent: oklch(0.42 0.09 175);
  --accent-ink: oklch(0.99 0 0);
  --danger: oklch(0.5 0.19 25);
  --radius: 0px;
  --font-logo: "BankGothic Lt BT", "Michroma", sans-serif;
  --font-display: "Jost", sans-serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --z-sticky: 10;
  --z-menu: 20;
  --wrap: 1400px;
  --gutter: clamp(20px, 4vw, 64px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.015em; }
p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.nowrap { white-space: nowrap; }

/* ---------- masthead: centred wordmark + motto ---------- */
.masthead { text-align: center; padding-block: clamp(40px, 6vw, 88px) clamp(24px, 4vw, 56px); }
.wordmark {
  font-family: var(--font-logo);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  font-size: 3.2vw; /* refined by site.js: 15% of the viewport width on desktop, 90% on mobile */
}
.wordmark:hover { color: var(--ink); }
.motto {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1rem, 1.25vw, 1.25rem);
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-top: clamp(14px, 1.6vw, 24px);
}

/* ---------- burger menu, fixed top right ---------- */
.menu { position: fixed; top: clamp(14px, 2vw, 28px); right: clamp(14px, 2vw, 28px); z-index: var(--z-menu); }
.menu__btn {
  width: 48px; height: 48px; padding: 0; border: 0; cursor: pointer;
  background: transparent; display: grid; place-items: center; border-radius: var(--radius);
}
.menu__btn span { display: block; width: 26px; height: 2px; background: var(--ink); margin: 3px 0; transition: transform .35s var(--ease), opacity .25s; }
.menu[data-open="true"] .menu__btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu[data-open="true"] .menu__btn span:nth-child(2) { opacity: 0; }
.menu[data-open="true"] .menu__btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.menu__list {
  list-style: none; margin: 8px 0 0; padding: 12px 0;
  min-width: 220px;
  position: absolute; right: 0; top: 100%;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px -20px oklch(0 0 0 / .35);
  opacity: 0; transform: translateY(-6px); pointer-events: none; visibility: hidden;
  transition: opacity .3s var(--ease), transform .4s var(--ease), visibility 0s .4s;
}
.menu[data-open="true"] .menu__list { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.menu__list a {
  display: block; padding: 12px 24px;
  font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; letter-spacing: 0.01em;
  color: var(--ink); text-decoration: none;
}
.menu__list a:hover, .menu__list a:focus-visible { color: var(--accent); outline: none; background: var(--surface); }

/* ---------- theme toggle: a 64x32 pill with two 24px circles that swap places (ported from the React ThemeToggle) ---------- */
.theme-toggle {
  position: absolute; top: clamp(14px, 2vw, 28px); left: clamp(14px, 2vw, 28px); z-index: var(--z-menu);
  width: 64px; height: 32px; padding: 4px; margin: 8px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 999px; border: 1px solid #27272a; background: #09090b; cursor: pointer;
  transition: background .3s, border-color .3s;
}
/* the pill is 32px tall by design; the tap area is extended to 48px without changing its look */
.theme-toggle::before { content: ""; position: absolute; inset: -8px; border-radius: 999px; }
html[data-theme="light"] .theme-toggle { background: #ffffff; border-color: #e4e4e7; }
.theme-toggle__knob, .theme-toggle__rest { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; transition: transform .3s var(--ease), background .3s; }
.theme-toggle__knob { background: #27272a; }
.theme-toggle__rest { background: transparent; }
html[data-theme="light"] .theme-toggle__knob { transform: translateX(32px); background: #e5e7eb; }
html[data-theme="light"] .theme-toggle__rest { transform: translateX(-32px); }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle__knob .i-moon { color: #ffffff; } .theme-toggle__knob .i-sun { display: none; color: #374151; }
.theme-toggle__rest .i-sun { color: #6b7280; } .theme-toggle__rest .i-moon { display: none; color: #000000; }
html[data-theme="light"] .theme-toggle__knob .i-moon { display: none; } html[data-theme="light"] .theme-toggle__knob .i-sun { display: block; }
html[data-theme="light"] .theme-toggle__rest .i-sun { display: none; } html[data-theme="light"] .theme-toggle__rest .i-moon { display: block; }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .theme-toggle, .theme-toggle__knob, .theme-toggle__rest { transition: none; } }

/* ---------- sections ---------- */
section { padding-block: clamp(56px, 8vw, 128px); }
.section-title { font-size: clamp(1.9rem, 3.4vw, 3rem); margin-bottom: clamp(20px, 2.5vw, 36px); }
.prose { max-width: 62ch; }
.prose--lead { font-size: 1.15rem; }

/* ---------- hero: manifesto left, five faces right, closing line and buttons across the full width ---------- */
.hero { padding-top: clamp(8px, 2vw, 24px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: 0 clamp(32px, 4vw, 72px); align-items: start; }
.hero h1 { font-size: clamp(2.2rem, 4vw, 3.6rem); margin-bottom: clamp(20px, 2.5vw, 36px); }
.manifesto { max-width: none; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.manifesto__q { text-align: left; }
.hero__close {
  margin-top: clamp(28px, 3.5vw, 56px);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  line-height: 1.35;
}
.hero__cta { margin-top: clamp(24px, 2.5vw, 36px); display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero__visual { align-self: stretch; }
.hero__sticky { position: sticky; top: clamp(16px, 3vw, 40px); }

/* five faces, straight on the page: no panel, no frame */
.faces {
  margin: 0; position: relative;
  aspect-ratio: 1.15;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 2%;
}
.faces img {
  width: auto; height: 100%; max-height: 100%; max-width: 100%;
  place-self: center;
  transition: transform .8s var(--ease), opacity .8s var(--ease);
  will-change: transform;
}
.faces img[data-view="top"]    { grid-area: 1 / 2; }
.faces img[data-view="left"]   { grid-area: 2 / 1; }
.faces img[data-view="front"]  { grid-area: 2 / 2; }
.faces img[data-view="right"]  { grid-area: 2 / 3; }
.faces img[data-view="bottom"] { grid-area: 3 / 2; }
.faces canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
html.js .faces--reveal img { opacity: 0; transform: translateY(14px) scale(.985); }
html.js .faces--reveal.in img { opacity: 1; transform: none; transition-delay: calc(var(--i) * 140ms); }
.faces img:nth-of-type(1) { --i: 0; } .faces img:nth-of-type(2) { --i: 1; } .faces img:nth-of-type(3) { --i: 2; } .faces img:nth-of-type(4) { --i: 3; } .faces img:nth-of-type(5) { --i: 4; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px;
  font-family: var(--font-display); font-weight: 500; font-size: 1rem; letter-spacing: 0.01em;
  color: var(--accent-ink); background: var(--accent);
  border: 1px solid var(--accent); border-radius: var(--radius);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), background .3s, color .3s, border-color .3s;
}
.btn:hover { color: var(--accent-ink); filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }

/* ---------- technology: the scanner at 95% width, copy inside the empty space between the cameras ---------- */
.tech { padding-inline: 0; }
.scanner { position: relative; width: 95%; margin-inline: auto; --sc-text-top: 22.5%; --sc-text-h: 37%; --sc-face-top: 19%; --sc-face-h: 44%; }
.scanner__frame { position: relative; }
.scanner__fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.scanner__frame > img:first-child { width: 100%; height: auto; }
.scanner__text {
  position: absolute; left: 13%; top: var(--sc-text-top); width: 74%; height: var(--sc-text-h);
  display: flex; flex-direction: column; justify-content: center;
}
.scanner__text .section-title { font-size: clamp(1.25rem, 2.2vw, 2.4rem); margin-bottom: 0.55em; text-align: center; }
.scanner__body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 4%; font-size: clamp(0.8125rem, 1.12vw, 1.1875rem); line-height: 1.5; }
.scanner__body p + p { margin-top: 0; }
.scanner__close { font-size: clamp(0.8125rem, 1.12vw, 1.1875rem); line-height: 1.5; text-align: center; max-width: 66ch; margin: 1em auto 0; }
/* on narrow screens the copy moves under the image and the front face fills the scanner instead */
.scanner__face { display: none; }
@media (max-width: 1099px) {
  .scanner__face { display: block; position: absolute; left: 13%; top: var(--sc-face-top); width: 74%; height: var(--sc-face-h); object-fit: contain; }
  .scanner__text { position: static; width: auto; height: auto; padding: clamp(24px, 4vw, 40px) var(--gutter) 0; max-width: var(--wrap); margin-inline: auto; }
  .scanner__text .section-title { font-size: clamp(1.9rem, 3.4vw, 3rem); text-align: left; }
  .scanner__body { grid-template-columns: 1fr; font-size: 1.0625rem; line-height: 1.6; max-width: 62ch; }
  .scanner__body p + p { margin-top: 1em; }
  .scanner__close { font-size: 1.0625rem; line-height: 1.6; text-align: left; max-width: 62ch; margin: 1em 0 0; }
}

/* ---------- early access form ---------- */
.signup { max-width: 560px; }
.signup label { display: block; font-family: var(--font-display); font-weight: 500; font-size: 0.95rem; margin-bottom: 8px; }
.signup__row { display: flex; gap: 12px; flex-wrap: wrap; }
.signup input[type="email"] {
  flex: 1 1 260px; min-height: 48px; padding: 0 16px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--ink); border-radius: var(--radius);
}
.signup input::placeholder { color: var(--muted); opacity: 1; }
.signup input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.signup__help { font-size: 0.9rem; color: var(--muted); margin-top: 12px; }
.signup__msg { margin-top: 12px; font-size: 0.95rem; min-height: 1.4em; }
.signup__msg[data-state="error"] { color: var(--danger); }
.signup__msg[data-state="ok"] { color: var(--accent); }
.signup .hp { position: absolute; left: -9999px; }
.signup[data-state="done"] .signup__row, .signup[data-state="done"] label, .signup[data-state="done"] .signup__help { display: none; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 32px; font-size: 0.9rem; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer .wordmark { font-size: 1rem; }

/* ---------- reveal ---------- */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform 1s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal, html.js .faces--reveal img { opacity: 1; transform: none; transition: none; }
  .faces img { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { order: -1; margin-bottom: clamp(24px, 5vw, 40px); }
  .hero__sticky { position: static; }
  .faces { aspect-ratio: 1.1; max-width: 560px; margin-inline: auto; }
  .hero__close { margin-top: 24px; }
}
@media (max-width: 600px) {
  .manifesto { text-align: left; }
  .menu__btn span { width: 24px; }
  /* the wordmark spans 90% of the screen, so the fixed controls get their own row above it */
  .masthead { padding-top: 76px; }
}

/* ---------- Obsidian theme ---------- */
:root {
  --bg: oklch(0.10 0 0); --surface: oklch(0.14 0 0);
  --ink: oklch(0.93 0 0); --muted: oklch(0.72 0 0); --line: oklch(0.26 0 0);
  --accent: oklch(0.78 0.07 85); --accent-ink: oklch(0.12 0 0);
  --danger: oklch(0.78 0.14 25);
  --radius: 0px;
  --font-display: "Marcellus", serif; --font-body: "Hanken Grotesk", sans-serif;
  color-scheme: dark;
}
.motto { font-family: var(--font-body); font-weight: 300; letter-spacing: 0.12em; text-transform: uppercase; font-size: clamp(0.8rem, 0.95vw, 0.95rem); }
h1, h2, h3 { letter-spacing: 0; font-weight: 400; }
.hero h1 { font-size: clamp(2.4rem, 4.2vw, 3.9rem); }
.menu__list { box-shadow: 0 30px 80px -20px oklch(0 0 0 / .8); }
.access { background: var(--surface); border-block: 1px solid var(--line); }
.signup input[type="email"] { background: var(--bg); border-color: var(--line); }
.signup input[type="email"]:hover { border-color: var(--muted); }
/* the dark scanner image is cropped to the camera ring, so the interior fractions differ from the light one */
.scanner { --sc-text-top: 25.5%; --sc-text-h: 57%; --sc-face-top: 23.6%; --sc-face-h: 60.9%; }
.tech { padding-block: clamp(16px, 2.5vw, 40px); }

/* ---- day mode: same type, same layout, only the light changes ---- */
html[data-theme="light"] {
  --bg: oklch(1 0 0); --surface: oklch(0.965 0 0);
  --ink: oklch(0.13 0 0); --muted: oklch(0.45 0 0); --line: oklch(0.87 0 0);
  --accent: oklch(0.52 0.09 80); --accent-ink: oklch(1 0 0);
  --danger: oklch(0.5 0.19 25);
  color-scheme: light;
}
html[data-theme="light"] .menu__list { box-shadow: 0 24px 60px -20px oklch(0 0 0 / .25); }
html[data-theme="light"] .signup input[type="email"]:hover { border-color: var(--ink); }
/* the light scanner keeps its stand, so its interior sits higher in a taller image */
html[data-theme="light"] .scanner { --sc-text-top: 20.5%; --sc-text-h: 41%; --sc-face-top: 19%; --sc-face-h: 44%; }

.access__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.about__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 4vw, 64px); }
@media (max-width: 800px) { .access__grid, .about__grid { grid-template-columns: 1fr; } }
