:root {
  color-scheme: dark;
  --bg: #0f1410;
  --bg-raised: #171d17;
  --fg: #e9e6d8;
  --fg-dim: #b7b3a2;
  --accent: #c9a24b;
  --accent-dim: #8a6f34;
  --border: #2a3128;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.55;
}

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

a {
  color: var(--accent);
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Nav */

nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 20, 16, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--fg);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-link:hover {
  color: var(--fg);
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.03em;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--accent);
  color: var(--bg);
}

.btn-small {
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
}

/* Hero */

.hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: #000 center 30% / cover no-repeat;
  text-align: center;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 20, 16, 0) 40%, rgba(15, 20, 16, 0.95) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-bottom: 3.5rem;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--fg-dim);
  margin: 0 0 1.25rem;
}

.hero .btn {
  font-size: 1.15rem;
  padding: 0.85rem 2.25rem;
}

/* Sections */

section {
  padding: 4.5rem 0;
}

section h2 {
  font-size: 1.9rem;
  text-align: center;
  letter-spacing: 0.02em;
  margin: 0 0 0.75rem;
}

.section-intro {
  max-width: 720px;
  margin: 0 auto 3rem;
  text-align: center;
  color: var(--fg-dim);
  font-size: 1.05rem;
}

.lede {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.15rem;
  color: var(--fg-dim);
}

/* Feature grid */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.75rem;
}

.feature-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 1.15rem;
}

.feature-card p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 0.98rem;
}

/* Regions */

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.region-card {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  background: #000 center / cover no-repeat;
}

.region-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 20, 16, 0) 35%, rgba(15, 20, 16, 0.92) 100%);
}

.region-card-body {
  position: relative;
  z-index: 1;
  padding: 1.1rem 1.25rem;
}

.region-card-body .hub {
  display: block;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}

.region-card-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.3rem;
}

.region-card-body p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--fg-dim);
}

/* Cast strip */

.cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.75rem;
  text-align: center;
}

.cast-portrait {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-dim);
  margin: 0 auto 0.75rem;
}

.cast-card h3 {
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
}

.cast-card .npc-title {
  margin: 0 0 0.15rem;
  font-size: 0.85rem;
  color: var(--accent);
}

.cast-card .npc-location {
  margin: 0;
  font-size: 0.82rem;
  color: var(--fg-dim);
}

/* Final CTA */

.cta-banner {
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}

.cta-banner h2 {
  margin-bottom: 1.75rem;
}

/* Footer */

footer {
  padding: 2.5rem 0 3rem;
  text-align: center;
  color: var(--fg-dim);
  font-size: 0.88rem;
}

footer a {
  color: var(--fg-dim);
}

footer .footer-links {
  margin-top: 0.5rem;
}

footer .footer-links a {
  margin: 0 0.5rem;
}

/* Contact / admin pages */

.page-header {
  padding: 3rem 0 1rem;
  text-align: center;
}

.page-header h1 {
  margin: 0 0 0.5rem;
}

.wrap.narrow {
  max-width: 640px;
}

.muted {
  color: var(--fg-dim);
  font-size: 0.9rem;
}

.form-error {
  color: #d97a5f;
  font-size: 0.9rem;
}

.ticket-panel {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.ticket-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.3rem;
}

form label {
  display: block;
  font-size: 0.9rem;
  color: var(--fg-dim);
  margin: 0.75rem 0 0.3rem;
}

form label:first-child {
  margin-top: 0;
}

form input[type='text'],
form textarea {
  width: 100%;
  padding: 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

form input[type='text']:focus,
form textarea:focus {
  outline: none;
  border-color: var(--accent-dim);
}

form button {
  margin-top: 1rem;
  cursor: pointer;
  background: transparent;
  font-family: inherit;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--fg-dim);
  cursor: pointer;
}

.btn-ghost {
  border-color: var(--border);
  color: var(--fg-dim);
  margin-bottom: 1rem;
}

.btn-ghost:hover {
  background: var(--border);
  color: var(--fg);
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ticket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
}

.ticket-row:hover {
  border-color: var(--accent-dim);
}

.ticket-status {
  font-size: 0.78rem;
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ticket-status-open {
  background: rgba(201, 162, 75, 0.18);
  color: var(--accent);
}

.ticket-status-closed {
  background: rgba(183, 179, 162, 0.12);
  color: var(--fg-dim);
}

.thread-messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  max-height: 400px;
  overflow-y: auto;
}

.thread-message {
  padding: 0.65rem 0.9rem;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.92rem;
}

.thread-message strong {
  display: inline-block;
  margin-right: 0.5rem;
}

.thread-message p {
  margin: 0.35rem 0 0;
}

.thread-message-admin {
  border-color: var(--accent-dim);
}
