/* ==========================================================================
   Crowns Edge — marketing site
   Palette pulled from the game's own HUD: near-black backgrounds, crown
   gold accents, the purple of the Balance of Power bar, the crimson of
   crime/threat states. Fonts (Cinzel + Inter) match the fonts already
   shipped in assets/fonts for the game itself.
   ========================================================================== */

:root {
  --bg: #0b0b12;
  --bg-alt: #111119;
  --bg-elevated: #16161f;
  --panel: #1a1a25;
  --panel-border: #2a2a38;
  --line: #26262f;

  --gold: #c9a35c;
  --gold-bright: #e8c887;
  --gold-dim: #8a743f;

  --purple: #7d6ba8;
  --purple-bright: #a893d6;
  --crimson: #a8394a;
  --crimson-bright: #d9576a;
  --green: #6f9c6b;

  --text: #eae7de;
  --text-muted: #a8a5b3;
  --text-dim: #75758a;

  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;

  --max-width: 1200px;
  --radius: 6px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(125,107,168,0.14), transparent 60%),
    radial-gradient(ellipse 900px 600px at 90% 10%, rgba(201,163,92,0.09), transparent 60%);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.15; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--text-muted); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9em;
}

/* ---- nav ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 18, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: 0.02em;
}
.brand:hover { text-decoration: none; }
.brand svg { flex: none; }
.brand .brand-sub { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-bright); text-decoration: none; }

.nav-cta {
  border: 1px solid var(--gold-dim);
  padding: 8px 18px;
  border-radius: var(--radius);
  color: var(--gold-bright) !important;
}
.nav-cta:hover { background: rgba(201,163,92,0.1); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  color: var(--text);
  width: 40px;
  height: 36px;
  cursor: pointer;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1a1305;
  box-shadow: 0 8px 24px -8px rgba(201,163,92,0.55);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
  background: transparent;
  border-color: var(--panel-border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--gold-dim); color: var(--gold-bright); }

/* ---- hero ---- */
.hero {
  position: relative;
  padding: 84px 0 96px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { margin-bottom: 0.4em; }
.hero .lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: 1.8em;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 2.2em; }
.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-family: var(--font-display); font-size: 1.4rem; color: var(--gold-bright); }
.hero-stats div span { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }

.hero-art {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.7), 0 0 0 1px rgba(201,163,92,0.06);
  aspect-ratio: 16 / 11;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art .frame-tag {
  position: absolute;
  bottom: 14px; left: 14px;
  background: rgba(11,11,18,0.75);
  border: 1px solid var(--panel-border);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ---- sections ---- */
section { padding: 84px 0; position: relative; z-index: 1; }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---- feature grid ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 28px;
}
.card h3 { color: var(--gold-bright); margin-bottom: 0.5em; }
.card p { margin-bottom: 0; }
.card .icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: rgba(201,163,92,0.1);
  border: 1px solid rgba(201,163,92,0.25);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  color: var(--gold-bright);
}

/* feature-media: image + text pairing, alternating */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}
.feature-row:last-child { border-bottom: none; }
.feature-row.reverse .feature-media { order: 2; }
.feature-row.reverse .feature-copy { order: 1; }
.feature-media {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  box-shadow: 0 20px 50px -24px rgba(0,0,0,0.6);
  aspect-ratio: 16 / 11;
}
.feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple-bright);
  background: rgba(125,107,168,0.12);
  border: 1px solid rgba(125,107,168,0.3);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.feature-list { list-style: none; margin: 20px 0 0; padding: 0; }
.feature-list li {
  padding-left: 26px;
  position: relative;
  margin-bottom: 10px;
  color: var(--text-muted);
}
.feature-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.5em;
  width: 8px; height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* ---- UI gallery: small labeled screenshot strip (villager dialogs etc.) ---- */
.ui-gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.ui-gallery figure {
  margin: 0;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}
.ui-gallery img { width: 100%; aspect-ratio: 16/10; object-fit: cover; object-position: top left; display: block; }
.ui-gallery figcaption {
  padding: 8px 10px;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  text-align: center;
}
@media (max-width: 920px) { .ui-gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .ui-gallery { grid-template-columns: repeat(2, 1fr); } }

/* ---- deep dive accordion-ish category blocks ---- */
.dive-category { margin-bottom: 56px; }
.dive-category-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.dive-category-head h2 { margin: 0; }
.dive-category-head span {
  color: var(--text-dim);
  font-size: 0.85rem;
}
.dive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.dive-item {
  background: var(--bg-elevated);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.dive-item h4 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  margin-bottom: 6px;
}
.dive-item p { font-size: 0.9rem; margin: 0; }

/* ---- roadmap ---- */
.roadmap-track { position: relative; padding-left: 28px; }
.roadmap-track::before {
  content: "";
  position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--gold-dim), var(--panel-border));
}
.roadmap-stage { position: relative; padding-bottom: 44px; }
.roadmap-stage:last-child { padding-bottom: 0; }
.roadmap-stage::before {
  content: "";
  position: absolute; left: -28px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--gold);
}
.roadmap-stage.done::before { background: var(--gold); }
.roadmap-stage .stage-badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}
.stage-badge.now { background: rgba(201,163,92,0.15); color: var(--gold-bright); border: 1px solid rgba(201,163,92,0.4); }
.stage-badge.next { background: rgba(125,107,168,0.15); color: var(--purple-bright); border: 1px solid rgba(125,107,168,0.4); }
.stage-badge.later { background: rgba(255,255,255,0.05); color: var(--text-dim); border: 1px solid var(--panel-border); }
.stage-badge.shipped { background: rgba(111,156,107,0.15); color: #9fc79a; border: 1px solid rgba(111,156,107,0.4); }

/* ---- quote / callout ---- */
.callout {
  border-left: 3px solid var(--gold);
  background: var(--bg-elevated);
  padding: 24px 28px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---- CTA band ---- */
.cta-band {
  text-align: center;
  padding: 90px 0;
  background:
    radial-gradient(ellipse 700px 300px at 50% 0%, rgba(201,163,92,0.1), transparent 70%),
    var(--bg-alt);
  border-top: 1px solid var(--line);
}
.cta-band h2 { margin-bottom: 0.3em; }
.cta-band p { max-width: 50ch; margin: 0 auto 2em; }
.cta-band .hero-actions { justify-content: center; }

/* ---- footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
  color: var(--text-dim);
  font-size: 0.88rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.footer-grid h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: var(--text-dim); }
.footer-grid a:hover { color: var(--gold-bright); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- connect page ---- */
.connect-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.connect-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s;
}
.connect-card:hover { border-color: var(--gold-dim); transform: translateY(-2px); text-decoration: none; }
.connect-card .icon {
  width: 52px; height: 52px; margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(201,163,92,0.1);
  border: 1px solid rgba(201,163,92,0.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-bright);
}
.connect-card h3 { margin-bottom: 4px; color: var(--text); }
.connect-card p { font-size: 0.88rem; margin: 0; }

.simple-page { padding-top: 64px; padding-bottom: 96px; max-width: 760px; }
.simple-page h1 { margin-bottom: 0.2em; }
.simple-page .updated { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 2.4em; }
.simple-page h2 { margin-top: 2em; font-size: 1.25rem; color: var(--gold-bright); }

/* ---- blog ---- */
.blog-list { display: flex; flex-direction: column; gap: 0; }
.blog-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.blog-row img { border-radius: 6px; border: 1px solid var(--panel-border); aspect-ratio: 16/10; object-fit: cover; }
.blog-row .date { color: var(--text-dim); font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 6px; }
.blog-row h3 { margin-bottom: 8px; }
.blog-row h3 a { color: var(--text); }
.blog-row h3 a:hover { color: var(--gold-bright); text-decoration: none; }

.post-header { margin-bottom: 2.2em; }
.post-header .date { color: var(--text-dim); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.post-body h2 { margin-top: 1.6em; }
.post-body img { border-radius: 8px; border: 1px solid var(--panel-border); margin: 1.6em 0; }
.post-body p { color: var(--text); }
#disqus-comments { margin-top: 4em; padding-top: 2.4em; border-top: 1px solid var(--line); }

/* ---- lightbox: click any screenshot to view it full size ---- */
img.zoomable { cursor: zoom-in; transition: filter 0.15s ease; }
img.zoomable:hover { filter: brightness(1.08); }

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(6, 6, 10, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}
.lightbox-overlay.open { display: flex; }
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 28px;
  background: none;
  border: 1px solid var(--panel-border);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { border-color: var(--gold-dim); color: var(--gold-bright); }

@media (max-width: 680px) {
  .lightbox-overlay { padding: 16px; }
  .lightbox-close { top: 10px; right: 10px; }
}

/* ---- utility ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ---- responsive ---- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; gap: 28px; padding: 40px 0; }
  .feature-row.reverse .feature-media { order: 1; }
  .feature-row.reverse .feature-copy { order: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .connect-grid { grid-template-columns: 1fr 1fr; }
  .blog-row { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .site-nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 20px 24px 28px;
    gap: 18px;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .connect-grid { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  .hero { padding: 56px 0 64px; }
}
