/* ===== L2ALPHA — tema viking/nórdico ===== */

:root {
  --iron: #14140f;
  --hall: #1d1c17;
  --hall-2: #262420;
  --fjord: #3c5a63;
  --ember: #8a3324;
  --gold: #c9a15a;
  --gold-dim: #7f6a41;
  --bone: #ded2b8;
  --mist: #8b8878;
  --line: rgba(222, 210, 184, 0.12);
}

@media (prefers-color-scheme: light) {
  :root {
    --iron: #e9e2cf;
    --hall: #f5efdf;
    --hall-2: #ece3cc;
    --fjord: #35636e;
    --ember: #7a2c1f;
    --gold: #8a6221;
    --gold-dim: #a98a4f;
    --bone: #241f16;
    --mist: #5c5843;
    --line: rgba(36, 31, 22, 0.14);
  }
}
:root[data-theme="dark"] {
  --iron: #14140f; --hall: #1d1c17; --hall-2: #262420; --fjord: #3c5a63;
  --ember: #8a3324; --gold: #c9a15a; --gold-dim: #7f6a41; --bone: #ded2b8;
  --mist: #8b8878; --line: rgba(222, 210, 184, 0.12);
}
:root[data-theme="light"] {
  --iron: #e9e2cf; --hall: #f5efdf; --hall-2: #ece3cc; --fjord: #35636e;
  --ember: #7a2c1f; --gold: #8a6221; --gold-dim: #a98a4f; --bone: #241f16;
  --mist: #5c5843; --line: rgba(36, 31, 22, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--iron);
  color: var(--bone);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  line-height: 1.68;
}

h1, h2, h3, h4, .display {
  font-family: "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-wrap: balance;
  margin: 0;
}

.mono { font-family: Consolas, "SF Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.rune { font-family: "Segoe UI Historic", "Noto Sans Runic", serif; }

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }

.eyebrow {
  display: flex; align-items: center; gap: 0.8em;
  font-family: "Bahnschrift", sans-serif;
  font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
.eyebrow .rune { font-size: 1.05rem; color: var(--ember); }
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- HEADER ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(29, 28, 23, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.wordmark {
  font-family: "Bahnschrift", "Arial Narrow", sans-serif;
  font-weight: 800; letter-spacing: 0.04em; font-size: 1.3rem;
  color: var(--gold);
}
.wordmark span { color: var(--ember); }
nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
nav a {
  font-family: "Bahnschrift", sans-serif;
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mist); transition: color 0.2s ease;
}
nav a:hover { color: var(--gold); }
.header-actions { display: flex; gap: 10px; }

.btn {
  font-family: "Bahnschrift", "Arial Narrow", sans-serif;
  font-weight: 700; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 12px 24px;
  border: 1px solid var(--gold-dim);
  background: transparent; color: var(--bone);
  cursor: pointer; transition: border-color 0.25s ease, transform 0.2s ease;
}
.btn:hover { border-color: var(--gold); transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn-gold { background: var(--ember); border-color: var(--ember); color: var(--bone); }
.btn-gold:hover { filter: brightness(1.12); }
.btn-block { width: 100%; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #0c1418 0%, #16211f 38%, var(--iron) 78%);
}
.hero-video, .hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero-video-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(20,20,15,0.35) 0%, rgba(20,20,15,0.88) 100%);
}
.fjord-scene { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: 1; pointer-events: none; }
.fjord-scene svg { width: 100%; height: 100%; display: block; }

.hero-guard {
  position: absolute; bottom: 0; z-index: 2; pointer-events: none;
  height: min(78%, 620px); width: auto;
  opacity: 0.9;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,0.6));
}
.hero-guard-left { left: clamp(-40px, -2vw, 10px); }
.hero-guard-right { right: clamp(-40px, -2vw, 10px); transform: scaleX(-1); }
@media (max-width: 900px) { .hero-guard { display: none; } }

.ship-emblem-wrap {
  position: relative;
  z-index: 2;
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
  display: flex; justify-content: center; align-items: center;
  margin-bottom: 22px;
}
.viking-ship {
  width: clamp(150px, 21vw, 270px); height: auto; overflow: visible;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,0.55));
  animation: ship-bob 4.6s ease-in-out infinite;
  transform-box: fill-box; transform-origin: center;
}
.viking-ship-big { width: 100%; max-width: none; }
.ship-logo-overlay {
  position: absolute; top: 38%; left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(220px, 20vw, 460px); height: auto;
  margin: 0; pointer-events: none;
}

@keyframes ship-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(-1.2deg); }
}
.hero-content { position: relative; z-index: 3; padding-bottom: clamp(50px, 8vw, 90px); }

.brand-row { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(30px, 6vw, 60px); }
.brand-shield { width: 28px; height: 32px; flex: none; }
.brand-tagline { font-family: "Bahnschrift", sans-serif; font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--mist); }

.hero h1 {
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.88;
  color: var(--gold);
  text-shadow: 0 1px 0 rgba(255,255,255,0.15), 0 -2px 3px rgba(0,0,0,0.6), 0 6px 24px rgba(0,0,0,0.5);
  margin-bottom: 20px;
}
.hero h1 .flank { color: var(--ember); }

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

.wordmark-img { height: 46px; width: auto; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)); }
.wordmark-link { display: block; line-height: 0; }
.footer-wordmark { height: 40px; }

.hero-sub {
  max-width: 50ch; font-size: 1.1rem; color: var(--bone); opacity: 0.92;
  margin-bottom: 36px; font-family: Georgia, serif; text-transform: none; letter-spacing: normal;
}
.hero-sub strong { color: var(--gold); font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- STATUS BAR ---------- */
.status-bar { background: var(--hall); border-bottom: 1px solid var(--line); }
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.status-cell { padding: 24px clamp(18px, 3vw, 36px); border-right: 1px solid var(--line); }
.status-cell:last-child { border-right: none; }
.status-label { font-family: "Bahnschrift", sans-serif; font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mist); margin-bottom: 8px; }
.status-value { font-family: Consolas, monospace; font-size: 1.4rem; color: var(--gold); font-weight: 700; }
.status-value.online { color: #7bd88f; }
.status-value.online::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #7bd88f; margin-right: 8px; box-shadow: 0 0 8px #7bd88f; }

.rune-divider { display: flex; justify-content: center; gap: clamp(10px, 3vw, 26px); padding: 26px 0; color: var(--gold-dim); font-size: 1.1rem; opacity: 0.6; user-select: none; }

/* ---------- SECTIONS ---------- */
section { padding: clamp(64px, 10vw, 120px) 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { max-width: 64ch; margin-bottom: clamp(40px, 6vw, 60px); }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 0 0 16px; }
.section-head p { color: var(--mist); font-family: Georgia, serif; text-transform: none; letter-spacing: normal; font-size: 1.05rem; }

/* ---------- FEATURE GRID ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--hall); border: 1px solid var(--line);
  padding: 26px; transition: border-color 0.25s ease, transform 0.25s ease;
}
.feature-card:hover { border-color: var(--gold-dim); transform: translateY(-3px); }
.feature-icon { font-size: 1.5rem; margin-bottom: 14px; color: var(--ember); }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 10px; color: var(--gold); }
.feature-card p { color: var(--mist); font-size: 0.94rem; margin: 0; font-family: Georgia, serif; text-transform: none; letter-spacing: normal; }

/* ---------- RUNESTONE SYSTEM CARDS ---------- */
.systems-grid { display: grid; gap: 20px; }
.systems-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.systems-row-rev { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; }
@media (max-width: 760px) { .systems-row, .systems-row-rev { grid-template-columns: 1fr; } }
.system-card {
  background:
    repeating-linear-gradient(100deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 9px),
    var(--hall);
  border: 1px solid var(--line);
  padding: clamp(26px, 4vw, 38px);
  transition: border-color 0.3s ease;
}
.system-card:hover { border-color: var(--gold-dim); }
.system-card .tag { font-family: Consolas, monospace; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ember); margin-bottom: 10px; display: block; }
.system-card h3 { font-size: 1.3rem; margin-bottom: 10px; text-transform: none; letter-spacing: 0.01em; font-family: "Bahnschrift", sans-serif; }
.system-card p { color: var(--mist); margin: 0 0 14px; font-family: Georgia, serif; text-transform: none; letter-spacing: normal; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: Consolas, monospace; font-size: 0.72rem; padding: 5px 11px; border: 1px solid var(--line); color: var(--mist); }

.specs-card {
  background: var(--hall);
  border: 1px solid var(--gold-dim);
  padding: clamp(20px, 3vw, 28px);
  margin-bottom: 28px;
}
.specs-card .chip-row { justify-content: center; }
.specs-card .chip { color: var(--gold); border-color: var(--gold-dim); }

/* ---------- HEROES ---------- */
.hero-panel {
  background: var(--hall);
  border: 1px solid var(--gold-dim);
  padding: clamp(10px, 2vw, 16px);
}
.hero-list { display: flex; flex-direction: column; }
.hero-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.hero-row:last-child { border-bottom: none; }
.hero-name { font-family: "Bahnschrift", sans-serif; font-size: 1rem; color: var(--bone); letter-spacing: 0.02em; }
.hero-days { font-family: Consolas, monospace; font-size: 0.76rem; color: var(--gold); border: 1px solid var(--gold-dim); padding: 4px 10px; white-space: nowrap; }
.hero-status { color: var(--mist); font-family: Georgia, serif; text-transform: none; letter-spacing: normal; text-align: center; padding: 22px 12px; margin: 0; }

/* ---------- STEPS ---------- */
.steps-grid { display: grid; gap: 0; }
.step-card {
  display: grid; grid-template-columns: 90px 1fr auto; gap: 20px; align-items: center;
  padding: 24px 0; border-bottom: 1px solid var(--line);
}
.step-num { font-family: "Bahnschrift", sans-serif; font-size: 1.6rem; color: var(--gold-dim); }
.step-links { display: flex; gap: 10px; flex-wrap: wrap; }
.step-card h4 { font-size: 1rem; margin-bottom: 6px; }
.step-card p { color: var(--mist); font-size: 0.9rem; margin: 0; font-family: Georgia, serif; text-transform: none; letter-spacing: normal; }
@media (max-width: 640px) { .step-card { grid-template-columns: 50px 1fr; } .step-card .btn { grid-column: 1 / -1; margin-top: 10px; } }

/* ---------- TRIBUTE / PIX ---------- */
.tribute {
  background: radial-gradient(ellipse 60% 100% at 100% 0%, rgba(138,51,36,0.14), transparent), var(--hall-2);
  border: 1px solid var(--line);
  padding: clamp(28px, 4.5vw, 48px);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 4vw, 50px); align-items: center;
}
@media (max-width: 760px) { .tribute { grid-template-columns: 1fr; } }
.tribute h3 { font-size: 1.5rem; margin-bottom: 12px; color: var(--gold); text-transform: none; font-family: "Bahnschrift", sans-serif; }
.tribute p { color: var(--mist); margin: 0; font-family: Georgia, serif; text-transform: none; letter-spacing: normal; }
.pix-card { background: var(--iron); border: 1px solid var(--gold-dim); padding: 22px; }
.pix-key-row { display: flex; align-items: center; gap: 10px; border: 1px dashed var(--line); padding: 12px 14px; margin: 10px 0 12px; }
.pix-key-row code { flex: 1; font-family: Consolas, monospace; font-size: 0.84rem; color: var(--gold); word-break: break-all; }
.copy-btn { font-family: Consolas, monospace; font-size: 0.68rem; background: none; border: 1px solid var(--gold-dim); color: var(--bone); padding: 6px 11px; cursor: pointer; flex: none; }
.copy-btn:hover { border-color: var(--gold); color: var(--gold); }
.pix-note { font-size: 0.78rem; color: var(--mist); font-family: Georgia, serif; text-transform: none; letter-spacing: normal; }

/* ---------- FOOTER ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-social { display: flex; gap: 14px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--mist); font-size: 0.85rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.footer-social a:hover { border-color: var(--gold); color: var(--gold); }
.footer-legal { color: var(--mist); font-size: 0.8rem; margin: 0; font-family: Georgia, serif; text-transform: none; letter-spacing: normal; }

/* ---------- LOGIN / REGISTER MODAL ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,10,8,0.75); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--hall); border: 1px solid var(--gold-dim); padding: 32px; width: 100%; max-width: 360px; position: relative; }
.modal-box h2 { color: var(--gold); font-size: 1.3rem; margin-bottom: 18px; text-align: center; }
.modal-box label { display: block; font-family: "Bahnschrift", sans-serif; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mist); margin-bottom: 6px; }
.modal-box input { width: 100%; padding: 10px 12px; margin-bottom: 16px; background: var(--iron); border: 1px solid var(--line); color: var(--bone); font-family: Georgia, serif; }
.modal-box input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.modal-switch { text-align: center; font-family: Georgia, serif; font-size: 0.82rem; color: var(--mist); margin-top: 14px; }
.modal-switch a { color: var(--gold); }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--mist); font-size: 1.3rem; cursor: pointer; line-height: 1; }
.modal-note { font-family: Georgia, serif; font-size: 0.74rem; color: var(--mist); background: rgba(201,161,90,0.08); border: 1px dashed var(--gold-dim); padding: 8px 10px; margin-bottom: 14px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
