/* Symbolon: tokens, type and components. A graphite interface; gold is kept for the coin itself (the mark, the 3D coin,
   the halves), obsidian for the claim. */

:root {
  color-scheme: dark light;
  /* dark grey, never black (founder, 8 Nov): the page is a lit graphite surface with soft halos behind it */
  --ground: #1d1e22; --surface: #25262b; --raised: #2c2d33;
  --line: rgba(255, 255, 255, 0.075); --line-strong: rgba(255, 255, 255, 0.14);
  --ink: #f3f2ee; --ink-2: #c7c7c3; --muted: #9b9ca1;
  --gold: #dcb76e; --gold-hi: #f7dd98; --gold-lo: #8f6a22; --on-gold: #1a1206;
  --gold-wash: rgba(227, 184, 98, 0.12); --gold-glow: rgba(227, 184, 98, 0.35);
  --sea: #7dc4f0; --sea-wash: rgba(125, 196, 240, 0.12);
  --up: #9ccfb4; --down: #e3938c;
  --obsidian: #1b1b22;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);
  --grain: 0.03;

  --display: "Archivo", system-ui, sans-serif;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --greek: "GFS Didot", "Noto Serif", Georgia, serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --n: 14px; /* the step: notch size */
  --w: 1240px;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ground: #f4f2ed; --surface: #ffffff; --raised: #faf9f6;
    --line: rgba(18, 18, 20, 0.08); --line-strong: rgba(18, 18, 20, 0.16);
    --ink: #121214; --ink-2: #3a3833; --muted: #6e6a62;
    --gold: #9a7120; --gold-hi: #c69a3e; --gold-lo: #6b4e14; --on-gold: #ffffff;
    --gold-wash: rgba(154, 113, 32, 0.1); --gold-glow: rgba(154, 113, 32, 0.22);
    --sea: #1f6fa8; --sea-wash: rgba(31, 111, 168, 0.1);
    --up: #138a5e; --down: #c23b46;
    --shadow: 0 24px 60px -30px rgba(18, 18, 20, 0.35);
    --grain: 0.035;
  }
}
:root[data-theme="light"] {
  --ground: #f4f2ed; --surface: #ffffff; --raised: #faf9f6;
  --line: rgba(18, 18, 20, 0.08); --line-strong: rgba(18, 18, 20, 0.16);
  --ink: #121214; --ink-2: #3a3833; --muted: #6e6a62;
  --gold: #9a7120; --gold-hi: #c69a3e; --gold-lo: #6b4e14; --on-gold: #ffffff;
  --gold-wash: rgba(154, 113, 32, 0.1); --gold-glow: rgba(154, 113, 32, 0.22);
  --sea: #1f6fa8; --sea-wash: rgba(31, 111, 168, 0.1);
  --up: #138a5e; --down: #c23b46;
  --shadow: 0 24px 60px -30px rgba(18, 18, 20, 0.35);
  --grain: 0.035;
}

/* ------------------------------------------------------------------ base */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) var(--ground); }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 15px/1.55 var(--sans); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
/* film grain: the page reads as a material, not a flat fill */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: var(--grain); mix-blend-mode: overlay;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--gold); color: var(--on-gold); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 600; text-wrap: balance; }
p { margin: 0; }
img { display: block; }
.in { max-width: var(--w); margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .in { padding: 0 18px; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* type */
.display { font-family: var(--display); font-stretch: 125%; font-weight: 600; letter-spacing: -0.04em; line-height: 0.94; }
.h2 { font-family: var(--display); font-stretch: 115%; font-weight: 600; letter-spacing: -0.035em; line-height: 1; font-size: clamp(32px, 4.2vw, 56px); }
.h3 { font-family: var(--display); font-stretch: 110%; font-weight: 600; letter-spacing: -0.02em; font-size: 22px; line-height: 1.1; }
.label { font: 600 10px/1.3 var(--sans); font-stretch: 118%; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.lede { color: var(--ink-2); font-size: clamp(16px, 1.4vw, 18px); line-height: 1.6; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.gk { font-family: var(--greek); color: var(--gold); font-weight: 400; }
.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ the mark (flat, for UI) */

.mark { display: block; overflow: visible; }
.mark .l { fill: var(--ink); transition: transform 360ms var(--ease); }
.mark .r { fill: var(--gold); transition: transform 360ms var(--ease); }
a:hover > .mark .l { transform: translateX(-1.6px); }
a:hover > .mark .r { transform: translateX(1.6px); }

/* ------------------------------------------------------------------ the step: a notch cut like the break in the token */

.notch { clip-path: polygon(0 0, calc(100% - var(--n)) 0, calc(100% - var(--n)) calc(var(--n) / 2), 100% calc(var(--n) / 2), 100% 100%, 0 100%); }
.panel { position: relative; isolation: isolate; padding: 24px; }
.panel::before, .panel::after { content: ""; position: absolute; z-index: -1; clip-path: polygon(0 0, calc(100% - var(--n)) 0, calc(100% - var(--n)) calc(var(--n) / 2), 100% calc(var(--n) / 2), 100% 100%, 0 100%); }
.panel::before { inset: 0; background: var(--line-strong); }
.panel::after { inset: 1px; background: var(--surface); }
.panel.hl::before { background: linear-gradient(160deg, var(--gold) 0%, var(--line-strong) 45%); }

/* ------------------------------------------------------------------ controls */

button { font: inherit; color: inherit; }
.btn {
  --n: 10px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 22px;
  font: 600 14px/1 var(--sans); letter-spacing: 0.02em; white-space: nowrap; cursor: pointer; border: 0; color: var(--ink);
  background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); border-radius: 3px;
  transition: box-shadow 180ms, background-color 180ms, transform 140ms var(--ease), filter 180ms;
}
.btn:hover { box-shadow: inset 0 0 0 1px var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn.gold {
  box-shadow: none; border-radius: 0;
  background: var(--ink); color: var(--ground);
  clip-path: polygon(0 0, calc(100% - var(--n)) 0, calc(100% - var(--n)) calc(var(--n) / 2), 100% calc(var(--n) / 2), 100% 100%, 0 100%);
}
.btn.gold:hover { filter: brightness(1.08); }
.btn.sm { height: 36px; padding: 0 16px; font-size: 13px; --n: 8px; }
.btn svg { width: 14px; height: 14px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--ink-2); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.icon-btn:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.icon-btn svg { width: 17px; height: 17px; }

/* ------------------------------------------------------------------ header */

.top { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: background-color 240ms, box-shadow 240ms; }
.top.solid { background: color-mix(in srgb, var(--ground) 82%, transparent); backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 var(--line); }
.top .in { display: flex; align-items: center; gap: 32px; height: 68px; }
.wm { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.wm .mark { width: 28px; height: 28px; }
.wm b { font: 600 15px/1 var(--display); font-stretch: 125%; letter-spacing: 0.22em; text-transform: uppercase; }
.top nav { display: flex; gap: 4px; }
.top nav a { padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: color 150ms; }
.top nav a:hover { color: var(--ink); }
.top .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
@media (max-width: 860px) { .top nav { display: none; } .top .in { gap: 16px; } }

/* ------------------------------------------------------------------ chips, live dots */

.chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 4px; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); font: 500 13px var(--sans); white-space: nowrap; }
.chip img { width: 22px; height: 22px; border-radius: 50%; }
.chip i { font-style: normal; color: var(--gold); font-size: 12px; font-weight: 600; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 0 color-mix(in srgb, var(--up) 60%, transparent); animation: ping 2.2s var(--ease) infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.skel { display: inline-block; width: 3.5em; height: 0.8em; vertical-align: middle; border-radius: 2px; background: linear-gradient(90deg, var(--line) 0%, var(--line-strong) 50%, var(--line) 100%); background-size: 200% 100%; animation: skel 1.3s linear infinite; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
