/* 3D Character Creator - site stylesheet (shared by every page).
   Layout: a dark photo studio. Left-aligned copy over a spot-lit backdrop,
   the app window as the hero object, then download cards, a style A/B, a
   spec sheet and FAQ. Single dark theme by choice: it mirrors the app.
   Contrast: every text token is >= 4.5:1 on every surface it sits on. */
:root {
  color-scheme: dark;
  --bg: #111115;
  --bg-2: #1a1a22;
  --surface: #20202a;
  --surface-2: #272733;
  --line: #2e2e3a;
  --line-2: #464655;
  --fg: #e6e6ec;
  --muted: #a3a3b1;      /* 7.6:1 on --bg, 5.9:1 on --surface-2 */
  --faint: #8e8e9c;      /* 5.9:1 on --bg, 4.6:1 on --surface-2 */
  --silver: #c9ccd4;
  --silver-hi: #eef0f4;
  --good: #9fc2a3;
  --warn: #d8b88a;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 14px;
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--silver-hi); text-underline-offset: 3px; text-decoration-color: var(--line-2); }
a:hover { text-decoration-color: var(--silver); }
:focus-visible { outline: 2px solid var(--silver); outline-offset: 3px; border-radius: 6px; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--silver); color: #15151b; padding: 10px 14px; border-radius: 8px; font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.band { padding-block: clamp(56px, 9vw, 104px); }
.band + .band { border-top: 1px solid var(--line); }

h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 6.4vw, 5rem); line-height: 0.98; font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.05; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 58ch; }
.eyebrow {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint);
}
.section-head { display: grid; gap: 14px; margin-bottom: 40px; max-width: 720px; }

/* ---------------------------------------------------------------- header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; padding-block: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em; color: var(--silver-hi); text-decoration: none; }
.brand small { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); font-weight: 400; letter-spacing: 0.05em; }
.nav { display: flex; gap: 6px 20px; flex-wrap: wrap; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; padding-block: 6px; }
.nav a:hover { color: var(--fg); }
.nav .nav-cta {
  color: #15151b; background: var(--silver); padding: 7px 14px; border-radius: 8px; font-weight: 600;
}
.nav .nav-cta:hover { background: var(--silver-hi); color: #15151b; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 1rem/1.1 var(--body); text-decoration: none; text-align: center;
  padding: 15px 22px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--fg);
  transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn:hover { background: var(--surface-2); border-color: var(--silver); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--silver); border-color: var(--silver); color: #15151b; }
.btn-primary:hover { background: var(--silver-hi); border-color: var(--silver-hi); color: #15151b; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn[aria-disabled="true"] { opacity: 0.6; cursor: progress; }

/* the one CTA that matters */
.btn-hero {
  font-size: 1.12rem; padding: 19px 30px; border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(238, 240, 244, 0.25), 0 12px 40px rgba(201, 204, 212, 0.18);
}
.btn-hero:hover { box-shadow: 0 0 0 1px rgba(238, 240, 244, 0.4), 0 14px 48px rgba(201, 204, 212, 0.28); }
.btn-hero svg { width: 20px; height: 20px; }
.btn-hero .sub { display: block; font: 500 0.78rem/1.2 var(--mono); opacity: 0.75; margin-top: 4px; }
.btn-hero .txt { display: grid; text-align: left; }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 8vw, 96px) 0;
  background:
    radial-gradient(ellipse 70% 55% at 62% 62%, rgba(201, 204, 212, 0.10), transparent 70%),
    linear-gradient(180deg, #17171e 0%, var(--bg) 100%);
}
.hero-copy { display: grid; gap: 22px; max-width: 760px; }
.hero .eyebrow { color: var(--muted); }   /* sits on the lighter gradient: keep >= 5.8:1 */
.hero h1 .soft { color: #a6a6b4; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; margin-top: 8px; }
.cta-row .alt { color: var(--muted); font-size: 0.95rem; }
.cta-status { min-height: 1.4em; font-size: 0.9rem; color: var(--muted); }

.stage { margin-top: clamp(40px, 6vw, 64px); position: relative; }
.stage::after {
  content: ""; position: absolute; left: 10%; right: 10%; bottom: -30px; height: 60px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55), transparent 70%);
  z-index: 0;
}
.window {
  position: relative; z-index: 1;
  border: 1px solid var(--line-2); border-bottom: none;
  border-radius: 12px 12px 0 0; overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 -20px 80px rgba(0, 0, 0, 0.45);
}
.window-bar { display: flex; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.window-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.window img { width: 100%; aspect-ratio: 1600 / 964; }

/* ---------------------------------------------------------------- downloads */
.platforms { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 900px) { .platforms { grid-template-columns: repeat(3, minmax(0, 1fr)); } }  /* never 2 + 1 */
.platform {
  display: grid; grid-template-rows: auto auto 1fr auto; gap: 18px;
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); min-width: 0;
}
.platform.is-you { border-color: var(--silver); background: var(--surface); }
.platform-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.platform-head h3 { display: flex; align-items: center; gap: 10px; }
.platform-head svg { width: 22px; height: 22px; color: var(--silver); }
.you-tag {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: #15151b; background: var(--silver); padding: 3px 8px; border-radius: 99px;
}
.file { display: grid; gap: 2px; font-family: var(--mono); font-size: 0.8rem; color: var(--muted); min-width: 0; }
.file b { color: var(--fg); font-weight: 500; overflow-wrap: anywhere; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); font-size: 0.94rem; }
.steps li::marker { color: var(--faint); font-family: var(--mono); font-size: 0.85em; }
code {
  font-family: var(--mono); font-size: 0.82em; color: var(--fg);
  background: var(--surface-2); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere;
}
.platform-foot { display: grid; gap: 12px; }
.platform .btn { width: 100%; }
.native { display: grid; gap: 8px; }
.native-alt { font-size: 0.88rem; color: var(--muted); }
.status { min-height: 1.3em; font-size: 0.86rem; color: var(--muted); }
.status.ok { color: var(--good); }
.status.warn { color: var(--warn); }
.hash { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hash code {
  flex: 1; min-width: 0; font-size: 0.72rem; color: var(--faint); background: transparent; padding: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all;
}
.hash button {
  flex: none; font: 500 0.74rem var(--mono); color: var(--muted); background: transparent;
  border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 10px; cursor: pointer; min-height: 32px;
}
.hash button:hover { color: var(--fg); border-color: var(--silver); }

.req {
  margin: 20px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: baseline;
  padding: 18px 22px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); font-size: 0.94rem;
}
.req dt { font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); }
.req dd { margin: 0; }
.unavailable-note { margin-top: 16px; color: var(--warn); font-size: 0.92rem; }

/* ---------------------------------------------------------------- styles A/B */
.styles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.style-card { margin: 0; display: grid; gap: 14px; }
.style-card img, .face img, .preset img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; aspect-ratio: 1; object-fit: cover; }
.style-card figcaption { display: grid; gap: 4px; }
.style-card figcaption span { color: var(--muted); font-size: 0.94rem; }

/* ---------------------------------------------------------------- spec sheet */
.spec-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; min-width: 460px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
th { font-family: var(--mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); background: var(--bg-2); }
td:first-child { color: var(--fg); font-weight: 600; white-space: nowrap; }
td:nth-child(2) { color: var(--muted); }
td.n { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; color: var(--silver); white-space: nowrap; }
th.n { text-align: right; }
.face { display: grid; gap: 14px; }
.face p { color: var(--muted); font-size: 0.94rem; }

/* ---------------------------------------------------------------- presets */
.presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.preset { margin: 0; display: grid; gap: 10px; }
.preset figcaption { display: flex; justify-content: space-between; gap: 12px; font-size: 0.92rem; }
.preset figcaption b { font-family: var(--display); font-weight: 700; }
.preset figcaption span { color: var(--faint); font-family: var(--mono); font-size: 0.78rem; text-align: right; }

/* ---------------------------------------------------------------- faq */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 600;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--faint); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 20px 18px; color: var(--muted); display: grid; gap: 10px; max-width: 68ch; }

/* ---------------------------------------------------------------- closing CTA */
.closing { text-align: left; }
.closing .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }

/* ---------------------------------------------------------------- legal + 404 */
.doc { padding-block: clamp(40px, 7vw, 80px); }
.doc article { max-width: 70ch; display: grid; gap: 18px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); }
.doc h2 { font-size: 1.3rem; margin-top: 18px; }
.doc p, .doc li { color: var(--muted); }
.doc ul { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.doc .updated { font-family: var(--mono); font-size: 0.8rem; color: var(--faint); }
.notfound { min-height: 62vh; display: grid; align-content: center; padding-block: 64px; }
.notfound .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 40px; align-items: center; }
.notfound .code { font-family: var(--mono); color: var(--faint); letter-spacing: 0.2em; }
.notfound .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.notfound img { border-radius: var(--radius); border: 1px solid var(--line); }

/* ---------------------------------------------------------------- footer */
footer { border-top: 1px solid var(--line); color: var(--faint); font-size: 0.88rem; }
footer .wrap { padding-block: 28px; display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
footer nav { display: flex; gap: 8px 20px; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* ---------------------------------------------------------------- consent banner (only when cookie analytics are enabled) */
.consent {
  position: fixed; z-index: 40;
  left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-width: 560px; margin-left: auto;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 16px 18px; display: grid; gap: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.consent p { color: var(--muted); font-size: 0.92rem; }
.consent .row { display: flex; gap: 10px; flex-wrap: wrap; }
.consent .btn { padding: 10px 16px; font-size: 0.92rem; }

@media (max-width: 820px) {
  .spec-layout, .notfound .wrap { grid-template-columns: 1fr; }
  .notfound img { max-width: 260px; }
}
@media (max-width: 560px) {
  .nav a:not(.nav-cta) { display: none; }       /* phones: keep just the CTA */
  .brand small { display: none; }               /* keeps the header on one row */
  .top .wrap { flex-wrap: nowrap; }
  .btn-hero { width: 100%; justify-content: flex-start; }
  .req { grid-template-columns: 1fr; }
  .req dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
