/* ============================================================
   EPHEMERENT · PRODUCT — Shared dark interface foundation
   Neutral surfaces, one product signal colour, evidence-first type.
   Fonts are loaded via <link rel="preconnect"> + <link> in each
   page <head> (non-render-blocking); no @import here.
   ============================================================ */

@layer product {
:root {
  /* ---- Surfaces ---- */
  --void:        #07080a;
  --bg:          #0a0b0e;
  --bg-2:        #0e0f13;
  --panel:       #111319;
  --panel-2:     #161922;
  --line:        rgba(184, 192, 210, 0.10);
  --line-strong: rgba(184, 192, 210, 0.20);

  /* ---- Ink ---- */
  --ink:        #eef0f4;
  --ink-2:      #c3c8d4;
  --muted:      #969cab;
  --faint:      #7d8390; /* lightened from #6c7280 to pass WCAG AA on dark (~5:1) */

  /* ---- Accents ---- */
  --violet:     #3d7fb8;
  --violet-lt:  #6aa8de;
  --violet-dk:  #2c5f8a;
  --teal:       #2dd4bf;
  --teal-lt:    #5ff0dc;
  --brass:      #e0a544;
  --brass-lt:   #f1c878;

  /* ---- Signal ---- */
  --green:      #43e08a;
  --red:        #ff5d6c;
  --amber:      #ffb547;

  /* ---- Type ---- */
  --display: 'Hanken Grotesk', system-ui, sans-serif; /* Space Grotesk was never self-hosted */
  --body:    'Hanken Grotesk', system-ui, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, monospace;

  /* ---- Rhythm ---- */
  --maxw: 1240px;
  --r-sm: 5px;
  --r:    9px;
  --r-lg: 14px;
  --ease: var(--ease);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Shared dark backdrop applied to product and workflow pages. */
.space-bg {
  position: relative;
  background: var(--bg);
}

::selection { background: rgba(45, 212, 191, 0.32); color: #fff; }

a { color: inherit; text-decoration: none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }
.section { padding: 130px 0; position: relative; }
.section-sm { padding: 80px 0; }

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .section { padding: 84px 0; }
}

/* ============================================================
   TYPE
   ============================================================ */
.display {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
h1.display { font-size: clamp(44px, 7vw, 92px); }
h2.display { font-size: clamp(34px, 5vw, 60px); }
h3.display { font-size: clamp(24px, 3vw, 36px); }

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--teal-lt);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 22px; height: 1px;
  background: currentColor;
}

.lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); line-height: 1.62; max-width: 62ch; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.tnum { font-variant-numeric: tabular-nums; }

.grad-text {
  color: var(--ink);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 13px 22px;
  border-radius: var(--r-sm);
  display: inline-flex; align-items: center; gap: 9px;
  cursor: pointer; border: 1px solid transparent;
  transition: transform var(--motion-control) var(--ease), box-shadow var(--motion-control) var(--ease), background var(--motion-control) var(--ease), border-color var(--motion-control);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: #eee7d7;
  color: #14130f;
}
.btn-primary:hover { background: #f7f1e4; }
.btn-ghost {
  background: rgba(255,255,255,0.03);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { background: rgba(255,255,255,0.07); border-color: var(--violet); }

/* ============================================================
   CARDS / PANELS
   ============================================================ */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}
.card-pad { padding: 30px; }
.card-hover { transition: transform var(--motion-glide) var(--ease), border-color var(--motion-glide), box-shadow var(--motion-glide); }
.card-hover:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background var(--motion-advance), border-color var(--motion-advance);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: var(--bg);
  backdrop-filter: none;
  border-bottom: 1px solid var(--line);
}
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 16px 32px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 28px; margin-left: 14px; }
.nav-links a { font-size: 15px; color: var(--ink-2); transition: color var(--motion-control); }
.nav-links a:hover { color: var(--ink); }
.nav-spacer { flex: 1; }
@media (max-width: 880px) { .nav-links { display: none; } }

/* mark (orrery glyph) */
.mark { width: 26px; height: 26px; flex: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: 70px 0 50px; position: relative; z-index: 2; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer h5,
.footer .footer-heading { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer a { font-size: 15px; color: var(--ink-2); transition: color var(--motion-control); }
.footer a:hover { color: var(--teal-lt); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity var(--motion-slow) var(--ease), transform var(--motion-slow) var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   MISC UTILITY
   ============================================================ */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.center { align-items: center; justify-content: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.divider { height: 1px; background: var(--line); border: 0; }
/* ============================================================
   A11Y — skip link + reduced motion for decorative canvases
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .hero-canvas, .start-canvas { display: none !important; }
}


  /* The Discord link carried its type and colour in an inline style
     attribute, which no layer and no mode can reach -- it was the only
     control on the page whose hover could not be written at all. Its
     rest colour was --teal-lt, which aliases to --signal, so once
     --accent resolved to --signal too the hover became a no-op even in
     principle: it was already the colour it was hovering to. Lifting to
     --ink is the only direction left that reads. */
  .orrery-discord {
    font-size: 12px;
    color: var(--teal-lt, var(--signal));
    text-decoration: none;
    transition: color var(--motion-control, 180ms) var(--ease, cubic-bezier(.22,1,.36,1));
  }
  .orrery-discord:hover { color: var(--ink); }

}
