:root {
  --bg: #06121a;
  --bg-2: #0a1c27;
  --surface: rgba(14, 37, 51, 0.62);
  --surface-solid: #0e2533;
  --line: rgba(120, 210, 255, 0.14);
  --line-strong: rgba(120, 210, 255, 0.34);
  --text: #e3f5ff;
  --muted: #8fb4c6;
  --cyan: #1ec8ff;
  --cyan-2: #0f86c9;
  --error: #ff8a8a;
  --glow: 0 0 0 1px rgba(30, 200, 255, 0.35), 0 12px 40px -12px rgba(30, 200, 255, 0.5);
  --radius: 18px;
  --radius-sm: 12px;
  --head: 'Outfit', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(30, 200, 255, 0.10), transparent 60%), var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; margin: 0; }
a { color: var(--cyan); }
code { background: var(--bg-2); padding: 1px 6px; border-radius: 6px; }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
[hidden] { display: none !important; }

/* Snow: two drifting dot layers, off for reduced motion */
.snow { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.5;
  background-image: radial-gradient(2px 2px at 20px 30px, #fff, transparent), radial-gradient(1.5px 1.5px at 120px 80px, #cfefff, transparent),
    radial-gradient(1px 1px at 200px 150px, #fff, transparent), radial-gradient(2px 2px at 300px 40px, #cfefff, transparent);
  background-size: 340px 240px; animation: snow 22s linear infinite; }
@keyframes snow { to { background-position: 60px 240px, -40px 240px, 30px 240px, -20px 240px; } }
main, .topbar, .footer { position: relative; z-index: 1; }

/* Buttons */
.btn { font: 600 15px var(--body); color: var(--text); background: var(--surface-solid); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 10px 18px; cursor: pointer; transition: box-shadow .2s, transform .2s, background .2s; }
.btn:hover { box-shadow: var(--glow); }
.btn:focus-visible, a:focus-visible, input:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn--primary { background: linear-gradient(180deg, var(--cyan), var(--cyan-2)); color: #03141d; border-color: transparent; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.icon-btn:hover { color: var(--text); }
.link { background: none; border: 0; color: var(--cyan); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }

/* Header */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(6, 18, 26, 0.78); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; gap: 16px; min-height: 76px; }
.brand img { width: 124px; height: auto; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; padding: 8px 14px; border-radius: 999px; }
.nav a:hover { background: var(--surface); }
.basket-btn { display: inline-flex; align-items: center; gap: 8px; font: 600 15px var(--body); color: #03141d; cursor: pointer;
  background: linear-gradient(180deg, var(--cyan), var(--cyan-2)); border: 0; border-radius: 999px; padding: 10px 16px; }
.basket-btn__count { background: #03141d; color: var(--cyan); border-radius: 999px; min-width: 22px; padding: 0 6px; font-size: 13px; text-align: center; }

/* Hero */
.hero { background: linear-gradient(90deg, rgba(6, 18, 26, 0.96) 0%, rgba(6, 18, 26, 0.7) 42%, rgba(6, 18, 26, 0.05) 100%),
  url('/assets/hero.jpg') center / cover no-repeat; border-bottom: 1px solid var(--line); }
.hero__inner { min-height: 440px; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding-block: 56px; }
.eyebrow { margin: 0; color: var(--cyan); font: 700 14px var(--head); letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; max-width: 12ch; }
.hero__lede { margin: 0; color: var(--muted); max-width: 42ch; font-size: 18px; }
.ip { align-self: flex-start; display: grid; grid-template-columns: auto auto; gap: 2px 14px; text-align: left; cursor: pointer; color: var(--text);
  background: var(--surface); backdrop-filter: blur(10px); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 12px 18px; }
.ip:hover { box-shadow: var(--glow); }
.ip__label { grid-column: 1 / -1; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.ip__value { font: 700 20px var(--head); }
.ip__hint { align-self: center; color: var(--cyan); font-size: 13px; }

/* Jump buttons: two halves, no gap left over */
.jump { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: -32px; position: relative; z-index: 2; }
.jump__btn { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--text); padding: 18px 24px;
  background: var(--surface); backdrop-filter: blur(12px); border: 1px solid var(--line-strong); border-radius: var(--radius); transition: box-shadow .2s, transform .2s; }
.jump__btn span { font: 700 22px var(--head); }
.jump__btn small { color: var(--muted); }
.jump__btn:hover { box-shadow: var(--glow); transform: translateY(-2px); }

/* Recent buyers */
.recent { display: flex; align-items: center; gap: 16px; margin-top: 28px; padding: 12px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.recent__top { display: flex; align-items: center; gap: 10px; flex-shrink: 0; padding-right: 16px; border-right: 1px solid var(--line); }
.recent__top small { display: block; color: var(--cyan); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.recent__list { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.recent__list li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.recent__list img, .recent__top img, .who img { border-radius: 6px; image-rendering: pixelated; }
.recent__list span { color: var(--muted); font-size: 14px; }

/* Sections and cards */
.section { padding-top: 64px; }
.section > h2 { font-size: clamp(28px, 3.4vw, 38px); text-align: center; }
.section__lede { color: var(--muted); text-align: center; max-width: 60ch; margin: 10px auto 0; }
.card { background: var(--surface); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .2s; }
.card:hover { box-shadow: var(--glow); border-color: var(--line-strong); transform: translateY(-3px); }

.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.feature img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.feature h3 { font-size: 20px; padding: 16px 18px 6px; }
.feature p { margin: 0; padding: 0 18px 18px; color: var(--muted); font-size: 15px; }

.grid5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.pkg { display: flex; flex-direction: column; padding: 14px; gap: 8px; }
.pkg__img { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: var(--radius-sm); }
.pkg__name { font-size: 20px; }
.pkg__price { margin: 0; font: 700 22px var(--head); color: var(--cyan); }
.pkg__price s { color: var(--muted); font-size: 15px; margin-left: 6px; }
.pkg__desc { color: var(--muted); font-size: 14px; flex: 1; }
.pkg__desc ul { margin: 0; padding-left: 18px; }
.pkg__desc li { margin-bottom: 4px; }
.pkg .btn { margin-top: auto; }
.loading, .unavailable { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 32px 0; }
.unavailable { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.compare-wrap { margin-top: 28px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.compare { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 14px; }
.compare caption { text-align: left; font: 700 18px var(--head); padding: 16px 18px 4px; }
.compare th, .compare td { padding: 12px 14px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare thead th { font: 700 16px var(--head); color: var(--cyan); }
.compare tbody th { color: var(--muted); font-weight: 600; white-space: nowrap; }

/* Footer */
.footer { margin-top: 80px; border-top: 1px solid var(--line); background: var(--bg-2); }
.footer__inner { padding-block: 32px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--muted); font-size: 14px; }
.footer__inner p { margin: 0; max-width: 70ch; }
.footer__links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.footer__fine { font-size: 12px; }

/* Basket drawer */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 21; display: flex; flex-direction: column; gap: 14px;
  padding: 18px; overflow-y: auto; background: var(--bg-2); border-left: 1px solid var(--line-strong);
  transform: translateX(100%); transition: transform .25s ease; }
.drawer.is-open { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; }
.drawer__head h2 { font-size: 24px; }
.drawer__empty { color: var(--muted); margin: 0; }
.who { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border-radius: var(--radius-sm); }
.who span { font-weight: 600; flex: 1; }
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.item img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.item__body { flex: 1; min-width: 0; }
.item__name { margin: 0; font-weight: 600; }
.item__price { margin: 0; color: var(--cyan); font-size: 14px; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface-solid); color: var(--text); cursor: pointer; }
.codes { display: flex; flex-direction: column; gap: 12px; }
.code label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.code__row { display: flex; gap: 8px; }
input { flex: 1; min-width: 0; font: 15px var(--body); color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; }
.code__msg { margin: 4px 0 0; font-size: 13px; min-height: 1em; color: var(--muted); }
.code__msg.is-error { color: var(--error); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 13px; }
.chip__x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; }
.drawer__foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; text-align: right; }
.totals dt:last-of-type, .totals dd:last-of-type { color: var(--text); font: 700 18px var(--head); }
.fine { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }

/* Dialogs and toast */
.modal { width: min(440px, calc(100% - 32px)); color: var(--text); background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 24px; }
.modal::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); }
.modal h2 { font-size: 24px; margin-bottom: 8px; }
.modal p { color: var(--muted); }
.modal label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
.modal input { width: 100%; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30; background: var(--surface-solid); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 10px 18px; box-shadow: var(--glow); max-width: calc(100% - 32px); }

/* Sits above the Tebex.js lightbox (z-index 9999999); Tebex's own close controls don't work, see app.js */
.checkout-close { position: fixed; top: 16px; right: 16px; z-index: 10000000; font: 600 15px var(--body); color: var(--text);
  background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 999px; padding: 10px 18px; cursor: pointer; }
.checkout-close:hover { box-shadow: var(--glow); }

/* Responsive */
@media (max-width: 1100px) {
  .grid5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .basket-btn { margin-left: auto; }
  .grid5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__inner { min-height: 360px; }
  .hero { background-position: 70% center; }
  .recent { flex-direction: column; align-items: flex-start; }
  .recent__top { border-right: 0; padding-right: 0; }
}
@media (max-width: 480px) {
  .grid5, .features { grid-template-columns: 1fr; }
  .jump { grid-template-columns: 1fr 1fr; gap: 10px; }
  .jump__btn { padding: 14px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .snow { animation: none; }
  *, *::before, *::after { transition: none !important; }
}
