/* =====================================================
   MiniMax AI Hub — Main Design System
   "Refined Dark Tech Luxury"
   ===================================================== */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---------- Tokens ---------- */
:root {
  --bg-primary: #080B14;
  --bg-secondary: #0E1220;
  --bg-card: #131928;
  --bg-elev: #1A2138;
  --accent-primary: #4F8EFF;
  --accent-secondary: #00FFD1;
  --accent-tertiary: #B47BFF;
  --accent-glow: rgba(79, 142, 255, 0.15);
  --accent-glow-strong: rgba(79, 142, 255, 0.35);
  --text-primary: #F0F4FF;
  --text-secondary: #8A95B0;
  --text-muted: #4A5270;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --gradient-hero: linear-gradient(135deg, #080B14 0%, #0D1535 50%, #080B14 100%);
  --gradient-accent: linear-gradient(135deg, #4F8EFF 0%, #00FFD1 100%);
  --gradient-purple: linear-gradient(135deg, #B47BFF 0%, #4F8EFF 100%);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.32);
  --shadow-glow: 0 0 40px rgba(79, 142, 255, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 220ms cubic-bezier(0.2, 0.8, 0.2, 1);

  --font-display: 'Sora', system-ui, -apple-system, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { color: var(--text-secondary); }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
  position: relative;
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-secondary);
  margin-bottom: 14px;
  display: inline-block;
}

.section-title {
  margin-bottom: 18px;
}

.section-subtitle {
  color: var(--text-secondary);
  max-width: 720px;
  font-size: 1.05rem;
}

.section-head {
  text-align: center;
  margin: 0 auto 56px;
  max-width: 760px;
}

.section-head .section-subtitle {
  margin: 0 auto;
}

/* ---------- Background flourishes ---------- */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  pointer-events: none;
}

.bg-glow.blue { background: radial-gradient(circle, #4F8EFF 0%, transparent 70%); }
.bg-glow.cyan { background: radial-gradient(circle, #00FFD1 0%, transparent 70%); }
.bg-glow.purple { background: radial-gradient(circle, #B47BFF 0%, transparent 70%); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 11, 20, 0.7);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gradient-accent);
  display: grid;
  place-items: center;
  color: #0b1020;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 0 24px rgba(79, 142, 255, 0.4);
}

.brand small {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: -2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.94rem;
  transition: all var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.nav-links a.active {
  color: var(--text-primary);
  background: rgba(79, 142, 255, 0.1);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.02);
}

.lang-btn:hover { color: var(--text-primary); border-color: var(--border-strong); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: var(--shadow-card);
  display: none;
  z-index: 50;
}

.lang-switcher.open .lang-menu { display: block; }

.lang-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.lang-menu a:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
}

.lang-flag { font-size: 1.05rem; }

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .nav-links, .nav-cta .lang-switcher { display: none; }
  .mobile-toggle { display: flex; }
  .nav-cta .btn-primary { display: none; }
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 24px;
  z-index: 99;
}

.mobile-menu.open { display: block; }

.mobile-menu a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  transition: all var(--transition);
  white-space: nowrap;
  text-align: center;
  justify-content: center;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #0b1020;
  box-shadow: 0 8px 24px rgba(79, 142, 255, 0.32);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(79, 142, 255, 0.5);
}

.btn-secondary {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.24);
}

.btn-ghost {
  color: var(--text-secondary);
  padding: 10px 14px;
}

.btn-ghost:hover { color: var(--text-primary); }

.btn-large {
  padding: 16px 32px;
  font-size: 1.05rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 120px 0 100px;
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(79, 142, 255, 0.2), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(0, 255, 209, 0.12), transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.04);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-secondary);
  box-shadow: 0 0 12px var(--accent-secondary);
}

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin-bottom: 24px;
}

.hero h1 .cycle {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  min-width: 1ch;
}

.hero h1 .cycle::after {
  content: '|';
  margin-left: 2px;
  color: var(--accent-secondary);
  animation: blink 1s steps(2) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-sub {
  max-width: 720px;
  margin: 0 auto 40px;
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.trust-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.trust-bar strong {
  color: var(--text-secondary);
  font-weight: 500;
}

.trust-bar span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust-bar span::before {
  content: '◆';
  color: var(--accent-primary);
  font-size: 0.6rem;
}

/* ---------- Stats ---------- */
.stats {
  padding: 56px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 64px 0 32px;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 48px;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand p {
  margin-top: 14px;
  font-size: 0.92rem;
  max-width: 320px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-weight: 500;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
}

.footer-disclosure {
  margin-top: 24px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.02);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-disclosure strong { color: var(--text-secondary); }

/* ---------- Floating CTA ---------- */
.floating-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.floating-cta a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--gradient-accent);
  color: #0b1020;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 10px 32px rgba(79, 142, 255, 0.5);
  transition: all var(--transition);
  text-decoration: none;
}

.floating-cta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(79, 142, 255, 0.6);
}

.floating-cta .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0b1020;
  position: relative;
}

.floating-cta .pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #0b1020;
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

@media (max-width: 540px) {
  .floating-cta a span.label { display: none; }
  .floating-cta a { padding: 14px 18px; }
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  max-width: 380px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 20px;
  z-index: 90;
  display: none;
  box-shadow: var(--shadow-card);
}

.cookie-banner.show { display: block; }

.cookie-banner p {
  font-size: 0.88rem;
  margin-bottom: 14px;
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  gap: 8px;
}

.cookie-actions .btn { padding: 8px 14px; font-size: 0.85rem; }

/* ---------- Newsletter modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 20, 0.78);
  backdrop-filter: blur(6px);
  z-index: 110;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.show { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--text-muted);
}

.modal-close:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }

.modal h3 {
  margin-bottom: 10px;
  font-size: 1.6rem;
}

.modal p {
  margin-bottom: 24px;
  font-size: 0.95rem;
}

/* ---------- Forms ---------- */
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea { min-height: 140px; resize: vertical; }

label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-row { margin-bottom: 18px; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  display: none;
  place-items: center;
  z-index: 70;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.back-to-top.show { display: grid; }
.back-to-top:hover { color: var(--text-primary); transform: translateY(-2px); }

/* ---------- Utility ---------- */
.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-mono { font-family: var(--font-mono); }

.divider {
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

.affiliate-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 8px;
  display: block;
}
