/* Early Metals — public site
   Tokens mirror web/src/app/globals.css ("Signature Hybrid", light warm-paper theme).
   Keep this palette in sync with the app; do not introduce new hues. */

:root {
  --paper: #f6f3ec;
  --ink: #211e19;
  --ink-soft: #4a453d;
  --ink-panel: #2e2a24;
  --muted: #746d61;
  --label: #9a9284;
  --faint: #c8c2b4;
  --card: #ffffff;
  --surface-2: #fcfbf8;
  --line: #ece6da;
  --line-soft: #f2ede3;
  --track: #f1ece1;

  --gold: #c8a24e;
  --gold-strong: #b4862a;
  --gold-dark: #8c6a1e;
  --gold-tint: #f3e9cf;
  --gold-ink: #2a2110;
  --gold-border: #ebdfc4;
  --amber: #a9791e;
  --amber-tint: #fbefd6;
  --silver-tint: #eaecee;
  --silver-ink: #6b7076;
  --copper-tint: #f3e0d4;
  --copper-ink: #a6603a;

  --up: #12945e;
  --up-tint: #e4f3ec;
  --down: #d83a34;
  --slate: #8c8578;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(33, 30, 25, 0.04), 0 12px 32px -12px rgba(33, 30, 25, 0.12);

  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(64px, 9vw, 112px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--gold-strong); }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--gold-strong); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; color: var(--paper); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  font: 700 15px/1 var(--font); letter-spacing: -0.005em;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: var(--gold-strong); color: var(--gold-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--faint); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-ink { background: var(--paper); color: var(--ink); }
.btn-ink:hover { background: #fff; color: var(--ink); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(2px); }

/* ------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { height: 30px; width: auto; }
.brand span { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--ink-soft); font-size: 14px; font-weight: 600; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 10px; }

.menu { display: none; position: relative; }
.menu summary {
  list-style: none; cursor: pointer; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary span, .menu summary span::before, .menu summary span::after {
  display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; content: "";
}
.menu summary span::before { position: absolute; top: -6px; }
.menu summary span::after { position: absolute; top: 6px; }
.menu-panel {
  position: absolute; right: 0; top: 54px; width: min(280px, calc(100vw - 32px));
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 10px; display: flex; flex-direction: column; gap: 2px;
}
.menu-panel a { color: var(--ink); font-weight: 600; padding: 12px 12px; border-radius: 8px; }
.menu-panel a:hover { background: var(--surface-2); }
.menu-panel .btn { margin-top: 8px; }

@media (max-width: 900px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
}
@media (max-width: 560px) {
  .nav-cta { display: none; }
  .menu { display: block; }
}

/* ------------------------------------------------------------ type helpers */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-dark);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--gold); border-radius: 2px; }
.section { padding: var(--section) 0; }
.section-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); display: grid; gap: 14px; }
.section-head h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 18px; }
.center { margin-left: auto; margin-right: auto; text-align: center; justify-items: center; }

/* ------------------------------------------------------------ hero */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 88px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 85% 10%, color-mix(in srgb, var(--gold-tint) 70%, transparent), transparent 70%),
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px) 0 0 / 56px 56px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(40px, 6vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(40px, 6.2vw, 68px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; margin: 18px 0 22px; }
.hero h1 em { font-style: normal; color: var(--gold-dark); }
.hero .lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-soft); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 22px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.hero-note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 4px var(--up-tint); }

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

/* ------------------------------------------------------------ product preview card */
.preview { position: relative; }
.preview-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  padding: 22px; display: grid; gap: 18px;
}
.pc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pc-co { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pc-co img { width: 40px; height: 40px; flex: none; }
.pc-name { font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.pc-meta { font-size: 12px; color: var(--label); font-family: var(--mono); }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.pill-amber { background: var(--amber-tint); color: var(--amber); }
.pill-gold { background: var(--gold-tint); color: var(--gold-dark); }
.pill-muted { background: var(--track); color: var(--muted); }
.pc-label { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
.pc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pc-stat { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px; display: grid; gap: 4px; }
.pc-stat b { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.pc-chart { border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 12px 6px; background: var(--surface-2); }
.pc-chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.up { color: var(--up); font-weight: 700; }
.pc-chart svg { width: 100%; height: 96px; }
.pc-rows { display: grid; gap: 10px; }
.pc-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 40px; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-soft); }
.bar { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold); border-radius: inherit; }
.bar.slate i { background: var(--slate); }
.pc-row span:last-child { text-align: right; font-weight: 700; color: var(--ink); }
.pc-claim { border-top: 1px dashed var(--line); padding-top: 14px; font-size: 13px; color: var(--ink-soft); display: grid; gap: 4px; }
.illustrative { position: absolute; right: 14px; bottom: -28px; font-size: 11px; color: var(--label); font-family: var(--mono); }

@media (max-width: 560px) {
  .pc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .pc-stat { padding: 10px 8px; }
  .pc-stat b { font-size: 18px; }
  .pc-row { grid-template-columns: 92px minmax(0, 1fr) 34px; }
}

/* ------------------------------------------------------------ sources strip */
.sources { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.sources-inner { display: flex; align-items: center; gap: 20px 40px; padding-block: 22px; flex-wrap: wrap; justify-content: space-between; }
.sources-inner > p { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--label); }
.sources-list { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; margin: 0; padding: 0; }
.sources-list li { font-weight: 700; color: var(--ink-soft); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.sources-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ------------------------------------------------------------ problem */
.problem-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.problem { background: var(--card); padding: 30px 28px; display: grid; gap: 10px; align-content: start; }
.problem .n { font-family: var(--mono); font-size: 12px; color: var(--gold-dark); font-weight: 600; }
.problem h3 { font-size: 20px; font-weight: 800; }
.problem p { color: var(--muted); font-size: 15px; }
@media (max-width: 820px) { .problem-grid { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ features */
.features { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature {
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; background: var(--paper);
  display: grid; gap: 12px; align-content: start; transition: border-color .15s, transform .15s;
}
.feature:hover { border-color: var(--gold-border); transform: translateY(-2px); }
.feature .tag { justify-self: start; }
.feature h3 { font-size: 19px; font-weight: 800; }
.feature p { color: var(--muted); font-size: 15px; }
.feature ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.feature li { font-size: 14px; color: var(--ink-soft); display: flex; gap: 8px; }
.feature li::before { content: "—"; color: var(--gold); flex: none; }
@media (max-width: 980px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .feature-grid { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ how it works */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: step; position: relative; }
.step { position: relative; padding: 28px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); display: grid; gap: 12px; align-content: start; }
.step-n {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--paper); font-weight: 800; font-size: 14px; font-family: var(--mono);
}
.step h3 { font-size: 20px; font-weight: 800; }
.step p { color: var(--muted); font-size: 15px; }
.step .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip { font-size: 12px; font-weight: 600; color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ coverage */
.coverage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.metric-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.metric { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; display: grid; gap: 4px; }
.metric b { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.metric span { color: var(--muted); font-size: 14px; }
.metals { display: grid; gap: 12px; }
.metal {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px;
}
.metal img { width: 44px; height: 44px; }
.metal-sym {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; background: var(--track); color: var(--ink-soft); border: 1px solid var(--line);
}
.metal h3 { font-size: 16px; font-weight: 800; }
.metal p { font-size: 13px; color: var(--muted); }
@media (max-width: 860px) { .coverage { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 460px) { .metal { grid-template-columns: 40px minmax(0, 1fr); } .metal .pill { display: none; } }

/* ------------------------------------------------------------ principles */
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.principle { border-top: 2px solid var(--ink); padding-top: 18px; display: grid; gap: 8px; align-content: start; }
.principle h3 { font-size: 17px; font-weight: 800; }
.principle p { color: var(--muted); font-size: 14px; }
@media (max-width: 900px) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .principles { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ digest */
.digest { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 64px); align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: clamp(28px, 5vw, 56px); }
.digest h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; margin: 14px 0; }
.digest p { color: var(--muted); font-size: 17px; }
.mail { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); padding: 18px; display: grid; gap: 10px; }
.mail-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.mail-head img { height: 22px; width: auto; }
.mail-head b { font-size: 14px; }
.mail-head span { margin-left: auto; font-size: 12px; color: var(--label); font-family: var(--mono); }
.mail-item { background: var(--card); border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 14px; display: grid; gap: 4px; }
.mail-item b { font-size: 14px; }
.mail-item span { font-size: 13px; color: var(--muted); }
@media (max-width: 860px) { .digest { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ faq */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 22px; }
.faq details[open] { border-color: var(--gold-border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 0; font-weight: 700; font-size: 17px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 500; color: var(--gold-dark); line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding: 0 0 20px; font-size: 15px; }

/* ------------------------------------------------------------ CTA band */
.cta-band { background: var(--ink-panel); color: var(--paper); border-radius: 24px; padding: clamp(36px, 6vw, 72px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; position: relative; overflow: hidden; }
.cta-band::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold) 35%, transparent), transparent 70%);
}
.cta-band h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; color: var(--paper); }
.cta-band p { color: var(--faint); margin-top: 12px; font-size: 17px; max-width: 560px; }
.cta-band .actions { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.cta-band .btn-ghost { color: var(--paper); border-color: color-mix(in srgb, var(--paper) 35%, transparent); }
.cta-band .btn-ghost:hover { border-color: var(--paper); color: var(--paper); }
@media (max-width: 820px) { .cta-band { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--line); margin-top: var(--section); padding: 48px 0 40px; font-size: 14px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-grid h4 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--label); margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--ink-soft); }
.footer-grid a:hover { color: var(--ink); }
.footer-brand p { margin-top: 14px; max-width: 320px; }
.disclaimer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--label); display: grid; gap: 10px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }

/* ------------------------------------------------------------ legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) 0 0; }
.legal header { display: grid; gap: 12px; padding-bottom: 28px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.legal h1 { font-size: clamp(34px, 5vw, 46px); font-weight: 800; }
.legal .updated { color: var(--muted); font-size: 14px; }
.legal h2 { font-size: 22px; font-weight: 800; margin: 40px 0 12px; }
.legal h3 { font-size: 17px; font-weight: 800; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--ink-soft); font-size: 16px; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; display: grid; gap: 6px; margin: 12px 0; }
.legal a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gold-border); }
.legal .summary { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; display: grid; gap: 8px; }
.legal .summary p { font-size: 15px; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-soft); }
.legal th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--label); }
.table-scroll { overflow-x: auto; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { font-size: 13px; font-weight: 600; color: var(--ink-soft); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; text-decoration: none; }
.toc a:hover { border-color: var(--gold-border); color: var(--ink); }

/* ------------------------------------------------------------ 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.notfound h1 { font-size: clamp(36px, 5vw, 52px); font-weight: 800; margin: 12px 0; }
.notfound p { color: var(--muted); margin-bottom: 28px; }

/* ------------------------------------------------------------ motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .reveal.d1 { animation-delay: .08s; }
  .reveal.d2 { animation-delay: .16s; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}
