/* ============ Atlas Neo — concept bank UI ============ */
:root {
  --bg: #070b14;
  --bg-2: #0d1424;
  --panel: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef1f7;
  --muted: #8d97ad;
  --gold: #f2b544;
  --orange: #f2643a;
  --blue: #2f5bff;
  --teal: #20c9a5;
  --grad: linear-gradient(120deg, var(--orange), var(--gold));
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Space Grotesk", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

/* zellige star pattern overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1'%3E%3Crect x='22' y='22' width='36' height='36'/%3E%3Crect x='22' y='22' width='36' height='36' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='8'/%3E%3C/g%3E%3C/svg%3E");
}

.container { width: min(1200px, 92vw); margin-inline: auto; position: relative; z-index: 2; }

/* ============ Nav ============ */
.nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, 94vw);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 12px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 11, 20, 0.55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: top 0.4s var(--ease), background 0.4s;
}
.nav.scrolled { top: 10px; background: rgba(7, 11, 20, 0.82); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.02em; font-size: 1.1rem; }
.logo-mark {
  width: 30px; height: 30px;
  background: var(--grad);
  clip-path: polygon(50% 0, 63% 25%, 93% 15%, 80% 42%, 100% 60%, 72% 68%, 70% 98%, 50% 80%, 30% 98%, 28% 68%, 0 60%, 20% 42%, 7% 15%, 37% 25%);
  animation: spin 14s linear infinite;
}
.logo span b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

.nav-links { display: flex; gap: 6px; list-style: none; }
.nav-links a {
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.93rem;
  transition: color 0.3s, background 0.3s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.burger { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); position: relative; }
.burger span, .burger::before, .burger::after {
  content: ""; position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform 0.4s var(--ease), opacity 0.3s;
}
.burger::before { top: 14px; } .burger span { top: 20px; } .burger::after { top: 26px; }
.nav.open .burger::before { transform: translateY(6px) rotate(45deg); }
.nav.open .burger span { opacity: 0; }
.nav.open .burger::after { transform: translateY(-6px) rotate(-45deg); }

/* ============ Buttons ============ */
.btn {
  --x: 50%; --y: 50%;
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.btn-primary { background: var(--grad); color: #1a0d03; box-shadow: 0 10px 40px -10px rgba(242, 100, 58, 0.6); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120px circle at var(--x) var(--y), rgba(255, 255, 255, 0.55), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.btn-primary:hover::after { opacity: 1; }
.btn-ghost { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
}
.hero canvas.webgl, canvas.webgl.bg {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1;
}
canvas.webgl.fixed { position: fixed; z-index: 0; }
.hero-content { position: relative; z-index: 3; max-width: 620px; pointer-events: none; }
.hero-content > * { pointer-events: auto; }
.hero-glow {
  position: absolute; z-index: 0; width: 60vw; height: 60vw; right: -15vw; top: 10vh; border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 100, 58, 0.22), transparent 60%);
  filter: blur(40px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

h1, h2, h3 { line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; }
h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); margin: 22px 0; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); margin-bottom: 18px; }
h3 { font-size: 1.35rem; letter-spacing: -0.01em; margin-bottom: 8px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 520px; }
.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

/* split text animation */
.split .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; }
.split .word > span { display: inline-block; transform: translateY(110%); transition: transform 1s var(--ease); }
.split.in .word > span { transform: none; }

.scroll-hint {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 3;
  width: 26px; height: 42px; border: 2px solid var(--line); border-radius: 20px;
}
.scroll-hint::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--gold); animation: scrolly 1.8s infinite;
}
@keyframes scrolly { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* page hero (subpages) */
.page-hero { min-height: 78vh; }
.page-hero .hero-content { max-width: 680px; }

/* ============ Sections ============ */
section { position: relative; padding: 120px 0; }
.section-head { max-width: 680px; margin-bottom: 60px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.tag { color: var(--gold); font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; margin-bottom: 14px; display: block; }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  padding: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease), border-color 0.4s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(242, 181, 68, 0.14), transparent 45%);
  opacity: 0; transition: opacity 0.4s;
}
.card:hover { border-color: rgba(242, 181, 68, 0.35); }
.card:hover::before { opacity: 1; }
.card p { color: var(--muted); }
.icon {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 22px;
  background: rgba(242, 181, 68, 0.1); border: 1px solid rgba(242, 181, 68, 0.25); color: var(--gold);
  transform: translateZ(30px);
}
.icon svg { width: 26px; height: 26px; }

/* stats */
.stats { border-block: 1px solid var(--line); background: rgba(255, 255, 255, 0.015); padding: 70px 0; }
.stat b { display: block; font-size: clamp(2.4rem, 4vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em; }
.stat span { color: var(--muted); }

/* marquee */
.marquee { overflow: hidden; padding: 34px 0; border-block: 1px solid var(--line); position: relative; z-index: 2; }
.marquee-track { display: flex; gap: 60px; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track span { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.25); white-space: nowrap; }
.marquee-track span:nth-child(even) { color: var(--gold); -webkit-text-stroke: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* split layout */
.split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.viz { position: relative; aspect-ratio: 1; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: radial-gradient(circle at 50% 40%, rgba(47, 91, 255, 0.15), transparent 70%); }
.viz canvas { width: 100%; height: 100%; display: block; }
.check-list { list-style: none; display: grid; gap: 14px; margin: 26px 0 34px; }
.check-list li { display: flex; gap: 12px; color: var(--muted); }
.check-list li::before { content: "✦"; color: var(--gold); }

/* CTA */
.cta {
  text-align: center;
  padding: 90px 40px;
  border-radius: 34px;
  border: 1px solid var(--line);
  background:
    radial-gradient(600px circle at 20% 0%, rgba(242, 100, 58, 0.25), transparent 60%),
    radial-gradient(600px circle at 80% 100%, rgba(47, 91, 255, 0.25), transparent 60%),
    var(--bg-2);
  overflow: hidden;
}
.cta p { color: var(--muted); max-width: 520px; margin: 0 auto 34px; }

/* ============ Cards page ============ */
.configurator { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; min-height: 100vh; padding: 130px 0 60px; }
.config-stage { position: relative; height: min(70vh, 620px); }
.config-stage canvas { width: 100%; height: 100%; cursor: grab; display: block; }
.config-stage canvas:active { cursor: grabbing; }
.stage-hint { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.swatches { display: flex; gap: 12px; margin: 26px 0; }
.swatch {
  width: 52px; height: 52px; border-radius: 50%; border: 2px solid transparent; outline: 1px solid var(--line); outline-offset: 4px;
  transition: transform 0.3s var(--ease), outline-color 0.3s;
}
.swatch:hover { transform: scale(1.08); }
.swatch.active { outline-color: var(--gold); }
.card-info h2 { transition: opacity 0.3s; }
.card-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 30px; }
.card-meta div { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.card-meta small { color: var(--muted); display: block; font-size: 0.78rem; }
.card-meta b { font-size: 1.15rem; }
.fade-swap { animation: fadeSwap 0.6s var(--ease); }
@keyframes fadeSwap { from { opacity: 0; transform: translateY(12px); } }

.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { text-align: left; padding: 18px 16px; border-bottom: 1px solid var(--line); }
.compare th { color: var(--muted); font-weight: 500; font-size: 0.9rem; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.compare .yes { color: var(--teal); } .compare .no { color: #4a5266; }

/* ============ Invest page ============ */
.calc { display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px; }
.field { margin-bottom: 26px; }
.field label { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--muted); }
.field label b { color: var(--text); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 6px rgba(242, 181, 68, 0.2); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--gold); cursor: pointer; }
.result b { font-size: clamp(1.6rem, 2.6vw, 2.4rem); display: block; white-space: nowrap; letter-spacing: -0.03em; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 260px; margin-top: 20px; }
.bar { flex: 1; border-radius: 8px 8px 3px 3px; background: linear-gradient(to top, rgba(47, 91, 255, 0.5), var(--blue)); position: relative; transition: height 0.8s var(--ease); min-height: 4px; }
.bar i { position: absolute; inset: auto 0 0 0; border-radius: inherit; background: var(--grad); transition: height 0.8s var(--ease); }
.legend { display: flex; gap: 20px; margin-top: 16px; color: var(--muted); font-size: 0.85rem; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; background: var(--blue); }
.legend span:last-child::before { background: var(--gold); }
.disclaimer-note { color: var(--muted); font-size: 0.8rem; margin-top: 18px; opacity: 0.7; }

/* ============ About page ============ */
.timeline { position: relative; display: grid; gap: 40px; padding-left: 40px; }
.timeline::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--gold), transparent); }
.timeline .step { position: relative; }
.timeline .step::before { content: ""; position: absolute; left: -36px; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--gold); box-shadow: 0 0 20px rgba(242, 181, 68, 0.5); }
.timeline small { color: var(--gold); font-weight: 600; letter-spacing: 0.1em; }
.timeline p { color: var(--muted); max-width: 560px; }

/* ============ Contact ============ */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 50px; min-height: 100vh; align-items: center; padding: 140px 0 80px; }
.form { padding: 40px; border-radius: 28px; border: 1px solid var(--line); background: rgba(13, 20, 36, 0.7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.float { position: relative; margin-bottom: 20px; }
.float input, .float textarea, .float select {
  width: 100%; padding: 22px 18px 10px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03); color: var(--text); font: inherit; outline: none; transition: border-color 0.3s, background 0.3s;
}
.float select { padding: 22px 14px 10px; appearance: none; }
.float select option { background: var(--bg-2); }
.float textarea { min-height: 130px; resize: vertical; }
.float label { position: absolute; left: 19px; top: 16px; color: var(--muted); pointer-events: none; transition: all 0.25s var(--ease); }
.float input:focus, .float textarea:focus, .float select:focus { border-color: var(--gold); background: rgba(242, 181, 68, 0.04); }
.float input:focus + label, .float input:not(:placeholder-shown) + label,
.float textarea:focus + label, .float textarea:not(:placeholder-shown) + label,
.float select + label { top: 7px; font-size: 0.72rem; color: var(--gold); }
.contact-items { display: grid; gap: 16px; margin-top: 34px; }
.contact-items div { display: flex; gap: 14px; align-items: center; color: var(--muted); }
.contact-items .icon { margin: 0; width: 46px; height: 46px; transform: none; }

.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translate(-50%, 120px); z-index: 100;
  padding: 16px 24px; border-radius: 16px; background: var(--bg-2); border: 1px solid rgba(32, 201, 165, 0.4);
  box-shadow: 0 20px 60px -20px rgba(32, 201, 165, 0.5); transition: transform 0.6s var(--ease);
}
.toast.show { transform: translate(-50%, 0); }

/* ============ Footer ============ */
footer { position: relative; z-index: 2; border-top: 1px solid var(--line); padding: 70px 0 34px; margin-top: 60px; background: rgba(7, 11, 20, 0.6); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 50px; }
.footer-grid h4 { font-size: 0.9rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; display: grid; gap: 8px; }
.footer-grid a, .footer-grid p { color: var(--muted); font-size: 0.92rem; transition: color 0.3s; }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 0.82rem; padding-top: 24px; border-top: 1px solid var(--line); }

/* ============ Reveal / FX ============ */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

.cursor {
  position: fixed; top: 0; left: 0; z-index: 200; pointer-events: none;
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 1px solid rgba(242, 181, 68, 0.7);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease), background 0.3s;
  mix-blend-mode: difference;
}
.cursor.hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(242, 181, 68, 0.15); }
.cursor-dot { position: fixed; top: 0; left: 0; z-index: 201; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--gold); pointer-events: none; }

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad); z-index: 60; }

/* page transition curtain */
.curtain { position: fixed; inset: 0; z-index: 300; pointer-events: none; display: grid; grid-template-columns: repeat(5, 1fr); }
.curtain span { background: var(--bg-2); transform: scaleY(1); transform-origin: top; transition: transform 0.7s var(--ease); border-right: 1px solid var(--line); }
.curtain span:nth-child(2) { transition-delay: 0.05s; } .curtain span:nth-child(3) { transition-delay: 0.1s; }
.curtain span:nth-child(4) { transition-delay: 0.15s; } .curtain span:nth-child(5) { transition-delay: 0.2s; }
.loaded .curtain span { transform: scaleY(0); }
.leaving .curtain span { transform: scaleY(1); transform-origin: bottom; }

@media (hover: none) { .cursor, .cursor-dot { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  .reveal, .split .word > span { opacity: 1; transform: none; }
}

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split-layout, .configurator, .calc, .contact-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .config-stage { height: 52vh; }
}
@media (max-width: 760px) {
  .nav-links {
    position: fixed; top: 76px; left: 0; right: 0; flex-direction: column; padding: 14px;
    border-radius: 24px; border: 1px solid var(--line); background: rgba(7, 11, 20, 0.95);
    opacity: 0; pointer-events: none; transform: translateY(-10px); transition: all 0.4s var(--ease);
  }
  .nav.open .nav-links { opacity: 1; pointer-events: auto; transform: none; }
  .nav-links a { display: block; padding: 14px 18px; font-size: 1.05rem; }
  .burger { display: block; }
  .nav-cta .btn { display: none; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  section { padding: 80px 0; }
  .card-meta { grid-template-columns: 1fr 1fr 1fr; }
  .form { padding: 26px; }
  .compare { font-size: 0.85rem; }
  .compare th, .compare td { padding: 12px 6px; }
}
