/* ==========================================================================
   Scarnox — design tokens + shared components
   ========================================================================== */
:root {
  --bg: #13080b;
  --bg-2: #190b0f;
  --surface: #1e0e13;
  --surface-2: #261218;
  --surface-3: #30171e;
  --line: rgba(255, 196, 204, 0.075);
  --line-2: rgba(255, 196, 204, 0.13);
  --line-3: rgba(255, 196, 204, 0.22);

  --text: #f8eef0;
  --muted: #c4abb0;
  --dim: #8f747b;

  --red: #ff4d5e;
  --red-2: #e8283d;
  --red-3: #a5132b;
  --red-soft: rgba(255, 77, 94, 0.12);
  --red-glow: rgba(232, 40, 61, 0.35);
  --gold: #f7b84b;
  --gold-soft: rgba(247, 184, 75, 0.12);
  --green: #3ddc84;
  --green-soft: rgba(61, 220, 132, 0.12);
  --blue: #9bb0ff;
  --blue-soft: rgba(155, 176, 255, 0.12);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

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

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 85% -12%, rgba(232, 40, 61, 0.16), transparent 62%),
    radial-gradient(900px 520px at -12% 8%, rgba(165, 19, 43, 0.14), transparent 60%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
/* film grain — very subtle */
body::before {
  content: "";
  position: fixed; inset: 0; transform: translateZ(0);
  pointer-events: none; z-index: 0;
  opacity: 0.035;
  background-image: 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(255, 77, 94, 0.35); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0;
}
p { margin: 0; }
.mono { font-family: var(--mono); font-feature-settings: "zero"; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.accent { color: var(--red); }
.gold { color: var(--gold); }
.green { color: var(--green); }
.tnum { font-variant-numeric: tabular-nums; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* --- Eyebrow / section titles ------------------------------------------ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--dim);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--red); }
.section { padding: 112px 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); margin: 14px 0 14px; letter-spacing: -0.035em; font-weight: 600; }
.section-head h2 .soft { color: var(--dim); }
.section-head p { color: var(--muted); font-size: 17px; }
@media (max-width: 760px) { .section { padding: 80px 0; } .section-head { margin-bottom: 40px; } }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  --h: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px;
  border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .25s, color .2s, opacity .2s;
  user-select: none;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #ff5a69 0%, #e8283d 100%);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 20px -6px var(--red-glow), 0 0 0 0 var(--red-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 12px 30px -8px rgba(232,40,61,.55), 0 0 0 4px rgba(255,77,94,.12); }
.btn-primary .arrow { transition: transform .25s var(--ease); }
.btn-primary:hover .arrow { transform: translateX(3px); }
.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-2);
  color: var(--text);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--line-3); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,.04); }
.btn-lg { --h: 50px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.btn-sm { --h: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-icon { width: var(--h); padding: 0; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn-discord { background: #5865f2; color: #fff; border-color: rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 8px 24px -10px rgba(88,101,242,.7); }
.btn-discord:hover { background: #6773f5; transform: translateY(-1px); }

/* --- Cards / surfaces --------------------------------------------------- */
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.card-pad { padding: 24px; }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* --- Badges ------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  background: rgba(255,255,255,.05); color: var(--muted);
  border: 1px solid var(--line-2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.badge-red { color: #ff8692; background: var(--red-soft); border-color: rgba(255,77,94,.25); }
.badge-gold { color: var(--gold); background: var(--gold-soft); border-color: rgba(247,184,75,.25); }
.badge-green { color: var(--green); background: var(--green-soft); border-color: rgba(61,220,132,.25); }
.badge-blue { color: var(--blue); background: var(--blue-soft); border-color: rgba(155,176,255,.25); }
.badge-live::before { animation: pulse-dot 1.8s infinite; }
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 currentColor; }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* --- Forms -------------------------------------------------------------- */
.input {
  width: 100%; height: 44px; padding: 0 14px;
  background: rgba(0,0,0,.22);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: var(--dim); }
.input:hover { border-color: var(--line-3); }
.input:focus { border-color: rgba(255,77,94,.6); box-shadow: 0 0 0 4px rgba(255,77,94,.12); background: rgba(0,0,0,.3); }
.label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }

.kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2); border-bottom-width: 2px;
  border-radius: 6px;
}

/* --- Segmented control (currency etc) ---------------------------------- */
.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: rgba(0,0,0,.25); border: 1px solid var(--line-2); border-radius: 10px;
}
.seg button {
  height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent;
  font-size: 12px; font-weight: 600; color: var(--dim); letter-spacing: .02em;
  transition: background .2s, color .2s;
}
.seg button:hover { color: var(--text); }
.seg button.is-active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 1px 2px rgba(0,0,0,.4); }

/* --- Logo --------------------------------------------------------------- */
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; letter-spacing: .14em; font-size: 15px; }
.logo img { width: 30px; height: 30px; }
.logo span em { font-style: normal; color: var(--dim); font-weight: 400; letter-spacing: .08em; margin-left: 6px; font-size: 12px; }

/* --- Top navigation (marketing) ---------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(19, 8, 11, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; height: 76px; gap: 32px; }
.nav-links { display: flex; gap: 2px; margin-right: auto; }
.nav-links a {
  position: relative; padding: 10px 14px; border-radius: 6px; font-size: 16px; color: #d9c3c8; font-weight: 500; letter-spacing: -.005em;
  transition: color .2s, background .2s;
}
.nav-links a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; background: var(--red); box-shadow: 0 0 10px rgba(255,51,70,.8); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out, ease); }
.nav-links a:hover, .nav-links a.is-active { color: #fff; background: rgba(255,255,255,.04); }
.nav-links a:hover::after, .nav-links a.is-active::after { transform: scaleX(1); }
@media (max-width: 1180px) { .nav-links a { font-size: 15px; padding: 10px 10px; } .nav-links a::after { left: 10px; right: 10px; } .nav-inner { gap: 20px; } }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-burger { display: none; }
.nav-buy .s, .nav-m-extra { display: none; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-actions .hide-sm { display: none; }
  .nav-actions { margin-left: auto; gap: 8px; }
  .nav-burger { display: inline-flex; }
  .nav-inner { gap: 12px; }
  .nav.is-open .nav-m-extra { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
  .nav.is-open .nav-m-extra .nav-dash .t { display: inline; }
  .nav.is-open .nav-links {
    display: flex; flex-direction: column; position: absolute; top: 76px; left: 0; right: 0;
    padding: 12px 16px 20px; background: rgba(19,8,11,.97); border-bottom: 1px solid var(--line);
  }
  .nav.is-open .nav-links a { padding: 12px; font-size: 16px; } .nav.is-open .nav-links a::after { display: none; }
}

@media (max-width: 560px) {
  .nav-inner { height: 64px; }
  .nav .logo img { height: 30px; }
  .nav-buy { padding: 0 14px; height: 40px; }
  .nav-buy .l { display: none; } .nav-buy .s { display: inline; }
  .nav-acct { padding: 0 10px; height: 40px; font-size: 14px; }
  .nav-acct.nav-dash .t { display: none; }
  .nav-acct.nav-dash img, .nav-acct.nav-dash .nav-dash-i { width: 30px; height: 30px; }
  .nav-burger { width: 40px; height: 40px; }
  .nav.is-open .nav-links { top: 64px; }
}

/* --- Footer ------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding: 64px 0 32px; margin-top: 40px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.25)); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer h4 { font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 14px; letter-spacing: 0; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--muted); font-size: 14px; transition: color .2s; }
.footer ul a:hover { color: var(--text); }
.footer-brand p { color: var(--dim); font-size: 14px; margin-top: 14px; max-width: 320px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* --- Toasts ------------------------------------------------------------- */
.toasts { position: fixed; z-index: 200; bottom: 20px; right: 20px; display: grid; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  min-width: 260px; max-width: 360px; padding: 12px 14px;
  background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 20px 40px -12px rgba(0,0,0,.7);
  font-size: 14px;
  animation: toast-in .45s var(--ease-out);
}
.toast.out { animation: toast-out .3s var(--ease) forwards; }
.toast svg { width: 18px; height: 18px; flex: none; color: var(--green); }
.toast.error svg { color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px) scale(.97); } }
@media (max-width: 640px) { .toasts { left: 16px; right: 16px; } .toast { max-width: none; } }

/* --- Modal -------------------------------------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 150;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh 16px 16px;
  background: rgba(8, 3, 5, .62);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .25s var(--ease);
}
.modal-backdrop.is-open { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 520px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.8);
  transform: translateY(10px) scale(.98); transition: transform .35s var(--ease-out);
  overflow: hidden; max-height: calc(100dvh - 12vh - 16px); display: flex; flex-direction: column;
}
.modal-backdrop.is-open .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 22px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal-head { flex: none; }

/* --- Reveal on scroll --------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ease-out), transform .55s var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* --- Misc --------------------------------------------------------------- */
.icon { width: 18px; height: 18px; flex: none; }
.chip-icon {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none;
  border-radius: 10px; color: var(--text);
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.chip-icon svg { width: 18px; height: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

.nav-dash { display: inline-flex; align-items: center; gap: 8px; }
.nav-dash img, .nav-dash-i { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; flex: none; }
.nav-dash-i { display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(135deg, hsl(var(--h) 70% 55%), hsl(calc(var(--h) + 30) 60% 35%)); }
@media (max-width: 640px) {
  .modal-backdrop { padding: 12px; align-items: center; }
  .modal { max-height: calc(100dvh - 24px); }
}
