/* ==================================================================
   TINTD — shared design tokens + primitives (site, app, docs)
=================================================================== */
:root {
  --ink: #050a10;
  --ink-2: #0a121c;
  --ink-3: #0c1622;
  --ink-4: #13202e;
  --ink-5: #1b2a3a;

  --paper: #ecede8;
  --paper-2: #e2e4dd;
  --paper-3: #d3d6ce;

  --fg: #eaf6ff;
  --fg-2: rgba(225, 242, 255, 0.66);
  --fg-3: rgba(225, 242, 255, 0.42);
  --dk: #0a0b0d;
  --dk-2: rgba(10, 11, 13, 0.66);
  --dk-3: rgba(10, 11, 13, 0.42);

  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-dk: rgba(10, 11, 13, 0.12);
  --line-dk-2: rgba(10, 11, 13, 0.2);

  --mint: #5cc8ff;
  --mint-2: #3fb2f0;
  --mint-ink: #021422;
  --mint-soft: rgba(92, 200, 255, 0.12);
  --mint-glow: rgba(92, 200, 255, 0.35);

  --warn: #ffc96b;
  --warn-soft: rgba(255, 201, 107, 0.12);
  --danger: #ff6b81;
  --danger-soft: rgba(255, 107, 129, 0.12);
  --info: #8fb8ff;
  --info-soft: rgba(143, 184, 255, 0.12);

  --r-xs: 8px;
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --font-display: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1240px;

  color-scheme: dark;
}

*,
*::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(--ink);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--mint); color: var(--mint-ink); }

:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--font-mono); font-feature-settings: 'zero' 1; }
.display { font-family: var(--font-display); letter-spacing: -0.04em; }
.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; }
[hidden] { display: none !important; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: 0.16em; text-transform: uppercase; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark .g-body { fill: var(--mint); }
.brand-mark .g-eyes { fill: var(--ink); }
.brand i { font-style: normal; color: var(--mint); }
.brand small { display: block; font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.12em; color: var(--mint); margin-top: -2px; }

/* ---------- Buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), opacity 0.2s;
  user-select: none;
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sm { --h: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { --h: 56px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-mint { background: var(--mint); color: var(--mint-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(0, 0, 0, 0.4); }
.btn-mint:hover { background: #8fd8ff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 20px -10px var(--mint-glow); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--fg); background: rgba(255, 255, 255, 0.02); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.06); }
.btn-dark { background: var(--dk); color: var(--fg); }
.btn-dark:hover { background: #22262c; }
.btn-ghost-dk { border: 1px solid var(--line-dk-2); color: var(--dk); }
.btn-ghost-dk:hover { background: rgba(10, 11, 13, 0.06); }
.btn[disabled], .btn.is-disabled { opacity: 0.4; pointer-events: none; box-shadow: none; }

/* ---------- Chips / pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
  border-radius: 999px; font-size: 11.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--line-2); color: var(--fg-2);
}
.pill-mint { color: var(--mint); border-color: rgba(92, 200, 255, 0.3); background: var(--mint-soft); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 var(--mint-glow); animation: live 1.8s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(92, 200, 255, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(92, 200, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(92, 200, 255, 0); } }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-2); }
.eyebrow::before { content: ''; width: 18px; height: 1px; background: currentColor; opacity: 0.6; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; width: min(92vw, 420px); }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px;
  background: rgba(20, 23, 28, 0.92); border: 1px solid var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--fg); font-size: 14px; font-weight: 600; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  animation: toast-in 0.45s var(--ease) both;
}
.toast.out { animation: toast-out 0.3s var(--ease) both; }
.toast .t-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--mint-soft); color: var(--mint); flex: none; }
.toast .t-ico svg { width: 13px; height: 13px; }
.toast.warn .t-ico { background: var(--warn-soft); color: var(--warn); }
.toast.err .t-ico { background: var(--danger-soft); color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* ---------- Reveal on scroll ---------- */
/* ---------- Rolling digit clock ---------- */
.digits { display: flex; align-items: center; justify-content: center; font-family: var(--font-body); font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; color: var(--fg); }
.dg { position: relative; display: inline-block; width: 0.6em; height: 1.08em; overflow: hidden; }
.dg-v { position: absolute; inset: 0; display: grid; place-items: center; }
.dg-v.in { animation: dg-in 0.55s var(--ease) both; }
.dg-v.out { animation: dg-out 0.55s var(--ease) both; }
.dg-sep { width: 0.3em; text-align: center; color: var(--fg-3); transform: translateY(-0.05em); }
@keyframes dg-in { from { transform: translateY(55%); opacity: 0; filter: blur(3px); } to { transform: none; opacity: 1; filter: none; } }
@keyframes dg-out { from { transform: none; opacity: 1; } to { transform: translateY(-55%); opacity: 0; filter: blur(3px); } }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
/* Animations switch (motion.js): off = no movement anywhere */
[data-motion='off'] .reveal { opacity: 1; transform: none; transition: none; }
[data-motion='off'] *, [data-motion='off'] *::before, [data-motion='off'] *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
