/* Samma palett som Atlas in-game UI */
:root {
  --bg: #0e0f11;
  --bg-1: #121418;
  --bg-2: #171a1f;
  --bg-3: #1e2229;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #eef0f4;
  --muted: #9097a4;
  --dim: #585f6c;
  --accent: #7aadff;
  --accent-12: rgba(122, 173, 255, 0.12);
  --accent-25: rgba(122, 173, 255, 0.25);
  --accent-40: rgba(122, 173, 255, 0.4);
  --display: "Saira", "Segoe UI", sans-serif;
  --font: "Saira", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
::selection { background: var(--accent-40); }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 26px;
  font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
  border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn-sm { height: 38px; padding: 0 16px; font-size: 13px; }
.btn-primary { background: var(--accent); color: #0b1220; box-shadow: 0 0 0 0 var(--accent-40); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -6px var(--accent-40); }
.btn-ghost { background: rgba(255,255,255,.04); border-color: var(--line-strong); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--accent-40); background: var(--accent-12); transform: translateY(-2px); }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.scrolled, .nav.open { background: rgba(14,15,17,.82); backdrop-filter: blur(14px); border-color: var(--line); }
.nav-inner { display: flex; align-items: center; height: 72px; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .08em; }
.brand b { color: var(--accent); font-weight: 700; }
.nav-links { display: flex; gap: 28px; margin-right: auto; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--muted); transition: color .2s; position: relative; }
.nav-links a:hover { color: var(--text); }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .25s; }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.burger { display: none; width: 40px; height: 38px; border: 1px solid var(--line-strong); background: none; border-radius: 8px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.burger span { width: 18px; height: 2px; background: var(--text); transition: transform .25s; }
.nav.open .burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav.open .burger span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero-bg, .hero-shade { position: absolute; inset: 0; }
.slide { position: absolute; inset: -4%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.6s ease; animation: kenburns 14s linear infinite alternate; }
.slide.on { opacity: 1; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08) translateX(-1.5%); } }
.hero-shade {
  background:
    linear-gradient(90deg, rgba(14,15,17,.92) 0%, rgba(14,15,17,.55) 55%, rgba(14,15,17,.25) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%),
    radial-gradient(ellipse at 20% 60%, rgba(122,173,255,.12), transparent 60%);
}
.hero-content { position: relative; padding-top: 72px; }
.status-pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 99px; background: rgba(255,255,255,.05); border: 1px solid var(--line-strong); font-size: 13px; color: var(--muted); backdrop-filter: blur(8px); margin-bottom: 28px; }
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.status-pill.online i { background: #4ade80; box-shadow: 0 0 10px #4ade80; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.eyebrow { margin: 0 0 8px; font-family: var(--display); font-size: clamp(18px, 2.4vw, 26px); font-weight: 500; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.hero-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(42px, 7.5vw, 96px); line-height: 1; letter-spacing: -.01em; text-transform: uppercase; color: var(--accent); text-shadow: 0 0 40px rgba(122,173,255,.35); min-height: 1em; }
.caret { color: var(--text); font-weight: 400; animation: blink 1s steps(1) infinite; margin-left: 4px; }
@keyframes blink { 50% { opacity: 0; } }
.hero-sub { max-width: 560px; margin: 28px 0 36px; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; color: #c3c8d2; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-ctas.center { justify-content: center; }
.hero-place { position: absolute; bottom: 32px; left: 0; right: 0; text-align: right; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.hero-place span::before { content: '◉ '; color: var(--accent); }
.scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid var(--line-strong); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Sections ---------- */
section { position: relative; }
.about, .features, .stats, .rules, .faq { padding: 120px 0; }
.section-kicker { margin: 0 0 24px; font-family: var(--display); font-size: 14px; letter-spacing: .25em; text-transform: uppercase; color: var(--accent); }
.section-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(32px, 5vw, 58px); line-height: 1.05; text-transform: uppercase; }
.section-desc { max-width: 620px; margin: 18px 0 56px; font-size: 17px; line-height: 1.6; color: var(--muted); }

.narrative { margin: 0; font-family: var(--display); font-size: clamp(26px, 4vw, 50px); font-weight: 600; line-height: 1.25; }
.narrative .w { color: #2a2f38; transition: color .4s; }
.narrative .w.lit { color: var(--text); }
.narrative .w.acc.lit { color: var(--accent); }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { position: relative; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--line); min-height: 380px; display: flex; flex-direction: column; justify-content: flex-end; transition: transform .35s, border-color .35s, opacity .7s, translate .7s; }
.card:hover { transform: translateY(-6px); border-color: var(--accent-40); }
.card-img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .55; transition: transform .8s, opacity .4s; }
.card:hover .card-img { transform: scale(1.06); opacity: .7; }
.card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, var(--card) 18%, color-mix(in srgb, var(--card) 40%, transparent) 60%, transparent); }
.card-body { position: relative; z-index: 1; padding: 26px; }
.card-num { font-family: var(--display); font-size: 13px; letter-spacing: .2em; color: var(--accent); }
.card h3 { margin: 8px 0 8px; font-family: var(--display); font-size: 24px; text-transform: uppercase; }
.card p { margin: 0; font-size: 15px; line-height: 1.55; color: #c3c8d2; }

/* ---------- Stats ---------- */
.stats { background: linear-gradient(180deg, var(--bg), var(--bg-1) 50%, var(--bg)); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { padding: 32px 26px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); position: relative; overflow: hidden; }
.stat::before { content: ''; position: absolute; top: 0; left: 26px; width: 40px; height: 3px; background: var(--accent); border-radius: 0 0 3px 3px; box-shadow: 0 0 14px var(--accent); }
.stat-val { font-family: var(--display); font-size: clamp(38px, 4.5vw, 56px); font-weight: 700; color: var(--text); }
.stat-label { margin-top: 6px; color: var(--muted); font-size: 15px; }

/* ---------- Rules ---------- */
.rule-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rule { display: flex; gap: 18px; padding: 24px; border-radius: 14px; background: var(--bg-1); border: 1px solid var(--line); transition: border-color .3s, opacity .7s, translate .7s; }
.rule:hover { border-color: var(--accent-25); }
.rule-num { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-12); color: var(--accent); font-family: var(--display); font-weight: 700; }
.rule h4 { margin: 2px 0 6px; font-size: 17px; }
.rule p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 15px; }

/* ---------- Story CTA ---------- */
.story { padding: 140px 0; overflow: hidden; text-align: center; }
.story-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .35; }
.story::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, var(--bg), rgba(14,15,17,.55) 40%, rgba(14,15,17,.55) 60%, var(--bg)); }
.story-inner { position: relative; z-index: 2; }
.story .section-desc { margin: 18px auto 36px; }
.story .section-title .accent { display: block; }

/* ---------- FAQ ---------- */
.faq .section-title { margin-bottom: 48px; }
.faq-list { display: grid; gap: 12px; }
.faq-item { border-radius: 14px; background: var(--bg-1); border: 1px solid var(--line); transition: border-color .3s, opacity .7s, translate .7s; }
.faq-item[open] { border-color: var(--accent-25); }
.faq-item summary { list-style: none; cursor: pointer; padding: 22px 24px; font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.plus { position: relative; flex: none; width: 14px; height: 14px; }
.plus::before, .plus::after { content: ''; position: absolute; top: 6px; left: 0; width: 14px; height: 2px; background: var(--accent); transition: transform .3s; }
.plus::after { transform: rotate(90deg); }
.faq-item[open] .plus::after { transform: rotate(0); }
.faq-item p { margin: 0; padding: 0 24px 22px; color: var(--muted); line-height: 1.65; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 0 32px; background: var(--bg-1); }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-inner p { max-width: 380px; margin-top: 14px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.footer-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--accent); }
.credits { margin-top: 32px; line-height: 1.6; font-size: 11px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 100; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 14px 22px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--accent-25); box-shadow: 0 20px 40px -10px #000; font-size: 15px; transition: opacity .3s, transform .3s; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; translate: 0 30px; transition: opacity .7s ease, translate .7s ease, transform .35s, border-color .35s; }
.reveal.in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; translate: 0 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 16px 16px; background: rgba(14,15,17,.96); border-bottom: 1px solid var(--line); }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .nav-inner { gap: 12px; }
  .brand { margin-right: auto; }
  .nav-cta .btn-ghost { display: none; }
  .burger { display: flex; }
  .cards, .rule-grid { grid-template-columns: 1fr; }
  .card { min-height: 320px; }
  .stat-grid { gap: 12px; }
  .stat { padding: 24px 18px; }
  .about, .features, .stats, .rules, .faq { padding: 80px 0; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .hero-place { display: none; }
}

/* ---------- Loggor ---------- */
.brand-logo { height: 34px; width: auto; }
.footer .brand-logo { height: 30px; opacity: .9; }
.hero-logo { width: clamp(220px, 30vw, 380px); height: auto; margin-bottom: 26px; filter: drop-shadow(0 6px 30px rgba(0,0,0,.6)); }

/* ---------- Hero-video ---------- */
.hero-video { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity .9s ease; pointer-events: none; }
.hero-video.ready { transition: opacity 1.8s ease; }
.hero-video.ready { opacity: 1; }
.hero-video iframe, .hero-video video {
  position: absolute; top: 50%; left: 50%;
  width: 100vw; height: 56.25vw; min-height: 100%; min-width: 177.78vh;
  transform: translate(-50%, -50%) scale(1.42); border: 0; object-fit: cover;
}
.sound-btn {
  position: absolute; z-index: 3; right: 24px; bottom: 74px;
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 34px;
  border-radius: 99px; border: 1px solid var(--line-strong); background: rgba(14,15,17,.5); backdrop-filter: blur(8px);
  color: var(--muted); font: 600 12px var(--font); letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
}
.sound-btn::before { content: ''; position: absolute; left: 13px; top: 50%; width: 12px; height: 12px; transform: translateY(-50%);
  background: currentColor; clip-path: polygon(0 35%, 30% 35%, 70% 0, 70% 100%, 30% 65%, 0 65%); }
.sound-btn.on { color: var(--accent); border-color: var(--accent-40); }

/* ---------- Cinematic intro ---------- */
body.intro-on { overflow: hidden; }
.intro { position: fixed; inset: 0; z-index: 200; background: rgba(5,6,7,.6); display: grid; place-items: center; overflow: hidden; transition: opacity 1.1s ease, visibility 1.1s; }
.intro.out { opacity: 0; visibility: hidden; }
.intro .bar { position: absolute; left: 0; right: 0; height: 12vh; background: #000; z-index: 3; transition: transform 1.1s cubic-bezier(.7,0,.2,1); }
.intro .bar.top { top: 0; } .intro .bar.bottom { bottom: 0; }
.intro.out .bar.top { transform: translateY(-100%); } .intro.out .bar.bottom { transform: translateY(100%); }
.intro-glow { position: absolute; width: 70vmin; height: 70vmin; border-radius: 50%; background: radial-gradient(circle, rgba(122,173,255,.28), transparent 65%); opacity: 0; }
.intro-stage { position: relative; display: grid; place-items: center; }
.intro-a { width: clamp(140px, 22vmin, 240px); opacity: 0; filter: blur(18px); }
.intro-word { position: absolute; width: clamp(260px, 46vmin, 520px); opacity: 0; }
.intro-tag { position: absolute; top: calc(100% + 18px); white-space: nowrap; margin: 0; font-family: var(--display); font-size: 14px; letter-spacing: .5em; text-transform: uppercase; color: var(--muted); opacity: 0; }
.intro-skip { position: absolute; z-index: 4; right: 24px; bottom: calc(12vh + 18px); background: none; border: 0; color: var(--dim); font: 600 12px var(--font); letter-spacing: .15em; text-transform: uppercase; cursor: pointer; }
.intro-skip:hover { color: var(--text); }
.intro.play .intro-glow { animation: glow 2.6s ease forwards; }
.intro.play .intro-a { animation: aIn 2.6s cubic-bezier(.2,.7,.2,1) forwards; }
.intro.play .intro-word { animation: wordIn 2.6s ease forwards; }
.intro.play .intro-tag { animation: tagIn 2.6s ease forwards; }
@keyframes glow { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } 55% { opacity: .5; transform: scale(1.1); } 100% { opacity: .8; transform: scale(1.3); } }
@keyframes aIn {
  0% { opacity: 0; transform: scale(1.8); filter: blur(18px); }
  25% { opacity: 1; transform: scale(1); filter: blur(0) drop-shadow(0 0 30px rgba(122,173,255,.7)); }
  45% { opacity: 1; transform: scale(1); filter: blur(0) drop-shadow(0 0 12px rgba(122,173,255,.4)); }
  58% { opacity: 0; transform: scale(.85); filter: blur(6px); }
  100% { opacity: 0; }
}
@keyframes wordIn {
  0%, 52% { opacity: 0; transform: translateY(14px) scale(.96); filter: blur(10px); }
  68% { opacity: 1; transform: none; filter: blur(0) drop-shadow(0 0 24px rgba(122,173,255,.35)); }
  100% { opacity: 1; transform: scale(1.04); }
}
@keyframes tagIn { 0%, 66% { opacity: 0; letter-spacing: .9em; } 82%, 100% { opacity: 1; letter-spacing: .5em; } }

@media (max-width: 760px) {
  .brand-logo { height: 28px; }
  .sound-btn { right: 16px; bottom: 24px; }
}

/* ---------- Typsnitt som loggan: Saira, smal + kursiv för rubriker ---------- */
.btn, .eyebrow, .hero-title, .section-kicker, .section-title, .narrative, .card h3, .card-num,
.stat-val, .rule-num, .intro-tag, .sound-btn, .intro-skip, .faq-item summary, .rule h4, .stat-label {
  font-family: var(--display); font-style: italic; font-stretch: 75%;
}
.hero-title, .section-title, .card h3, .stat-val { font-weight: 800; letter-spacing: 0; }
.narrative { font-weight: 700; }
.btn { font-weight: 700; font-size: 16px; letter-spacing: .08em; }
.btn-sm { font-size: 14px; }
.faq-item summary, .rule h4 { font-weight: 700; font-size: 19px; letter-spacing: .01em; }
.stat-label { font-size: 17px; }
.nav-links a { font-family: var(--display); font-style: italic; font-stretch: 75%; font-weight: 700; font-size: 16px; letter-spacing: .1em; text-transform: uppercase; }
body { font-stretch: 100%; }
@media (max-width: 760px) { .nav-play { display: none; } }

/* ---------- Utan bilder: video + grafik ---------- */
.hero { background: radial-gradient(ellipse at 30% 60%, rgba(122,173,255,.10), transparent 60%), #08090b; }
.hero-shade {
  background:
    linear-gradient(90deg, rgba(8,9,11,.82) 0%, rgba(8,9,11,.45) 50%, rgba(8,9,11,.15) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 30%),
    linear-gradient(180deg, rgba(8,9,11,.6) 0%, transparent 18%);
}
/* filmkorn + vinjett för cinematic känsla */
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%);
}
.hero-content, .sound-btn, .scroll-hint { z-index: 2; }

.card { min-height: 300px; justify-content: flex-end; background: linear-gradient(160deg, color-mix(in srgb, var(--card) 100%, #fff 6%), var(--bg-1)); }
.card::after { display: none; }
.card-icon { position: absolute; top: 26px; left: 26px; width: 46px; height: 46px; padding: 11px; border-radius: 12px; fill: var(--accent); background: var(--accent-12); border: 1px solid var(--accent-25); z-index: 1; }
.card::before { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(122,173,255,.16), transparent 70%); transition: transform .6s; }
.card:hover::before { transform: scale(1.3); }

.story-bg { background: radial-gradient(ellipse at 50% 50%, rgba(122,173,255,.16), transparent 60%); opacity: 1; }
.page-hero-bg { background: radial-gradient(ellipse at 25% 70%, rgba(122,173,255,.16), transparent 55%), radial-gradient(ellipse at 85% 20%, rgba(122,173,255,.08), transparent 50%); opacity: 1; }

/* Under introt syns bara videon bakom loggan; texten tonas in efteråt */
.hero-content, .nav, .sound-btn, .scroll-hint { transition: opacity 1s ease .3s; }
body.intro-on .hero-content, body.intro-on .nav, body.intro-on .sound-btn, body.intro-on .scroll-hint { opacity: 0; }

/* Kort med riktiga bilder */
.card { min-height: 400px; background: var(--bg-1); }
.card::before { display: none; }
.card-img { opacity: .9; }
.card:hover .card-img { opacity: 1; transform: scale(1.06); }
.card::after { display: block; background: linear-gradient(0deg, rgba(10,11,14,.98) 0%, rgba(10,11,14,.85) 30%, rgba(10,11,14,.15) 65%, rgba(10,11,14,.35) 100%); }
.card-icon { z-index: 2; background: rgba(10,11,14,.6); backdrop-filter: blur(6px); }
.card-body { z-index: 2; }
@media (max-width: 760px) { .card { min-height: 340px; } }
