/* wazn.trade — minimal Apple-style page layout.
   Design intent: tokens.css stays the brand source of truth; this file
   composes them into a quiet, type-first page — generous whitespace,
   large tight headlines, hairline separators, almost no card chrome. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface-1);
  color: var(--ink);
  font: 400 17px/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brass-text); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(1040px, 100% - 2 * var(--space-6)); margin-inline: auto; }
.mono { font-family: var(--font-mono); direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

/* ---- Typography ------------------------------------------------------------- */

.eyebrow {
  font: 500 12px/1.4 var(--font-sans);
  color: var(--brass-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 var(--space-4);
}
[dir="rtl"] .eyebrow { text-transform: none; letter-spacing: 0.04em; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; color: var(--ink); }
h1 {
  font-size: clamp(40px, 6.4vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.005em;
}
.lead {
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 60ch;
  font-weight: 400;
}

section { padding-block: clamp(96px, 12vw, 160px); }
.section-head { max-width: 760px; margin-bottom: var(--space-12); }
.section-head p { color: var(--ink-muted); margin: var(--space-4) 0 0; font-size: 19px; line-height: 1.55; }

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

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--surface-1) 72%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: var(--space-6); }
.nav img { height: 22px; width: auto; }
.nav ul { display: flex; gap: var(--space-8); list-style: none; margin: 0; padding: 0; font-size: 13px; }
.nav ul a { color: var(--ink-muted); }
.nav ul a:hover { color: var(--ink); }
.nav-end { display: flex; align-items: center; gap: var(--space-4); }
.lang { font: 400 13px/1 var(--font-sans); color: var(--ink-muted); padding: var(--space-2); }
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

/* ---- Buttons: pill-shaped, minimal ----------------------------------------- */

.wz-btn,
.cta .wz-btn {
  height: 44px;
  padding-inline: var(--space-6);
  border-radius: 999px;
  font: 500 15px/1 var(--font-sans);
  letter-spacing: 0.01em;
}
.wz-btn--sm { height: 32px; padding-inline: var(--space-4); font-size: 13px; }
.wz-btn--primary { background: var(--ink); color: var(--surface-1); border-color: transparent; }
.wz-btn--primary:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 88%, var(--brass-text)); color: var(--surface-1); }
.wz-btn--secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.wz-btn--secondary:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 4%, transparent); }

/* ---- Hero ------------------------------------------------------------------- */

.hero { padding-block: clamp(96px, 14vw, 180px) clamp(80px, 10vw, 128px); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--space-16); align-items: center; }
.hero h1 em { font-style: normal; color: var(--brass-text); }
.hero .lead { margin: var(--space-6) 0 var(--space-8); font-size: 21px; }
.cta { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.cta .wz-btn { text-decoration: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font: 500 12px/1 var(--font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brass-text);
  background: transparent;
  padding: 0;
  margin-bottom: var(--space-6);
}
[dir="rtl"] .pill { text-transform: none; letter-spacing: 0.02em; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---- Hero result card (flattened) ------------------------------------------ */

.result {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: none;
  overflow: hidden;
}
.result-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.result-head .mono { font-size: 13px; font-weight: 500; letter-spacing: 0.04em; }
.result-body { padding: var(--space-6); display: grid; gap: var(--space-5); }
.ratio { display: grid; grid-template-columns: 1fr auto; gap: var(--space-1) var(--space-3); font-size: 13px; color: var(--ink-muted); }
.ratio .mono { font-size: 13px; color: var(--ink); }
.meter { grid-column: 1 / -1; position: relative; height: 2px; background: var(--line); border-radius: 999px; }
.meter span { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--ink); border-radius: 999px; }
.meter i { position: absolute; inset-block: -3px; width: 1px; background: var(--brass); }
.result-foot {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink-muted);
  display: flex; justify-content: space-between; gap: var(--space-3);
}
.example-note { font-size: 12px; color: var(--ink-muted); margin-top: var(--space-4); text-align: center; }

/* ---- Value cards (strip the chrome; keep just type) ------------------------ */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-12) var(--space-8); }
.card {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: var(--space-6) 0 0;
}
.card p { color: var(--ink-muted); margin: var(--space-3) 0 0; font-size: 16px; line-height: 1.55; }
.glyph { width: 28px; height: 28px; margin-bottom: var(--space-5); }
.glyph .i { fill: var(--ink); } .glyph .b { fill: var(--brass); }

/* ---- Steps (was a dark band, now a light type-first row) ------------------ */

.band { background: transparent; color: var(--ink); }
.band .eyebrow { color: var(--brass-text); }
.band .section-head p { color: var(--ink-muted); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-12) var(--space-8); counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li {
  border-top: 1px solid var(--line);
  padding-top: var(--space-5);
}
.steps li::before {
  counter-increment: s;
  content: counter(s, decimal-leading-zero);
  display: block;
  font: 400 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--brass-text);
  margin-bottom: var(--space-4);
}
.steps p { margin: var(--space-3) 0 0; color: var(--ink-muted); font-size: 16px; line-height: 1.55; }

/* ---- Developers ------------------------------------------------------------- */

.dev { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--space-16); align-items: start; }
.dev ul { padding-inline-start: var(--space-5); color: var(--ink-muted); font-size: 16px; }
.dev li { margin-bottom: var(--space-3); }
.code {
  background: var(--ink);
  color: var(--surface-1);
  border-radius: 12px;
  overflow: hidden;
  direction: ltr;
  text-align: left;
  border: 0;
}
.code + .code { margin-top: var(--space-4); }
.code-head {
  display: flex; justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  font: 500 11px/1.4 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--surface-1) 60%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--surface-1) 10%, transparent);
}
.code pre { margin: 0; padding: var(--space-5); font: 400 13px/1.7 var(--font-mono); overflow-x: auto; }
.code .k { color: #D7B57E; } .code .s { color: #9EC8A6; } .code .c { color: #8A96A4; }

/* ---- Purify ----------------------------------------------------------------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: center; }
.calc {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: var(--space-6) var(--space-8);
  display: grid;
  gap: 0;
}
.calc-row {
  display: flex; justify-content: space-between; gap: var(--space-4);
  font-size: 15px;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--line);
}
.calc-row:last-child { border: 0; padding-bottom: var(--space-2); font-weight: 600; }
.calc-row .mono { font-weight: 400; }

/* ---- Family ----------------------------------------------------------------- */

.family { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-8); }
.family .card {
  display: grid;
  gap: var(--space-4);
  align-content: start;
  border-top: 1px solid var(--line);
  padding-top: var(--space-5);
}
.family img { height: 36px; width: auto; }
.family .now { border-top-color: var(--brass); }
.family p { font-size: 15px; }

/* ---- FAQ -------------------------------------------------------------------- */

.faq { max-width: 760px; }
.faq details {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  padding: var(--space-5) 0;
}
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  font: 500 18px/1.4 var(--font-sans);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  letter-spacing: -0.005em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  width: 10px; height: 10px;
  border-right: 1.5px solid var(--ink-muted);
  border-bottom: 1.5px solid var(--ink-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: 4px;
  flex: none;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 10px; }
.faq p { color: var(--ink-muted); margin: var(--space-4) 0 0; font-size: 16px; line-height: 1.6; max-width: 60ch; }

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

.join { text-align: center; padding-block: clamp(120px, 14vw, 180px); }
.join h2 { max-width: 20ch; margin-inline: auto; }
.join .lead { margin: var(--space-5) auto var(--space-8); font-size: 20px; }
.join .cta { justify-content: center; }

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

footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-8);
  font-size: 12px;
  color: var(--ink-muted);
}
footer .wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-6);
  align-items: center;
}
footer img { height: 20px; width: auto; opacity: 0.8; }
footer nav { display: flex; gap: var(--space-6); justify-content: flex-end; }
footer nav a { color: var(--ink-muted); }
footer nav a:hover { color: var(--ink); }
.disclaimer { font-size: 12px; max-width: 70ch; margin: 0; line-height: 1.6; }

/* ---- Responsive ------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero .wrap, .dev, .split { grid-template-columns: 1fr; gap: var(--space-12); }
  .cards, .steps { grid-template-columns: 1fr; }
  .family { grid-template-columns: 1fr 1fr; }
  .nav ul { display: none; }
  footer .wrap { grid-template-columns: 1fr; text-align: start; }
  footer nav { justify-content: flex-start; }
  section { padding-block: clamp(72px, 12vw, 112px); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---- Grid-child safety: let long tokens / code shrink ---------------------- */

.hero .wrap > *, .dev > *, .split > *, .cards > *, .family > * { min-width: 0; }
.family img { height: auto; max-height: 36px; width: auto; max-width: 100%; }
.dev .mono { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .family { grid-template-columns: 1fr; }
  .nav-end .wz-btn { display: none; }
  .result-foot { flex-direction: column; }
}
.result-foot .mono { white-space: nowrap; }
