/* ==========================================================================
   RIOT — design system
   ========================================================================== */

:root {
  --bg: #070708;
  --bg-2: #0b0b0d;
  --surface: #111114;
  --surface-2: #17171b;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #ededf0;
  --muted: #9b9ba6;
  --faint: #6b6b75;
  --red: #e3262c;
  --red-bright: #ff4046;
  --red-dim: rgba(227, 38, 44, 0.14);
  --red-glow: rgba(227, 38, 44, 0.38);
  --green: #3ecf8e;
  --amber: #f0b44c;
  --silver: linear-gradient(180deg, #ffffff 0%, #d9dbe0 45%, #9a9da5 100%);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --nav-h: 68px;
  --wrap: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  animation: page-in 0.5s var(--ease) both;
}
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
body.leaving { opacity: 0; transition: opacity 0.18s ease; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 0.9em; }
::selection { background: var(--red); color: #fff; }

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--red); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

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

.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;
}

/* ---------- Background ambience ---------- */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(227, 38, 44, 0.16), transparent 70%),
    var(--bg);
}
.ambient::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.ambient::after {
  content: ""; position: absolute; width: 620px; height: 620px; left: 50%; top: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 38, 44, 0.12), transparent 65%);
  filter: blur(30px);
  transform: translateX(-50%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  0% { transform: translate(-70%, 0) scale(1); }
  100% { transform: translate(-30%, 60px) scale(1.15); }
}

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.04em; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #1c1c20, #0a0a0b);
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 6px 18px rgba(0,0,0,0.5);
  font-weight: 800; font-size: 17px; letter-spacing: -0.02em;
}
.brand-mark span, .silver {
  background: var(--silver);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-name { font-size: 20px; }
.brand-name span { background: var(--silver); -webkit-background-clip: text; background-clip: text; color: transparent; }

.brand-mark.xl {
  width: 112px; height: 112px; border-radius: 28px; font-size: 52px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 0 0 1px rgba(227,38,44,0.12), 0 20px 60px rgba(227, 38, 44, 0.22);
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(7, 7, 8, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(7, 7, 8, 0.88); }
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 24px; }
.nav-links { display: flex; gap: 4px; margin-left: 20px; list-style: none; padding: 0; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: 15px; font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-links a[aria-current="page"] { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-account {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
  border-radius: 999px; border: 1px solid var(--border); color: var(--muted); font-size: 14px; font-weight: 500;
  transition: border-color 0.2s, color 0.2s;
}
.nav-account:hover { color: var(--text); border-color: var(--border-strong); }
.nav-account.guest { padding: 8px 14px; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff;
  background: #5865f2;
}
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }

.nav-toggle {
  display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 10px;
  background: transparent; border: 1px solid var(--border); cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  position: absolute; left: 11px; width: 18px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle span { top: 19px; }
.nav-toggle span::before { content: ""; left: 0; top: -6px; }
.nav-toggle span::after { content: ""; left: 0; top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 49;
  background: rgba(7, 7, 8, 0.97); backdrop-filter: blur(10px);
  padding: 20px 16px 32px; display: flex; flex-direction: column; gap: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
.nav-open .mobile-menu { opacity: 1; visibility: visible; transform: none; }
.mobile-menu a.m-link {
  padding: 14px 12px; font-size: 20px; font-weight: 600; border-bottom: 1px solid var(--border);
}
.mobile-menu a.m-link[aria-current="page"] { color: var(--red-bright); }
.mobile-menu .btn { margin-top: 18px; }

@media (max-width: 900px) {
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: block; }
  .nav-open { overflow: hidden; }
}
@media (min-width: 901px) { .mobile-menu { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 11px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.25s, background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  background: linear-gradient(180deg, var(--red-bright), var(--red));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 0 8px 24px -8px var(--red-glow);
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(255,255,255,0.14) inset, 0 10px 32px -6px var(--red-glow); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,0.03); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.22); }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #4f5bdc; transform: translateY(-1px); }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 13px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
.spinner.lg { width: 36px; height: 36px; border-width: 3px; border-color: rgba(227,38,44,0.2); border-top-color: var(--red-bright); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red-bright);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.section { padding: 110px 0; position: relative; }
.section-sm { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow::after { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 800; margin: 14px 0 14px; }
.section-head p { color: var(--muted); font-size: 18px; }
.accent { color: var(--red-bright); }
.muted { color: var(--muted); }
@media (max-width: 640px) { .section { padding: 76px 0; } .section-head { margin-bottom: 36px; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01)), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; text-align: center; position: relative; }
.hero .brand-mark.xl { margin: 0 auto 30px; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.hero h1 {
  font-size: clamp(48px, 9vw, 104px); font-weight: 800; letter-spacing: -0.045em; line-height: 0.98;
}
.hero h1 .dash { color: var(--red); -webkit-text-fill-color: var(--red); }
.hero h1 .take { display: block; color: var(--text); }
.hero-sub { max-width: 560px; margin: 26px auto 34px; color: var(--muted); font-size: clamp(17px, 2vw, 20px); }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
  padding: 6px 14px 6px 6px; border-radius: 999px; font-size: 14px; color: var(--muted);
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
}
.hero-chip b { background: var(--red-dim); color: var(--red-bright); padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.hero-visual {
  position: relative; margin: 72px auto 0; max-width: 1000px;
  border-radius: var(--radius-lg); padding: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.01));
  box-shadow: 0 40px 120px -30px rgba(227, 38, 44, 0.35), 0 0 0 1px var(--border);
}
.hero-visual img { border-radius: 16px; width: 100%; aspect-ratio: 1200 / 400; object-fit: cover; }
.hero-visual::after {
  content: ""; position: absolute; inset: auto 10% -1px 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--red-bright), transparent);
}

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg-2); padding: 26px 20px; text-align: center; }
.stat b { display: block; font-size: 32px; font-weight: 800; letter-spacing: -0.03em; }
.stat > span { color: var(--muted); font-size: 14px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Overview ---------- */
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: center; }
.split.flip { grid-template-columns: 1.25fr 1fr; }
@media (max-width: 960px) { .split, .split.flip { grid-template-columns: 1fr; gap: 40px; } }
.check-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.check-list li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 6px;
  background: var(--red-dim) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23ff4046' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 10.5l3.2 3L15 7'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.check-list li b { color: var(--text); font-weight: 600; }
.frame {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-strong);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.9), 0 0 60px -20px var(--red-glow);
  background: #000;
}
.kbd {
  display: inline-block; padding: 1px 8px; border-radius: 6px; font-family: var(--mono); font-size: 0.85em;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-bottom-width: 2px; color: var(--text);
}

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.shot {
  position: relative; border-radius: var(--radius); overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--border); background: #000; padding: 0;
  aspect-ratio: 16 / 10;
  transition: border-color 0.25s, transform 0.4s var(--ease);
}
.shot:hover { border-color: rgba(227, 38, 44, 0.45); transform: translateY(-3px); }
.shot .img {
  position: absolute; inset: 0; background-image: url("../assets/client-modules.webp");
  background-repeat: no-repeat; transition: transform 0.6s var(--ease);
}
.shot:hover .img { transform: scale(1.04); }
.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 12px; text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,0.85)); font-size: 14px; font-weight: 600;
}
.shot.wide { grid-column: span 6; aspect-ratio: 1677 / 938; }
.shot.third { grid-column: span 2; }
.shot.half { grid-column: span 3; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .shot.wide { grid-column: span 2; }
  .shot.third, .shot.half { grid-column: span 1; }
}

.lightbox {
  position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,0.9); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 24px; opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-height: 88vh; border-radius: var(--radius); border: 1px solid var(--border-strong); }
.lightbox button {
  position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border-strong); cursor: pointer; font-size: 22px;
}

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }
.feature { position: relative; overflow: hidden; transition: border-color 0.3s, transform 0.4s var(--ease); }
.feature:hover { border-color: rgba(227, 38, 44, 0.35); transform: translateY(-3px); }
.feature::before {
  content: ""; position: absolute; inset: -1px -1px auto auto; width: 160px; height: 160px;
  background: radial-gradient(circle at top right, rgba(227,38,44,0.16), transparent 70%);
  opacity: 0; transition: opacity 0.3s;
}
.feature:hover::before { opacity: 1; }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 20px;
  background: var(--red-dim); color: var(--red-bright); border: 1px solid rgba(227,38,44,0.25);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }
.feature .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--muted); }

/* ---------- Marquee ---------- */
.marquee { display: grid; gap: 12px; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-row { display: flex; gap: 12px; width: max-content; animation: scroll-x 60s linear infinite; }
.marquee-row.rev { animation-direction: reverse; animation-duration: 70s; }
.marquee:hover .marquee-row { animation-play-state: paused; }
@keyframes scroll-x { to { transform: translateX(-50%); } }
.pill {
  padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-weight: 500; font-size: 15px; white-space: nowrap;
}
.pill small { color: var(--faint); margin-left: 8px; font-size: 12px; }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); gap: 20px; justify-content: center; }
@media (max-width: 820px) { .plans { grid-template-columns: minmax(0, 480px); } }
.plan { position: relative; display: flex; flex-direction: column; padding: 34px; }
.plan.featured {
  border-color: rgba(227, 38, 44, 0.45);
  background:
    radial-gradient(ellipse 120% 60% at 50% 0%, rgba(227,38,44,0.16), transparent 60%),
    var(--surface);
  box-shadow: 0 30px 80px -40px var(--red-glow);
}
.plan-badge {
  position: absolute; top: -12px; left: 34px; padding: 4px 12px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.plan h3 { font-size: 22px; font-weight: 700; }
.plan .plan-sub { color: var(--muted); font-size: 15px; margin-top: 6px; }
.price { display: flex; align-items: baseline; gap: 6px; margin: 26px 0 4px; }
.price b { font-size: 60px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.price .cur { font-size: 26px; font-weight: 700; align-self: flex-start; margin-top: 6px; }
.price span { color: var(--muted); }
.plan .price-note { color: var(--faint); font-size: 14px; }
.plan .check-list { margin: 26px 0 30px; flex: 1; }
.plan .check-list li { font-size: 15px; }
.fine { color: var(--faint); font-size: 13px; text-align: center; margin-top: 26px; }
.fine a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.fine a:hover { color: var(--text); }

.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.compare thead th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.compare tbody tr:hover { background: rgba(255,255,255,0.015); }
.compare .yes { color: var(--red-bright); font-weight: 700; }
.compare .no { color: var(--faint); }
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.25s, background 0.25s;
}
.faq details[open] { border-color: rgba(227, 38, 44, 0.3); background: var(--surface-2); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 56px 20px 22px; font-weight: 600; font-size: 17px; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; border-color: var(--red-bright); }
.faq .answer { padding: 0 22px 20px; color: var(--muted); }
.faq .answer a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; text-align: center; padding: 72px 28px;
  border-radius: 28px; border: 1px solid rgba(227,38,44,0.3);
  background:
    radial-gradient(ellipse 60% 80% at 50% 120%, rgba(227,38,44,0.35), transparent 70%),
    linear-gradient(180deg, #121215, #0a0a0b);
}
.cta h2 { font-size: clamp(30px, 4.5vw, 46px); font-weight: 800; }
.cta p { color: var(--muted); max-width: 520px; margin: 14px auto 30px; font-size: 18px; }
.cta .hero-ctas { margin-top: 0; }
.invite-link {
  display: inline-block; margin: -8px 0 26px; padding: 8px 16px; border-radius: 10px;
  font-family: var(--mono); font-size: 16px; color: #c9ceff;
  background: rgba(88, 101, 242, 0.12); border: 1px solid rgba(88, 101, 242, 0.35);
  transition: background 0.2s, border-color 0.2s;
}
.invite-link:hover { background: rgba(88, 101, 242, 0.2); border-color: rgba(88, 101, 242, 0.6); }
.cta p.official-note, .official-note {
  max-width: 560px; margin: 26px auto 0; padding: 12px 16px; border-radius: 12px;
  font-size: 14px; color: var(--muted); line-height: 1.5;
  background: rgba(227, 38, 44, 0.07); border: 1px solid rgba(227, 38, 44, 0.3);
}
.official-note strong { color: var(--text); }
.official-note.left { margin: 16px 0 0; text-align: left; }
.support-grid .card p.official-note { margin: 16px 0 0; color: var(--muted); font-size: 13px; }

/* ---------- Page header ---------- */
.page-head { padding: 72px 0 40px; text-align: center; }
.page-head h1 { font-size: clamp(42px, 7vw, 76px); font-weight: 800; letter-spacing: -0.04em; margin-top: 14px; }
.page-head p { color: var(--muted); font-size: 18px; max-width: 560px; margin: 16px auto 0; }

/* ---------- Modules page ---------- */
.catalog { display: grid; grid-template-columns: 250px 1fr; gap: 32px; align-items: start; padding-bottom: 60px; }
.catalog > * { min-width: 0; }
.cat-nav { position: sticky; top: calc(var(--nav-h) + 20px); }
.cat-nav h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--faint); font-weight: 600; margin: 0 0 10px 12px; }
.cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: calc(100vh - var(--nav-h) - 80px); overflow-y: auto; scrollbar-width: thin; }
.cat-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 9px; border: 1px solid transparent; background: transparent;
  color: var(--muted); font-size: 15px; font-weight: 500; cursor: pointer; text-align: left;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.cat-btn:hover { background: rgba(255,255,255,0.035); color: var(--text); }
.cat-btn .count {
  font-size: 12px; min-width: 28px; text-align: center; padding: 1px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.05); color: var(--faint); font-variant-numeric: tabular-nums;
}
.cat-btn[aria-pressed="true"] {
  background: var(--red-dim); color: var(--text); border-color: rgba(227, 38, 44, 0.3);
}
.cat-btn[aria-pressed="true"] .count { background: var(--red); color: #fff; }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.search {
  position: relative; flex: 1; min-width: 220px;
}
.search svg { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search input {
  width: 100%; height: 48px; padding: 0 44px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); font: inherit; font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: rgba(227, 38, 44, 0.6); box-shadow: 0 0 0 4px rgba(227, 38, 44, 0.12); }
.search .clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 8px;
  border: 0; background: rgba(255,255,255,0.06); color: var(--muted); cursor: pointer; display: none; font-size: 16px; line-height: 1;
}
.search .clear.show { display: block; }
.search .clear:hover { color: var(--text); background: rgba(255,255,255,0.1); }
.result-meta { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 12px; }
.result-meta b { color: var(--text); font-variant-numeric: tabular-nums; }
.link-btn { background: none; border: 0; padding: 0; color: var(--red-bright); cursor: pointer; font-size: 14px; font-weight: 500; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.module-card {
  padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
  min-height: 78px; display: flex; flex-direction: column; justify-content: center;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.25s, transform 0.25s var(--ease);
  animation: card-in 0.35s var(--ease) both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(6px); } }
.module-card:hover {
  border-color: rgba(227, 38, 44, 0.4); background: var(--surface-2);
  box-shadow: 0 10px 30px -18px var(--red-glow); transform: translateY(-2px);
}
.module-card h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.module-card p { font-size: 13px; color: var(--faint); margin-top: 4px; }
.module-card mark { background: rgba(227, 38, 44, 0.25); color: #fff; border-radius: 3px; padding: 0 1px; }

.empty {
  text-align: center; padding: 64px 24px; border: 1px dashed var(--border-strong); border-radius: var(--radius);
}
.empty .empty-icon { width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--faint); }
.empty h3 { font-size: 20px; margin-bottom: 6px; }
.empty p { color: var(--muted); margin-bottom: 20px; }

.disclaimer {
  display: flex; gap: 12px; align-items: flex-start; max-width: 820px; margin: 0 auto 60px;
  padding: 14px 18px; border-radius: 12px; font-size: 14px; color: var(--muted);
  background: rgba(240, 180, 76, 0.05); border: 1px solid rgba(240, 180, 76, 0.18);
}
.disclaimer svg { flex: none; width: 18px; height: 18px; color: var(--amber); margin-top: 2px; }

.cat-select { display: none; }
@media (max-width: 900px) {
  .catalog { grid-template-columns: 1fr; gap: 16px; }
  .cat-nav { position: static; }
  .cat-nav h2 { display: none; }
  .cat-list {
    display: flex; overflow-x: auto; gap: 8px; max-height: none; padding: 2px 2px 10px;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .cat-list::-webkit-scrollbar { display: none; }
  .cat-list li { flex: none; scroll-snap-align: start; }
  .cat-btn { padding: 9px 14px; border-color: var(--border); border-radius: 999px; background: var(--surface); white-space: nowrap; min-height: 42px; }
  .module-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ---------- Forms / auth ---------- */
.auth-wrap { min-height: calc(100vh - var(--nav-h) - 80px); display: grid; place-items: center; padding: 48px 0; }
.auth-card { width: 100%; max-width: 440px; text-align: center; padding: 40px 34px; }
.auth-card .brand-mark { width: 64px; height: 64px; border-radius: 18px; font-size: 28px; margin: 0 auto 22px; }
.auth-card h1 { font-size: 28px; font-weight: 800; }
.auth-card .lead { color: var(--muted); margin: 10px 0 28px; }
.auth-card .plan-pill { display: inline-flex; gap: 6px; margin-bottom: 22px; padding: 6px 14px; border-radius: 999px; background: var(--red-dim); border: 1px solid rgba(227,38,44,0.3); font-size: 14px; }
.auth-points { list-style: none; padding: 0; margin: 26px 0 0; text-align: left; display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.auth-points li { display: flex; gap: 10px; }
.auth-points svg { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--green); }
.alert {
  display: none; text-align: left; padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 18px;
  background: rgba(227, 38, 44, 0.08); border: 1px solid rgba(227, 38, 44, 0.3); color: #ffb3b5;
}
.alert.show { display: block; }
.back-link { display: inline-flex; gap: 6px; margin-top: 26px; color: var(--muted); font-size: 14px; }
.back-link:hover { color: var(--text); }

.demo-banner {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 16px; font-size: 13px; color: #ffd48a; text-align: center;
  background: rgba(240, 180, 76, 0.08); border-bottom: 1px solid rgba(240, 180, 76, 0.18);
}
.demo-banner b { font-weight: 700; letter-spacing: 0.04em; }

/* ---------- Checkout (simulated provider) ---------- */
.checkout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 920px; margin: 0 auto; padding: 48px 0 80px; }
@media (max-width: 820px) { .checkout { grid-template-columns: 1fr; } }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.summary-row span:first-child { color: var(--muted); }
.summary-row.total { border: 0; font-size: 18px; font-weight: 700; padding-top: 18px; }
.summary-row.total span:first-child { color: var(--text); }
.field { display: grid; gap: 6px; margin-bottom: 14px; text-align: left; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.field input {
  height: 46px; padding: 0 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border-strong);
  color: var(--faint); font: inherit; font-family: var(--mono); font-size: 14px;
}
.provider-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(240,180,76,0.1); color: var(--amber); border: 1px solid rgba(240,180,76,0.25); font-weight: 600; }

/* ---------- Status / license ---------- */
.status {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.active { color: var(--green); background: rgba(62, 207, 142, 0.1); }
.status.expired { color: var(--faint); background: rgba(255,255,255,0.05); }
.status.pending { color: var(--amber); background: rgba(240,180,76,0.1); }
.status.revoked, .status.failed, .status.refunded { color: #ff8a8d; background: rgba(227,38,44,0.12); }

.key-box {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 18px; border-radius: 12px;
  background: #050506; border: 1px solid rgba(227,38,44,0.35); box-shadow: 0 0 40px -20px var(--red-glow) inset;
}
.key-box code { flex: 1; font-family: var(--mono); font-size: clamp(14px, 2.4vw, 19px); letter-spacing: 0.08em; overflow-wrap: anywhere; color: #fff; }
.key-box code.masked { color: var(--faint); letter-spacing: 0.12em; }

.success-wrap { max-width: 640px; margin: 0 auto; padding: 56px 0 90px; }
.success-icon {
  width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(62, 207, 142, 0.1); color: var(--green); border: 1px solid rgba(62, 207, 142, 0.3);
  animation: pop 0.5s var(--ease) both;
}
.success-icon.pending { background: rgba(240,180,76,0.08); color: var(--amber); border-color: rgba(240,180,76,0.25); }
.success-icon.bad { background: rgba(227,38,44,0.1); color: var(--red-bright); border-color: rgba(227,38,44,0.3); }
.success-icon svg { width: 32px; height: 32px; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 12px 24px; font-size: 15px; margin: 22px 0 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }

.account-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.account-head h1 { font-size: 30px; font-weight: 800; }
.account-head .muted { font-size: 14px; font-family: var(--mono); }
.account-head .btn { margin-left: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 36px 0 24px; }
.tab {
  background: none; border: 0; padding: 12px 16px; color: var(--muted); font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--red); }
.license-list { display: grid; gap: 14px; }
.license { padding: 22px 24px; }
.license-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.license-top h3 { font-size: 18px; }
.license-top .order { margin-left: auto; color: var(--faint); font-size: 13px; font-family: var(--mono); }
.license-meta { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 14px; font-size: 14px; color: var(--muted); }
.license-meta b { color: var(--text); font-weight: 500; }
.history { width: 100%; border-collapse: collapse; font-size: 14px; }
.history th, .history td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.history th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.history td.mono { font-family: var(--mono); color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 95; transform: translate(-50%, 20px); opacity: 0;
  padding: 12px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-strong);
  font-size: 14px; font-weight: 500; box-shadow: 0 20px 40px rgba(0,0,0,0.5); pointer-events: none;
  transition: opacity 0.25s, transform 0.3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Support ---------- */
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .support-grid { grid-template-columns: 1fr; } }
.support-grid .card h3 { font-size: 19px; margin-bottom: 8px; }
.support-grid .card p { color: var(--muted); font-size: 15px; margin-bottom: 20px; }

/* ---------- Legal ---------- */
.legal { max-width: 780px; margin: 0 auto; padding: 24px 0 90px; }
.legal h2 { font-size: 22px; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 20px; display: grid; gap: 6px; }
.legal .updated { color: var(--faint); font-size: 14px; }
.notice {
  padding: 14px 18px; border-radius: 12px; font-size: 14px; color: #ffd48a;
  background: rgba(240,180,76,0.06); border: 1px solid rgba(240,180,76,0.2); margin-top: 20px;
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 64px 0 34px; margin-top: 40px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer p.tagline { color: var(--muted); margin-top: 14px; max-width: 300px; font-size: 15px; }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); font-weight: 600; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--muted); font-size: 15px; transition: color 0.2s; }
.footer ul a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--faint); font-size: 13px;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: span 2; } }

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