/* The Shattered Compass — marketing site
   Palette pulled from the game's own logo: deep night-navy + compass gold. */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Cinzel+Decorative:wght@700&display=swap');

:root {
  --bg: #0a0f1c;
  --bg-raised: #101827;
  --bg-card: #131e33;
  --border: #26344d;
  --border-soft: #1c2740;
  --gold: #f0c15a;
  --gold-bright: #ffd873;
  --gold-dim: #b6903c;
  --blue: #4d7fb8;
  --ink: #e9e6da;
  --ink-dim: #aeb4c4;
  --ink-faint: #78829a;
  --red: #c15a4d;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --radius: 10px;
  --maxw: 1120px;
  --font-head: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% -10%, rgba(77, 127, 184, 0.14), transparent 55%),
    radial-gradient(ellipse at 85% 0%, rgba(240, 193, 90, 0.08), transparent 45%);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--gold);
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.25rem; color: var(--ink); }
p { color: var(--ink-dim); margin: 0 0 1em; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(77, 127, 184, 0.12);
  border: 1px solid rgba(77, 127, 184, 0.35);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-dim));
  color: #241a08;
  box-shadow: 0 6px 18px rgba(240, 193, 90, 0.25);
}
.btn-primary:hover { color: #241a08; box-shadow: 0 10px 24px rgba(240, 193, 90, 0.35); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--gold-dim); color: var(--gold-bright); }

.btn-lg { padding: 16px 34px; font-size: 1.1rem; }

/* ---------- nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 28, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
  white-space: nowrap;
}
.brand img { width: 34px; height: 34px; border-radius: 6px; }
.brand:hover { color: var(--gold-bright); }
.brand small { display: block; font-size: 0.62rem; color: var(--ink-faint); font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--font-body); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--ink-dim);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links .btn { margin-left: 4px; }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #241a08; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink);
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px 24px;
    gap: 4px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 4px; border-bottom: 1px solid var(--border-soft); }
  .nav-links .btn { margin: 10px 0 0; justify-content: center; }
  .nav-toggle { display: block; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  filter: saturate(0.9) brightness(0.55);
  transform: scale(1.02);
}
.hero-bg::after { content: ''; }
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,15,28,0.55) 0%, rgba(10,15,28,0.75) 55%, var(--bg) 100%);
}
.hero-inner {
  position: relative;
  padding: 96px 24px 110px;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}
.hero-inner p.lede {
  font-size: 1.15rem;
  color: var(--ink);
  max-width: 620px;
  margin: 0 auto 34px;
}
.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.hero-note {
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ---------- sections ---------- */
section { padding: 72px 0; }
section.tight { padding: 48px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head p { margin: 0; }

.alt { background: var(--bg-raised); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }

/* ---------- cards / grids ---------- */
.grid {
  display: grid;
  gap: 22px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.card h3 { margin-bottom: 8px; }
.card .tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 10px;
}

/* ---------- screenshot gallery ---------- */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 760px) { .shot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .shot-grid { grid-template-columns: 1fr; } }

.shot {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: zoom-in;
  background: #000;
  aspect-ratio: 4 / 3;
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.shot:hover img { transform: scale(1.05); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 8, 15, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1000px, 92vw); max-height: 86vh; border-radius: 8px; border: 1px solid var(--border); }
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  background: none; border: none; color: var(--ink); font-size: 2rem; cursor: pointer; line-height: 1;
}

/* ---------- class / region pills ---------- */
.pill {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--ink-faint);
  margin: 0 6px 6px 0;
}

/* ---------- lists ---------- */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  padding: 10px 0 10px 30px;
  position: relative;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--border-soft);
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0 32px;
  background: var(--bg-raised);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-dim); font-size: 0.9rem; }
.footer-fine { color: var(--ink-faint); font-size: 0.82rem; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--ink-faint); font-size: 0.85rem; }
.footer-brand img { width: 22px; height: 22px; border-radius: 4px; }

/* ---------- misc page bits ---------- */
.page-hero {
  padding: 64px 0 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-soft);
}
.page-hero p { max-width: 640px; margin: 0 auto; }

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.badge-alpha {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid rgba(193, 90, 77, 0.4);
  background: rgba(193, 90, 77, 0.1);
  padding: 4px 10px;
  border-radius: 999px;
}

.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold-dim);
  border-radius: 8px;
  padding: 20px 22px;
  color: var(--ink-dim);
  font-size: 0.95rem;
}
.callout strong { color: var(--ink); }

form.bug-form { display: grid; gap: 16px; max-width: 560px; }
form.bug-form label { font-size: 0.85rem; color: var(--ink-dim); display: block; margin-bottom: 6px; }
form.bug-form input, form.bug-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
form.bug-form textarea { min-height: 140px; resize: vertical; }
form.bug-form input:focus, form.bug-form textarea:focus { outline: none; border-color: var(--gold-dim); }

/* ---------- auth (login / create account) ---------- */
.auth-card { max-width: 420px; margin: 0 auto; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.auth-tabs button {
  flex: 1;
  padding: 11px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink-dim);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.auth-tabs button.active { color: var(--gold); border-color: var(--gold-dim); }
.auth-card form.auth-form { display: none; }
.auth-card form.auth-form.active { display: grid; gap: 16px; }
.auth-form .field-error { color: var(--red); font-size: 0.85rem; min-height: 1.2em; margin: -8px 0 0; }
.auth-form .field-success { color: var(--gold); font-size: 0.85rem; min-height: 1.2em; margin: -8px 0 0; }
.auth-form button[type="submit"] { justify-self: start; }
.auth-form button[type="submit"][disabled] { opacity: 0.6; cursor: default; transform: none; }

/* ---------- generic modal (Release Notes) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(5, 8, 15, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 30px 34px;
  position: relative;
}
.modal-card h2 { margin-top: 0; }
.modal-close {
  position: absolute;
  top: 14px; right: 18px;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--gold-bright); }
.note-entry { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border-soft); }
.note-entry:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.note-entry .note-version { font-family: var(--font-head); font-weight: 700; color: var(--gold); }
.note-entry .note-date { color: var(--ink-faint); font-size: 0.8rem; margin-left: 8px; }
.note-entry ul { margin: 8px 0 0; padding-left: 20px; }
.note-entry li { color: var(--ink-dim); margin-bottom: 4px; }
.modal-loading, .modal-error { color: var(--ink-faint); }
