:root {
  --forest-deep: #0f2219;
  --forest-mid: #173326;
  --forest-card: #1d3c2d;
  --parchment: #f4ecd8;
  --parchment-2: #ebe0c4;
  --ink: #231d15;
  --ink-muted: #574a39;
  --gold: #c99b42;
  --gold-bright: #e3b963;
  --amethyst: #7e5799;
  --cream: #f8f3e6;
  --cream-muted: #d6ceb9;
  --border-dark: rgba(201, 155, 66, 0.28);
  --border-light: rgba(102, 79, 44, 0.22);
  --radius: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--forest-deep);
  color: var(--cream);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: Georgia, "Palatino Linotype", "Book Antiqua", serif;
  line-height: 1.2;
  margin-top: 0;
}

code {
  background: rgba(15, 34, 25, 0.1);
  border: 1px solid var(--border-light);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.9em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--forest-deep);
  padding: 8px 14px;
  font-weight: 700;
  z-index: 1000;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 34, 25, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  text-decoration: none;
}

.brand-mark {
  border-radius: 50%;
  border: 1px solid var(--gold);
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--cream-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--gold-bright);
}

.site-nav .nav-cta {
  background: var(--gold);
  color: var(--forest-deep);
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 700;
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta:focus-visible {
  background: var(--gold-bright);
  color: var(--forest-deep);
}

/* Hero */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 64px 0;
  text-align: center;
  border-bottom: 2px solid var(--gold);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(15, 34, 25, 0.72) 0%, rgba(12, 26, 19, 0.88) 75%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.hero-emblem {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  object-fit: cover;
  margin-bottom: 18px;
  background: #fff;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-bright);
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 10px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--parchment);
  margin: 0 auto 14px;
}

.sacred-ethos {
  margin: 0 auto 24px;
  max-width: 560px;
  font-style: italic;
  color: var(--cream-muted);
  border-left: 3px solid var(--gold);
  padding: 6px 14px;
  background: rgba(15, 34, 25, 0.55);
  border-radius: 0 8px 8px 0;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--gold);
  color: var(--forest-deep);
}

.btn-gold:hover,
.btn-gold:focus-visible {
  background: var(--gold-bright);
}

.btn-outline {
  background: rgba(15, 34, 25, 0.55);
  border-color: var(--gold);
  color: var(--cream);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: rgba(201, 155, 66, 0.18);
}

.btn-outline-dark {
  background: transparent;
  border-color: var(--border-light);
  color: var(--ink);
}

/* Sections */
.section {
  padding: 64px 0;
}

.parchment-band {
  background: linear-gradient(180deg, var(--parchment) 0%, var(--parchment-2) 100%);
  color: var(--ink);
}

.forest-band {
  background: linear-gradient(180deg, var(--forest-mid) 0%, var(--forest-deep) 100%);
  color: var(--cream);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 36px;
}

.section-header h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  margin-bottom: 10px;
}

.section-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--amethyst);
}

.section-kicker.gold {
  color: var(--gold-bright);
}

.section-lead {
  margin: 0;
  color: var(--ink-muted);
}

.section-header.light .section-lead {
  color: var(--cream-muted);
}

/* Pillars */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}

.parchment-card {
  background: rgba(255, 252, 244, 0.78);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: 0 6px 18px rgba(35, 29, 21, 0.06);
}

.parchment-card h3 {
  font-size: 1.2rem;
  color: var(--forest-deep);
  margin-bottom: 8px;
}

.parchment-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.96rem;
}

.pillar-wide {
  grid-column: 1 / -1;
}

/* Guild Halls Grid */
.guilds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 16px;
}

.guild-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  background: var(--forest-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--cream);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.guild-card:hover,
.guild-card:focus-visible {
  border-color: var(--gold-bright);
  background: #234937;
  transform: translateY(-2px);
}

.guild-badge {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  margin-bottom: 6px;
  font-weight: 700;
}

.guild-card h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: #fff;
}

.guild-card p {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--cream-muted);
}

.guild-more {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-bright);
}

/* Field Info */
.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.ops-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-muted);
}

.ops-list li {
  margin-bottom: 10px;
}

/* Get Involved */
.involved-layout {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 22px;
}

@media (max-width: 860px) {
  .involved-layout {
    grid-template-columns: 1fr;
  }
}

.dark-card {
  background: var(--forest-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 22px;
}

.dark-card h3 {
  color: var(--gold-bright);
  margin-bottom: 12px;
}

.pathway-list {
  margin: 0;
  padding-left: 18px;
  color: var(--cream-muted);
}

.pathway-list li {
  margin-bottom: 10px;
}

.privacy-note {
  margin-top: 18px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(15, 34, 25, 0.6);
  border-left: 3px solid var(--amethyst);
  font-style: italic;
  color: var(--cream);
  font-size: 0.92rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  margin-bottom: 4px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: 7px;
  border: 1px solid var(--border-dark);
  background: var(--forest-deep);
  color: var(--cream);
  font-family: inherit;
  font-size: 14px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.form-status {
  margin-top: 12px;
  font-size: 13px;
  color: var(--gold-bright);
  min-height: 20px;
}

/* Heritage */
.heritage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.era-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--amethyst);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

.heritage-grid a {
  display: inline-block;
  margin-top: 10px;
  color: var(--forest-deep);
  font-weight: 700;
  text-decoration: underline;
}

/* Footer */
.site-footer {
  background: #0a1711;
  border-top: 1px solid var(--border-dark);
  padding: 24px 0;
  color: var(--cream-muted);
  font-size: 13.5px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.site-footer a {
  color: var(--gold-bright);
}

/* Native Modal Dialog (Modern Web Guidance compliant) */
dialog {
  max-width: 560px;
  width: calc(100% - 32px);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 0;
  background: var(--parchment);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(8, 18, 13, 0.78);
  overflow: hidden;
  overscroll-behavior: contain;
}

.dialog-inner {
  padding: 22px 24px;
}

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

.dialog-header h1 {
  font-size: 1.5rem;
  color: var(--forest-deep);
  margin-bottom: 6px;
}

.dialog-close {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

.dialog-tagline {
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--amethyst);
}

.dialog-desc {
  margin: 0 0 14px;
  color: var(--ink-muted);
}

.dialog-focus ul {
  margin: 6px 0 18px;
  padding-left: 20px;
  color: var(--ink-muted);
}

.dialog-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
