/* Shared tokens and components for every page: black ground, Geist type, one green signal, motion everywhere it earns it */
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --bg: #000000;
  --bg-1: #0a0a0a;
  --bg-2: #131313;
  --bg-3: #1c1c1c;
  --fg: #ededed;
  --fg-2: #a1a1a1;
  --fg-3: #8f8f8f; /* 5.3:1 on --bg-3, 6.1:1 on --bg-1: passes WCAG AA for small text */
  --line: #1c1c1c;
  --line-2: #2a2a2a;
  --line-3: #3d3d3d;
  --green: #74dc5c;
  --green-2: #a6f08f;
  --green-ink: #0b1a07;
  --green-dim: rgba(116, 220, 92, .14);
  --green-glow: rgba(116, 220, 92, .35);
  --red: #ff6166;
  --red-dim: rgba(255, 97, 102, .14);
  --sheen: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0) 40%);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --w: 1160px;
  --nav-h: 76px;
  color-scheme: dark;
  interpolate-size: allow-keywords;
}

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .22s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .38s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); filter: blur(4px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } }
.nav { view-transition-name: nav; }

* { box-sizing: border-box; }
html { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 40; background: var(--bg); }
::selection { background: var(--green); color: var(--green-ink); }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
.mono { font-family: var(--mono); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--line-3); }

.gutter {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: var(--w); margin: 0 auto; }
main { overflow-x: clip; } /* oversized glows may bleed past the edges without widening the page */

@keyframes fade-in { from { opacity: 0; } }

/* Scroll reveal (only once motion.js has marked the page) */
.js [data-reveal]:not([data-stagger]) { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal].in:not([data-stagger]) { opacity: 1; transform: none; }
.js [data-stagger] > * { animation: rise .6s var(--ease) backwards; animation-delay: calc(min(var(--i, 0), 14) * 45ms); }
.js [data-stagger][data-reveal]:not(.in) > * { animation-play-state: paused; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* Spotlight that follows the pointer on product cards, so the card under the cursor reads as the one you are about to open */
.spot { position: relative; isolation: isolate; }
.spot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.05), transparent 50%);
  opacity: 0; transition: opacity .3s;
}
.spot:hover::after { opacity: 1; }

/* Nav: floating capsule. The only blurred surface on the site, so content stays readable behind it while scrolling */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; padding-top: 12px; padding-bottom: 4px; transition: padding .3s var(--ease); }
.nav-in {
  height: 60px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 10px 0 16px; border-radius: 18px; border: 1px solid transparent;
  transition: background .35s var(--ease), border-color .35s, box-shadow .35s, max-width .45s var(--ease);
}
.nav.scrolled { padding-top: 8px; }
.nav.scrolled .nav-in {
  max-width: calc(var(--w) - 80px);
  background: var(--sheen), rgba(10,10,10,.72); border-color: var(--line-2);
  backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 20px 50px -24px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.04);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -0.03em; font-size: 18px; }
.brand .mark { width: auto; height: 32px; flex: none; transition: transform .5s var(--spring); }
.site .brand .mark { height: 24px; }
.brand:hover .mark { transform: rotate(-6deg) scale(1.06); }
.tabs { position: relative; display: flex; gap: 2px; padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(10,10,10,.6); overflow-x: auto; scrollbar-width: none; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; z-index: 1; flex: none; padding: 6px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--fg-2); transition: color .2s; }
.tabs a:hover, .tabs a[aria-current="page"] { color: var(--fg); }
.nav-cta { justify-self: end; display: flex; gap: 8px; align-items: center; min-height: 34px; }
.account-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 4px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(10,10,10,.5); font-size: 13.5px; font-weight: 500; transition: border-color .2s, background .2s, transform .2s var(--ease); max-width: 200px; animation: rise .5s var(--ease) backwards; }
.account-chip:hover { border-color: var(--line-3); background: var(--bg-2); }
.account-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { position: relative; flex: none; border-radius: 50%; overflow: hidden; background: var(--bg-3); display: inline-grid; place-items: center; font-weight: 600; font-size: 12px; color: var(--fg-2); box-shadow: 0 0 0 1px rgba(255,255,255,.06); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 720px) {
  .nav-in { grid-template-columns: auto 1fr auto; gap: 10px; padding: 0 8px 0 12px; }
  .tabs { justify-self: center; max-width: 100%; }
  .account-name, .btn.discord span, .btn.support span { display: none; }
  .btn.support { padding: 0 10px; }
  .account-chip { padding: 0 4px; }
  .btn.discord { padding: 0 10px; }
}
@media (max-width: 460px) {
  .brand .word { display: none; }
  .tabs a { padding: 6px 11px; font-size: 13px; }
}

/* Glide: sliding active indicator for tab groups (motion.js positions it) */
[data-glide] { position: relative; }
.glide {
  position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; border-radius: 999px;
  background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 rgba(255,255,255,.06);
  transition: transform .45s var(--spring), width .45s var(--spring), height .3s var(--ease), opacity .2s;
}
.glide.instant { transition: none; }
.glide.hide { opacity: 0; }

/* Buttons */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: 10px;
  font: 500 14.5px/1 var(--sans); border: 1px solid var(--line-2); background: rgba(10,10,10,.6); color: var(--fg);
  cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s, opacity .2s, transform .2s var(--ease), box-shadow .3s;
}
.btn:hover { background: var(--bg-2); border-color: var(--line-3); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.light { background: var(--fg); color: #000; border-color: var(--fg); }
.btn.light:hover { background: #fff; border-color: #fff; }
.btn.green { background: var(--green); color: var(--green-ink); border-color: var(--green); font-weight: 600; }
.btn.green:hover { background: var(--green-2); border-color: var(--green-2); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--fg-2); }
.btn.ghost:hover { color: var(--fg); background: var(--bg-2); }
.btn.danger { color: var(--red); }
.btn.danger.armed { background: var(--red-dim); border-color: var(--red); animation: shake .35s var(--ease); }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.btn.discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn.discord:hover { background: #4f5be0; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 9px; }
.btn.xs { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn .arrow { transition: transform .3s var(--spring); }
.btn:hover .arrow { transform: translateX(3px); }

/* Form controls */
.field { display: grid; gap: 7px; min-width: 0; }
.field > label, .field > .label { font-size: 13px; font-weight: 500; color: var(--fg-2); }
.field .hint { font-size: 12.5px; color: var(--fg-3); }
.input {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line-2); background: rgba(8,8,8,.8); color: var(--fg);
  font: 14px var(--sans); transition: border-color .2s, box-shadow .25s, background .2s;
}
.input::placeholder { color: var(--fg-3); }
.input:hover { border-color: var(--line-3); }
.input:focus { outline: none; border-color: rgba(116,220,92,.6); box-shadow: 0 0 0 4px rgba(116,220,92,.12); background: #050505; }
textarea.input { height: auto; min-height: 112px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23a1a1a1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.search { position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--fg-3); pointer-events: none; transition: color .2s; }
.search:focus-within svg { color: var(--green); }
.search .input { padding-left: 38px; }

.segment { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--bg-1); }
.segment > .glide { border-radius: 8px; }
.segment button, .segment label {
  all: unset; box-sizing: border-box; cursor: pointer; padding: 6px 12px; border-radius: 8px; position: relative; z-index: 1;
  font-size: 13px; font-weight: 500; color: var(--fg-2); display: inline-flex; gap: 6px; align-items: center; transition: color .2s;
}
.segment button:hover, .segment label:hover { color: var(--fg); }
.segment button[aria-pressed="true"], .segment label:has(input:checked) { color: var(--fg); }
.segment:not(:has(.glide)) button[aria-pressed="true"], .segment:not(:has(.glide)) label:has(input:checked) { background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.segment button:focus-visible, .segment label:has(input:focus-visible) { outline: 2px solid var(--green); }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment .count { font: 11.5px var(--mono); color: var(--fg-3); font-variant-numeric: tabular-nums; }

.form-error { font-size: 13px; color: var(--red); background: var(--red-dim); border: 1px solid rgba(255,97,102,.3); border-radius: 10px; padding: 9px 12px; animation: rise .35s var(--ease) backwards; }
.muted { color: var(--fg-2); }
.upper { text-transform: uppercase; letter-spacing: .06em; }

/* Prices */
.price { display: inline-flex; align-items: baseline; gap: 7px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price b { font-weight: 650; letter-spacing: -0.02em; }
.price b.deal { color: var(--green); }
.price s { color: var(--fg-3); font-size: .85em; }

/* Dialogs: enter and exit both animate where the browser supports it */
dialog { color: var(--fg); }
dialog::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog.modal, dialog#detail {
  opacity: 0; transform: translateY(14px) scale(.97);
  transition: opacity .25s var(--ease), transform .35s var(--spring), overlay .35s allow-discrete, display .35s allow-discrete;
}
dialog.modal[open], dialog#detail[open] { opacity: 1; transform: none; }
dialog::backdrop { opacity: 0; transition: opacity .3s var(--ease), overlay .3s allow-discrete, display .3s allow-discrete; }
dialog[open]::backdrop { opacity: 1; }
@starting-style {
  dialog.modal[open], dialog#detail[open] { opacity: 0; transform: translateY(14px) scale(.97); }
  dialog[open]::backdrop { opacity: 0; }
}
/* Dialogs are the one raised surface, so they carry the only large shadow */
dialog.modal { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: 16px; background: var(--bg-1); box-shadow: 0 40px 120px -20px rgba(0,0,0,.9); }
.modal-body { padding: 24px; display: grid; gap: 18px; }
.modal-body h2 { font-size: 20px; font-weight: 650; letter-spacing: -0.03em; }
.modal-body p.muted { font-size: 14px; margin-top: 4px; }
.modal-head { display: flex; justify-content: space-between; align-items: start; }
.modal-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--green-dim); color: var(--green); }
.modal-icon svg { width: 20px; height: 20px; }
@keyframes float { 50% { transform: translateY(-3px) rotate(-3deg); } }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.voucher-active { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(116,220,92,.5); background: var(--green-dim); font-size: 13px; color: var(--fg); }
.voucher-active .mono { color: var(--green); font-weight: 500; }

/* Badges */
.tier { display: inline-flex; align-items: center; font: 500 10.5px/1 var(--mono); padding: 4px 7px; border-radius: 5px; text-transform: uppercase; letter-spacing: .05em; }
.tier.pro { background: var(--green); color: var(--green-ink); }
.tier.starter { background: var(--bg-2); color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.eyebrow { font: 500 13px/1.3 var(--sans); color: var(--green); }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }

/* Payment method badges: the brand mark as an image plus its name, so buyers can scan what they can pay with */
.pay-badges { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.pay-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--fg-2); white-space: nowrap; }
.pay-badge img { width: 40px; height: auto; border-radius: 6px; box-shadow: 0 0 0 1px var(--line-2); flex: none; }

/* Asset thumbnail (generated when no image is uploaded) */
.thumb { aspect-ratio: 4 / 3; max-width: 100%; display: grid; place-items: center; position: relative; overflow: hidden; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.thumb svg { width: 44%; height: auto; transition: transform .6s var(--spring); }
.thumb .tag { position: absolute; z-index: 1; top: 8px; left: 8px; font: 500 11px var(--mono); padding: 3px 7px; border-radius: 6px; background: rgba(0, 0, 0, .75); color: #e6e6e6; }
.thumb .tag.right { left: auto; right: 8px; }
:is(a, button, article):hover > .thumb img { transform: scale(1.06); }
:is(a, button, article):hover > .thumb svg { transform: scale(1.06); }

/* Footer */
footer.site { margin-top: 120px; border-top: 1px solid var(--line); }
.site .foot { padding-block: 36px 24px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; font-size: 13px; color: var(--fg-3); }
.site .foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site .foot nav a { transition: color .2s; }
.site .foot nav a:hover { color: var(--fg); }
.site .foot .disclaimer { flex-basis: 100%; font-size: 12px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px) scale(.96);
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--bg-2); color: var(--fg); font: 500 13.5px var(--sans); padding: 11px 16px 11px 12px; border-radius: 12px;
  border: 1px solid var(--line-2); box-shadow: 0 20px 50px -16px rgba(0,0,0,.9);
  opacity: 0; transition: opacity .25s var(--ease), transform .45s var(--spring); pointer-events: none; z-index: 60; max-width: calc(100vw - 32px);
}
.toast::before { content: "✓"; flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--green-ink); font: 700 11px/1 var(--sans); }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast.error { border-color: rgba(255,97,102,.4); }
.toast.error::before { content: "!"; background: var(--red); color: #1a0405; }

/* Skeleton loading */
.skeleton { background: linear-gradient(90deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-1) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 14px; border: 1px solid var(--line); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Shared growth animations for bars and meters */
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-a { to { --a: 360deg; } }

/* Touch screens: every control is at least 44px tall */
@media (pointer: coarse) {
  .btn.sm, .btn.xs, .chip, .devchip, .account-chip, .segment button, .segment label { min-height: 44px; }
  .tabs a { display: inline-flex; align-items: center; min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}

/* Shown to admins only while maintenance mode is on */
.maint-bar { position: relative; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 9px 16px; background: #ededed; color: #000; font-size: 13px; font-weight: 500; text-align: center; }
.maint-bar i { width: 7px; height: 7px; border-radius: 50%; background: #000; flex: none; animation: maint-blink 1.6s ease-in-out infinite; }
.maint-bar b { font-weight: 600; white-space: nowrap; }
.maint-bar:hover b { text-decoration: underline; }
@keyframes maint-blink { 50% { opacity: .25; } }
@media (max-width: 600px) { .maint-bar span { font-size: 12px; } }
