/* ── Fonts (self-hosted, no CDN) ─────────────────────────────────────────── */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/cinzel-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/cinzel-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Theme (matches the guild's Game Wheel tool for a consistent look) ─────── */
:root {
  --bg:           #0d1117;
  --surface:      #161b22;
  --surface2:     #1e2530;
  --border:       #30363d;
  --border-lite:  #21272e;
  --text:         #e6edf3;
  --text-muted:   #7d8590;
  --text-dim:     #484f58;
  --gold:         #f0b429;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-display: 'Cinzel', serif;

  /* Purple (default) theme */
  --accent:         #b88cf0;
  --accent-glow:    rgba(184,140,240,0.35);
  --hero-glow:      rgba(184,140,240,0.6);
  --hero-gradient:  linear-gradient(135deg, #c8a0ff 0%, #ffffff 40%, #f0b429 80%, #e06aff 100%);
}

[data-theme="green"] {
  --accent:         #34e0a1;
  --accent-glow:    rgba(52,224,161,0.35);
  --hero-glow:      rgba(52,224,161,0.6);
  --hero-gradient:  linear-gradient(135deg, #8ef7cf 0%, #ffffff 40%, #f0b429 80%, #34e0a1 100%);
}

*, *::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-body);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

/* ── Starfield backdrop ───────────────────────────────────────────────────── */
/* Hidden while the hero/logo is on screen (the logo art has its own nebula
   backdrop already), faded in once scrolled past it — see main.js. */
.starfield {
  position: fixed; inset: 0; z-index: -1;
  opacity: 0;
  transition: opacity 0.8s ease;
  background-image:
    radial-gradient(ellipse 70% 40% at 50% 100%, rgba(60,30,110,0.2) 0%, transparent 70%),
    radial-gradient(1px 1px at 20% 25%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 15%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 60%, rgba(255,255,255,0.22) 0%, transparent 100%),
    radial-gradient(1px 1px at 10% 70%, rgba(255,255,255,0.18) 0%, transparent 100%),
    radial-gradient(1px 1px at 88% 80%, rgba(255,255,255,0.22) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 88%, rgba(255,255,255,0.16) 0%, transparent 100%),
    radial-gradient(1px 1px at 92% 40%, rgba(255,255,255,0.2) 0%, transparent 100%);
  background-color: var(--bg);
}
.starfield.visible { opacity: 1; }

/* ── Top bar ──────────────────────────────────────────────────────────────── */
.top-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 16px 20px;
  background: rgba(13,17,23,0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-lite);
}
.top-bar .wordmark {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--text);
}

.theme-toggle {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  display: flex; gap: 6px;
  background: var(--surface); border: 1px solid var(--border-lite); border-radius: 999px;
  padding: 5px;
}
.theme-dot {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; padding: 0; transition: border-color 0.15s, transform 0.15s; -webkit-tap-highlight-color: transparent;
}
.theme-dot--purple { background: #b88cf0; }
.theme-dot--green { background: #34e0a1; }
.theme-dot.active { border-color: var(--text); transform: scale(1.15); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 64px 20px 56px;
  max-width: 1080px;
  margin: 0 auto;
}
.hero .logo {
  width: auto;
  max-width: 100%;
  margin-bottom: 8px;
}
.hero .logo-green { display: none; }
[data-theme="green"] .hero .logo-purple { display: none; }
[data-theme="green"] .hero .logo-green { display: block; }
.hero .kicker {
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-display); font-size: clamp(34px, 7vw, 58px); font-weight: 700;
  letter-spacing: 0.04em; line-height: 1.15;
  background: var(--hero-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  filter: drop-shadow(0 0 30px var(--hero-glow));
}
.hero .lede {
  margin-top: 18px;
  max-width: 560px;
  color: var(--text-muted);
  font-size: 16px;
}

/* ── Content sections ─────────────────────────────────────────────────────── */
.content {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px 20px 100px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
/* Single-column cards (outside .two-col) keep a readable text width, centered
   within the wider .content container. */
.content > .section { max-width: 720px; width: 100%; margin: 0 auto; }

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

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px clamp(20px, 5vw, 44px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.section.in-view { opacity: 1; transform: translateY(0); }

.section .eyebrow {
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.section .eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--accent); opacity: 0.6; }

.section h2 {
  font-family: var(--font-display); font-size: clamp(20px, 3.5vw, 26px); font-weight: 700;
  color: var(--text); margin-bottom: 16px; letter-spacing: 0.01em;
}

.section p { color: var(--text-muted); margin-bottom: 14px; }
.section p:last-child { margin-bottom: 0; }
.section p strong { color: var(--text); font-weight: 600; }

.section h4 {
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
  margin: 26px 0 12px;
}
.section h4:first-child { margin-top: 0; }

.section ul { list-style: none; margin-bottom: 14px; }
.section ul:last-child { margin-bottom: 0; }
.section ul li {
  position: relative; padding-left: 18px; color: var(--text-muted);
  margin-bottom: 8px; line-height: 1.6;
}
.section ul li:last-child { margin-bottom: 0; }
.section ul li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.7;
}
.section ul li strong { color: var(--text); font-weight: 600; }

.raid-history { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px 24px; margin-bottom: 8px; }
.raid-history-group h5 {
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  color: var(--text); margin-bottom: 8px; letter-spacing: 0.02em;
}
.raid-history-group ul { margin-bottom: 0; }
.raid-history-group ul li { font-size: 13px; }

/* A combined card holding several named subsections, each keeping its own
   eyebrow/heading/body but separated by a divider instead of its own card. */
.section .subsection { padding: 26px 0; border-bottom: 1px solid var(--border-lite); }
.section .subsection:first-child { padding-top: 0; }
.section .subsection:last-child { padding-bottom: 0; border-bottom: none; }

/* ── Achievement gallery ──────────────────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.gallery-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border: none; border-radius: 10px; overflow: hidden;
  cursor: pointer; padding: 0;
  background: var(--bg);
}
.gallery-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-thumb:hover img { transform: scale(1.08); }
.gallery-thumb-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 10px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  color: var(--text);
  font-size: 11px; font-weight: 600; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gallery-thumb-caption em { display: block; font-style: normal; color: var(--accent); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; }

/* ── Lightbox ─────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5,7,10,0.94);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  padding: 60px 20px;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox-figure { max-width: min(92vw, 1100px); max-height: 100%; margin: 0; }
.lightbox-image {
  max-width: 100%; max-height: 78vh;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 0 60px var(--accent-glow), 0 20px 60px rgba(0,0,0,0.6);
}
.lightbox-caption {
  margin-top: 14px; text-align: center;
  color: var(--text-muted); font-size: 13px; letter-spacing: 0.02em;
}
.lightbox-close {
  position: absolute; top: 18px; right: 20px;
  background: none; border: none; color: var(--text);
  font-size: 32px; line-height: 1; cursor: pointer; padding: 6px;
}
.lightbox-close:hover { color: var(--accent); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: var(--surface); border: 1px solid var(--border-lite); color: var(--text);
  width: 44px; height: 44px; border-radius: 50%;
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.lightbox-nav:hover { background: var(--surface2); color: var(--accent); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

@media (max-width: 640px) {
  .lightbox { padding: 70px 12px; }
  .lightbox-nav { width: 38px; height: 38px; font-size: 14px; }
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 0 20px 48px;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.site-footer .snake { font-size: 18px; display: block; margin-bottom: 10px; opacity: 0.8; }

.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
.footer-link {
  display: inline-block;
  padding: 10px 22px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s, box-shadow 0.15s, color 0.15s;
}
.footer-link:hover { background: var(--surface2); color: var(--accent); box-shadow: 0 0 24px var(--accent-glow); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .hero { padding: 48px 16px 40px; }
  .section { padding: 26px 20px; border-radius: 14px; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .section { transition: none; opacity: 1; transform: none; }
  .starfield { transition: none; opacity: 1; }
  html { scroll-behavior: auto; }
}
