/* Marcianus Experience Web v3 — Living, Dynamic, Engagement-Optimized */
@import url("./tokens.css");

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: #050508;
  color: #fff;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; color: inherit; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: rgba(123,97,255,0.40); color: #fff; }

:root {
  --ink: #050508;
  --surface-1: #0A0A12;
  --surface-2: #0F0F1A;
  --surface-3: #141424;
  --surface-4: #1A1A2E;
  --border-1: rgba(255,255,255,0.06);
  --border-2: rgba(255,255,255,0.12);
  --border-3: rgba(255,255,255,0.20);
  --border-purple: rgba(123,97,255,0.35);
  --border-purple-strong: rgba(123,97,255,0.60);
  --text-0: #FFFFFF;
  --text-1: rgba(255,255,255,0.80);
  --text-2: rgba(255,255,255,0.60);
  --text-3: rgba(255,255,255,0.45);
  --text-4: rgba(255,255,255,0.30);
  --purple: #7B61FF;
  --purple-soft: #A78BFA;
  --purple-deep: #5D3FD3;
  --gold: #FFD700;
  --gold-warm: #F5C518;
  --success: #00C48C;
  --warning: #FFB020;
  --danger: #FF3B5C;
  --blue: #00D1FF;
}

/* ─── Background scene ─────────────────────────────────────────── */
.scene {
  position: fixed; inset: 0; z-index: -10; background: var(--ink); overflow: hidden;
  pointer-events: none;
}
.scene::before {
  content: ''; position: absolute; top: -20%; left: 50%; transform: translateX(-50%);
  width: 90vw; height: 90vw; max-width: 1500px; max-height: 1500px;
  background: radial-gradient(circle, rgba(123,97,255,0.22) 0%, rgba(93,63,211,0.08) 30%, transparent 60%);
  filter: blur(80px);
  animation: aurora 20s ease-in-out infinite alternate;
}
.scene::after {
  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: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 0%, transparent 75%);
}
.scene-orb {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.5;
  animation: float 24s ease-in-out infinite;
}
.scene-orb.a { width: 500px; height: 500px; background: rgba(0,209,255,0.18); top: 30%; left: -10%; animation-delay: 0s; }
.scene-orb.b { width: 600px; height: 600px; background: rgba(123,97,255,0.20); bottom: -10%; right: -10%; animation-delay: -8s; }
.scene-orb.c { width: 400px; height: 400px; background: rgba(255,215,0,0.06); top: 60%; left: 50%; animation-delay: -14s; }

@keyframes aurora { 0% {transform: translateX(-50%) rotate(0deg)} 100% {transform: translateX(-50%) rotate(40deg)} }
@keyframes float {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(40px,-30px) scale(1.05); }
  66% { transform: translate(-30px, 20px) scale(0.95); }
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(123,97,255,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(123,97,255,0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scoreCount {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ringPulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}
@keyframes liveBlink {
  0%, 70% { opacity: 1; }
  85% { opacity: 0.3; }
  100% { opacity: 1; }
}
@keyframes typing {
  0% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}
@keyframes confettiFly {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(-200px) rotate(540deg); opacity: 0; }
}

/* ─── Layout primitives ────────────────────────────────────────── */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }
.eyebrow {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--purple-soft);
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px;
}
.eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--purple); }
h1, h2, h3, h4 { color: var(--text-0); }
h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.02; letter-spacing: -0.035em; text-transform: uppercase; }
h2 .hl { color: var(--purple-soft); }
h2 .hl-grad {
  background: linear-gradient(135deg, #A78BFA 0%, #7B61FF 60%, #5D3FD3 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-lead { font-family: 'Inter', sans-serif; font-size: 18px; line-height: 1.65; color: var(--text-2); max-width: 640px; margin-top: 16px; }
section.page-section { padding: 96px 0; position: relative; }
section.page-section + section.page-section { border-top: 1px solid var(--border-1); }

/* ─── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: 14px; letter-spacing: 0.01em;
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1); white-space: nowrap;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 12px; border-radius: 8px; }
.btn-lg { height: 56px; padding: 0 28px; font-size: 15px; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 10px; }
.btn-icon-sm { width: 32px; height: 32px; padding: 0; border-radius: 8px; }

.btn-gold {
  background: var(--gold); color: #0B0F1A; font-weight: 800;
  box-shadow: 0 0 0 1px rgba(255,215,0,0.30), 0 10px 28px rgba(255,215,0,0.25), 0 0 40px rgba(255,215,0,0.18);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255,215,0,0.50), 0 14px 36px rgba(255,215,0,0.40), 0 0 60px rgba(255,215,0,0.35); }
.btn-primary { background: var(--purple); color: #fff; box-shadow: 0 4px 14px rgba(123,97,255,0.35); }
.btn-primary:hover { background: #8B72FF; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(123,97,255,0.55); }
.btn-ghost { background: transparent; color: var(--text-1); border-color: var(--border-2); }
.btn-ghost:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.25); color: #fff; }
.btn-glass { background: rgba(17,24,39,0.50); backdrop-filter: blur(12px); border-color: var(--border-2); color: #fff; }
.btn-glass:hover { background: rgba(17,24,39,0.80); border-color: var(--border-purple); }
.btn-purple-soft { background: rgba(123,97,255,0.12); color: var(--purple-soft); border-color: var(--border-purple); }
.btn-purple-soft:hover { background: rgba(123,97,255,0.20); color: #fff; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: transparent; color: var(--text-2); border: 1px solid var(--border-1);
  transition: all 200ms ease-out;
}
.icon-btn:hover { background: rgba(255,255,255,0.04); color: #fff; border-color: var(--border-2); }
.icon-btn.active { background: rgba(123,97,255,0.12); color: var(--purple-soft); border-color: var(--border-purple); }

/* ─── Badges / Chips ───────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; font-family: var(--font-mono);
  font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  border: 1px solid var(--border-1); background: rgba(10,10,18,0.6); color: var(--text-1);
}
.chip-purple { background: rgba(123,97,255,0.12); color: var(--purple-soft); border-color: var(--border-purple); }
.chip-gold { background: rgba(255,215,0,0.10); color: var(--gold); border-color: rgba(255,215,0,0.30); }
.chip-success { background: rgba(0,196,140,0.10); color: var(--success); border-color: rgba(0,196,140,0.30); }
.chip-warning { background: rgba(255,176,32,0.10); color: var(--warning); border-color: rgba(255,176,32,0.30); }
.chip-danger { background: rgba(255,59,92,0.10); color: var(--danger); border-color: rgba(255,59,92,0.30); }
.chip-blue { background: rgba(0,209,255,0.10); color: var(--blue); border-color: rgba(0,209,255,0.30); }
.chip-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: pulse 2s infinite; }

/* ─── HEADER ───────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; inset-inline: 0; height: 72px; z-index: 1000;
  background: rgba(5,5,8,0.78); backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-1);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.brand img { height: 28px; width: auto; }
.brand-wm {
  font-family: var(--font-body); font-weight: 800; font-size: 17px;
  letter-spacing: -0.01em; color: #fff; line-height: 1; white-space: nowrap;
}
.brand-wm em { font-style: normal; color: var(--purple-soft); font-weight: 900; }
.nav-mid { display: flex; gap: 4px; }
.nav-link {
  position: relative; font-size: 14px; font-weight: 600; color: var(--text-2);
  padding: 8px 14px; border-radius: 8px; transition: all 150ms ease-out;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.04); }
.nav-link.active { color: #fff; background: rgba(123,97,255,0.10); }
.nav-link.active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: -22px; height: 2px; background: var(--purple);
}
.nav-link .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-right .btn-ghost { height: 38px; padding: 0 14px; font-size: 13px; border: none; color: var(--text-1); }
.nav-right .btn-ghost:hover { background: transparent; color: #fff; }
.nav-right .btn-primary { height: 38px; padding: 0 16px; font-size: 13px; }

/* ─── HERO (cinematic) ─────────────────────────────────────────── */
.hero {
  position: relative; padding: 140px 0 96px; overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center;
}
.hero-headline-wrap { position: relative; }
.hero-pretitle {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(123,97,255,0.08); border: 1px solid var(--border-purple);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--purple-soft);
  margin-bottom: 24px;
}
.hero-pretitle .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); animation: pulse 2s infinite; }

.hero h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(3rem, 6.4vw, 5.6rem); line-height: 0.96;
  letter-spacing: -0.045em; text-transform: none;
}
.hero h1 .hl {
  background: linear-gradient(135deg, #C7B3FF 0%, #7B61FF 50%, #5D3FD3 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  position: relative;
}
.hero h1 .strikeword {
  position: relative; display: inline-block; color: var(--text-3);
}
.hero h1 .strikeword::after {
  content: ''; position: absolute; left: -2%; right: -2%; top: 52%; height: 5px;
  background: linear-gradient(90deg, transparent, var(--danger) 20%, var(--danger) 80%, transparent);
  border-radius: 3px;
  animation: strikeIn 800ms cubic-bezier(0.16, 1, 0.3, 1) 600ms both;
  transform-origin: left;
}
@keyframes strikeIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hero-sub {
  font-family: 'Inter', sans-serif; font-size: 18px; line-height: 1.6;
  color: var(--text-2); max-width: 540px; margin-top: 24px;
}
.hero-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; align-items: center; }
.hero-actions .btn-lg { height: 56px; }

.hero-trust {
  margin-top: 24px; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.hero-trust .live { display: inline-flex; align-items: center; gap: 8px; color: var(--success); font-weight: 700; }
.hero-trust .live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; box-shadow: 0 0 8px rgba(0,196,140,0.8); }

.hero-metrics-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border-1); border: 1px solid var(--border-1);
  border-radius: 14px; overflow: hidden; margin-top: 48px;
}
.hero-metric-cell { padding: 20px 18px; background: rgba(10,10,18,0.65); backdrop-filter: blur(8px); }
.hero-metric-cell .n {
  font-family: var(--font-mono); font-weight: 900; font-size: 26px;
  letter-spacing: -0.02em; color: #fff; line-height: 1;
  display: flex; align-items: baseline; gap: 6px;
}
.hero-metric-cell .n .up { font-size: 11px; color: var(--success); font-weight: 700; }
.hero-metric-cell .n.purple { color: var(--purple-soft); }
.hero-metric-cell .n.gold { color: var(--gold); }
.hero-metric-cell .l {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-3); margin-top: 8px;
}
.hero-metric-cell .spark {
  margin-top: 10px; height: 22px; width: 100%; opacity: 0.7;
}

/* HERO VISUAL — kiosk + floating cards */
.hero-visual { position: relative; min-height: 600px; }
.hero-frame {
  position: absolute; inset: 0; border-radius: 28px; overflow: hidden;
  border: 1px solid var(--border-purple);
  box-shadow: 0 60px 120px rgba(0,0,0,0.6), 0 0 80px rgba(123,97,255,0.18), inset 0 1px 0 rgba(255,255,255,0.06);
  background: linear-gradient(180deg, #141424, #0A0A12);
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; }
.hero-frame::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(123,97,255,0.18), transparent 60%),
    linear-gradient(180deg, transparent 40%, rgba(5,5,8,0.7) 100%);
}
.hero-frame .scan {
  position: absolute; left: 0; right: 0; height: 80px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(123,97,255,0.25), transparent);
  animation: scanLine 5s linear infinite;
}
@keyframes scanLine {
  0% { top: -10%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 110%; opacity: 0; }
}
.hero-floats { position: absolute; inset: 0; pointer-events: none; }
.hero-float-card {
  position: absolute; pointer-events: auto;
  background: rgba(10,10,18,0.85); backdrop-filter: blur(16px);
  border: 1px solid var(--border-purple); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  padding: 14px 16px; min-width: 230px;
  animation: floatIn 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 250ms ease-out;
}
.hero-float-card:hover { transform: translateY(-3px) scale(1.02); }
@keyframes floatIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.hero-float-card .head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hero-float-card .av {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px;
}
.hero-float-card .name { font-size: 13px; font-weight: 800; color: #fff; line-height: 1.2; }
.hero-float-card .role { font-size: 11px; color: var(--text-2); margin-top: 1px; }
.hero-float-card .score-line {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 8px; border-top: 1px solid var(--border-1);
}
.hero-float-card .score-line .n { font-family: var(--font-mono); font-weight: 900; font-size: 22px; color: var(--success); letter-spacing: -0.02em; }
.hero-float-card .score-line .l { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); }

.hero-float-card.tl { top: 24px; left: 24px; }
.hero-float-card.br { bottom: 24px; right: 24px; animation-delay: 200ms; }
.hero-float-card.mid {
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  animation-delay: 400ms; min-width: 260px;
}

/* Hexis hint pill (small) */
.hexis-hint {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(0,196,140,0.12); border: 1px solid rgba(0,196,140,0.30);
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--success);
}
.hexis-hint::before { content: '⟡'; font-size: 12px; }

/* ─── Section frame ─────────────────────────── */
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px;
  margin-bottom: 48px; flex-wrap: wrap;
}
.section-head .left { max-width: 720px; }
.section-head h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
.section-head .right { display: flex; align-items: center; gap: 8px; }

/* ─── KPI hover spark ─────────────────────────── */
.spark-line { width: 100%; height: 24px; }

/* ─── Generic card ─────────────────────────── */
.card {
  background: var(--surface-2); border: 1px solid var(--border-1);
  border-radius: 16px; padding: 28px; transition: 250ms ease-out;
}
.card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.card-purple { border-color: var(--border-purple); background: linear-gradient(180deg, var(--surface-3), var(--surface-2)); }

/* ─── PAGES — switching ─────────────────────────── */
.page { display: none; min-height: 100vh; padding-top: 72px; }
.page.active { display: block; animation: fadeUp 400ms ease-out; }

/* ─── Footer ─────────────────────────── */
.footer { border-top: 1px solid var(--border-1); background: var(--surface-1); padding: 80px 0 32px; margin-top: 64px; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 48px; }
.footer-brand .brand { margin-bottom: 20px; }
.footer-desc { font-size: 13px; color: var(--text-2); line-height: 1.65; max-width: 300px; margin-bottom: 20px; }
.footer-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(0,196,140,0.10); border: 1px solid rgba(0,196,140,0.30);
  color: var(--success); font-family: var(--font-mono); font-size: 10px;
  font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
}
.footer-cta::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
.footer-social { display: flex; gap: 8px; margin-top: 20px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 9px;
  border: 1px solid var(--border-1); display: flex; align-items: center;
  justify-content: center; color: var(--text-2); transition: 200ms;
}
.footer-social a:hover { border-color: var(--border-purple); color: var(--purple-soft); background: rgba(123,97,255,0.06); }
.footer-col h5 { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
.footer-col a { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 10px; transition: color 150ms; }
.footer-col a:hover { color: #fff; }
.footer-bottom { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--border-1); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }
.footer-bottom .copy { color: var(--text-3); }
.footer-bottom .compliance { display: flex; gap: 24px; }
.footer-bottom .compliance span { color: var(--text-2); }
.footer-bottom .compliance .ok { color: var(--success); }

/* ─── Responsive ─────────────────────────── */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { min-height: 480px; }
  .nav-mid { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
