:root {
  --bg-deep: #0c0f14;
  --stone-top: #222832;
  --stone-mid: #1a1f27;
  --stone-bot: #13171d;
  --trough-bg: #10141a;
  --border-stone: #3a424f;
  --border-gold: #b89352;
  --gold-bright: #e4c583;
  --gold-muted: #a68c58;
  --text-main: #e6dfd1;
  --text-muted: #a39b8c;
  --bronze-top: #8f5c2d;
  --bronze-mid: #6f441f;
  --bronze-bot: #4f2f14;
  --bronze-hover: #a56c37;
  --green-ok: #65b887;
  --amber-wait: #dfb25b;
  --red-err: #d16a6a;
  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Crimson Pro", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-bottom: 1px solid #2b323e;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background: url("/assets/hero-cairnreach.webp") center 35% / cover no-repeat;
  filter: saturate(0.95) brightness(0.84);
  transform: scale(1.01);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 34%, rgba(10, 14, 20, 0.22) 0%, rgba(10, 13, 18, 0.72) 70%, rgba(10, 13, 18, 0.94) 100%),
    linear-gradient(180deg, rgba(10, 13, 18, 0.52) 0%, rgba(10, 13, 18, 0.14) 36%, rgba(12, 15, 20, 0.92) 94%, #0c0f14 100%);
}

.topbar {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--gold-bright);
  text-decoration: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 3px;
  background: rgba(16, 20, 26, 0.84);
  border: 1px solid var(--border-stone);
  color: var(--text-muted);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber-wait);
  box-shadow: 0 0 8px rgba(223, 178, 91, 0.6);
}

.status-dot.online {
  background: var(--green-ok);
  box-shadow: 0 0 8px rgba(101, 184, 135, 0.65);
}

.status-dot.offline {
  background: var(--red-err);
  box-shadow: 0 0 8px rgba(209, 106, 106, 0.6);
}

.hero-inner {
  position: relative;
  z-index: 2;
  flex: 1;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 20px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 28px;
}

.eyebrow {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--gold-bright);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.title-lockup h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.75rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.05;
  background: linear-gradient(180deg, #f7e6bd 0%, #d3ab65 55%, #8f6732 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.9));
}

.subtitle {
  margin: 14px auto 0;
  max-width: 600px;
  font-size: 1.15rem;
  color: #ddd4c3;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
}

/* ---------- Carved-Stone Tablet ---------- */
.stone-tablet {
  position: relative;
  width: 100%;
  max-width: 488px;
  padding: 24px 26px 22px;
  text-align: left;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.015) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, var(--stone-top) 0%, var(--stone-mid) 55%, var(--stone-bot) 100%);
  border: 2px solid #484f5c;
  box-shadow:
    inset 0 1px 0 rgba(232, 204, 146, 0.28),
    inset 0 0 0 1px rgba(10, 12, 16, 0.9),
    0 24px 56px rgba(0, 0, 0, 0.8);
  border-radius: 4px;
}

.rivet {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f0d79a, #7d5b2c);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.rivet.tl { top: 8px; left: 8px; }
.rivet.tr { top: 8px; right: 8px; }
.rivet.bl { bottom: 8px; left: 8px; }
.rivet.br { bottom: 8px; right: 8px; }

.tablet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tablet-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
}

.version-pill {
  padding: 3px 9px;
  font-size: 0.78rem;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  border-radius: 2px;
  background: var(--trough-bg);
  border: 1px solid #4b4333;
  color: var(--gold-bright);
  white-space: nowrap;
}
.version-pill.approved {
  border-color: #36694c;
  color: var(--green-ok);
}
.version-pill.pending {
  border-color: #6f592c;
  color: var(--amber-wait);
}
.version-pill.denied {
  border-color: #6d3434;
  color: var(--red-err);
}

.bronze-rule {
  height: 1px;
  margin: 12px 0 14px;
  background: linear-gradient(90deg, rgba(184, 147, 82, 0.65), rgba(184, 147, 82, 0.12));
}

.tablet-copy {
  margin: 0 0 16px;
  color: #d3cab9;
  font-size: 1rem;
}

.recessed-trough {
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--trough-bg);
  border: 1px solid #2b323d;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.65);
  border-radius: 3px;
}

.account-line {
  margin: 0 0 4px;
  font-size: 0.98rem;
  color: var(--text-main);
}

.account-line strong {
  color: var(--gold-bright);
}

.trough-note {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-muted);
}

.notice-banner {
  padding: 10px 12px;
  margin-bottom: 14px;
  border-radius: 3px;
  font-size: 0.93rem;
  background: rgba(184, 147, 82, 0.12);
  border: 1px solid rgba(184, 147, 82, 0.45);
  color: #ebd5a4;
}

.notice-banner.error {
  background: rgba(209, 106, 106, 0.12);
  border-color: rgba(209, 106, 106, 0.5);
  color: #f0b3b3;
}

.polling-box {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #dfd5c2;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(228, 197, 131, 0.25);
  border-top-color: var(--gold-bright);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Buttons ---------- */
.actions-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.actions-row > * {
  flex: 1 1 150px;
}

.btn-bronze,
.btn-stone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.08s ease, border-color 0.15s ease;
}

.btn-bronze {
  color: #fbf3e2;
  background: linear-gradient(180deg, var(--bronze-top) 0%, var(--bronze-mid) 55%, var(--bronze-bot) 100%);
  border: 1px solid var(--border-gold);
  box-shadow: inset 0 1px 0 rgba(255, 228, 175, 0.35), 0 4px 14px rgba(0, 0, 0, 0.5);
}

.btn-bronze:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--bronze-hover) 0%, #815025 55%, #5c3717 100%);
  border-color: var(--gold-bright);
}

.btn-bronze:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-stone {
  color: var(--text-main);
  background: linear-gradient(180deg, #2b323e 0%, #1d222b 100%);
  border: 1px solid #48505f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-stone:hover {
  border-color: var(--gold-muted);
  color: var(--gold-bright);
}

.discord-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.fine-print {
  margin: 2px 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Download Vault ---------- */
.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.download-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 13px;
  border-radius: 3px;
  text-decoration: none;
  background: linear-gradient(180deg, #6f441f 0%, #4b2d13 100%);
  border: 1px solid var(--border-gold);
  color: #fbf3e2;
  transition: border-color 0.15s ease, filter 0.15s ease;
}

.download-card:hover:not(.disabled) {
  border-color: var(--gold-bright);
  filter: brightness(1.12);
}

.download-card.disabled {
  background: #171c23;
  border-color: #323945;
  color: var(--text-muted);
  pointer-events: none;
}

.dl-os {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.dl-meta {
  font-size: 0.83rem;
  color: #d8c8a9;
}

.download-card.disabled .dl-meta {
  color: #7d8594;
}

.steps-list {
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: 0.93rem;
  color: #cfc6b4;
}

.steps-list li + li {
  margin-top: 4px;
}

/* ---------- Showcase & Callings ---------- */
.showcase {
  background: linear-gradient(180deg, #0c0f14 0%, #10141c 100%);
}

.section-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 24px;
}

.section-head {
  text-align: center;
  margin-bottom: 36px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  color: var(--gold-bright);
  letter-spacing: 0.06em;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  background: linear-gradient(180deg, #1b2028 0%, #13171e 100%);
  border: 1px solid #333b48;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.shot-frame {
  aspect-ratio: 16 / 10;
  background: #0b0e12;
  overflow: hidden;
  border-bottom: 1px solid #2c3340;
}

.shot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feature-body {
  padding: 18px 20px 20px;
}

.feature-body h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold-bright);
}

.feature-body p {
  margin: 0;
  font-size: 0.98rem;
  color: #c8c0b0;
}

.callings-band {
  padding-top: 12px;
}

.callings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.calling-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #1a2029 0%, #13171e 100%);
  border: 1px solid #333b48;
  border-radius: 4px;
}

.calling-crest {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  image-rendering: pixelated;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  background: #10141a;
}

.warrior-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--gold-bright);
  background: radial-gradient(circle, #3b2718 0%, #151210 100%);
}

.calling-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.06rem;
  color: var(--gold-bright);
}

.calling-tag {
  margin: 2px 0 6px;
  font-style: italic;
  font-size: 0.92rem;
  color: var(--gold-muted);
}

.calling-card p:last-child {
  margin: 0;
  font-size: 0.95rem;
  color: #c7bfb0;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid #262c37;
  padding: 28px 24px 36px;
  text-align: center;
  background: #0a0d11;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 4px 0;
}

.site-footer strong {
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  color: var(--gold-bright);
}

.site-footer code {
  padding: 2px 6px;
  border-radius: 3px;
  background: #151a22;
  color: #d7ccb7;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .callings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .stone-tablet {
    padding: 20px 18px;
  }
  .download-grid {
    grid-template-columns: 1fr;
  }
}
