/* Self-hosted fonts (SIL OFL 1.1, zero Google Fonts CDN) */
@font-face {
  font-family: "Cinzel Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("fonts/cinzel-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cinzel Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("fonts/cinzel-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter Variable";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-wght-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@property --fade-start {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@property --fade-end {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

:root {
  color-scheme: dark;

  /* Palette REIGN Studio */
  --bg: #111713;
  --surface: #18211b;
  --surface-tint: #1d2821;
  --text: #edf3ee;
  --text-muted: #b3c4b7;
  --gold: #d4a64a;
  --gold-bright: #e2b85f;
  --gold-ink: #111713;
  --border: #5b6d60;
  --border-hairline: rgba(91, 109, 96, 0.45);
  --emerald: #6ec89a;
  --ocean: #68b5d8;
  --ember: #e58267;

  /* Strictly 2 font families */
  --font-display: "Cinzel Variable", Georgia, serif;
  --font-sans: "Inter Variable", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Strictly 3 body font sizes below the hero */
  --text-heading: clamp(1.75rem, 2.8vw, 2.375rem);
  --text-body: 1rem;
  --text-sm: 0.875rem;

  /* Layout & motion */
  --header-height: 4.5rem;
  --radius: 0.5rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 76rem;
}

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

html {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  scroll-padding-top: calc(var(--header-height) + 1rem);
  overflow-x: clip;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.tabular {
  font-variant-numeric: tabular-nums;
}

/* Skip link (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.65rem 1.1rem;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  border-radius: var(--radius);
  background-color: var(--gold);
  color: var(--gold-ink);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}

/* Focus indicators compatible with Windows Forced Colors Mode */
:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold-bright);
}

@media (forced-colors: active) {
  :where(a, button, input, select, [tabindex]):focus-visible {
    outline: 3px solid Highlight;
    outline-offset: 2px;
    box-shadow: none;
  }
}

/* Header: transparent at y=0, cleanly separated on scroll */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  min-block-size: var(--header-height);
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}

.site-header.is-scrolled {
  background-color: rgba(17, 23, 19, 0.94);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border-hairline);
}

@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  @keyframes header-solidify {
    from {
      background-color: rgba(17, 23, 19, 0);
      border-bottom-color: rgba(91, 109, 96, 0);
    }
    to {
      background-color: rgba(17, 23, 19, 0.94);
      border-bottom-color: rgba(91, 109, 96, 0.55);
    }
  }

  .site-header {
    animation: header-solidify linear both;
    animation-timeline: scroll(block root);
    animation-range: 0px 96px;
  }
}

.header-inner {
  max-width: var(--container);
  margin-inline: auto;
  min-block-size: var(--header-height);
  padding-inline: clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  color: var(--gold);
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
}

.primary-nav a {
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  padding-block: 0.4rem;
  white-space: nowrap;
  transition: color 180ms var(--ease-out);
}

.primary-nav a:hover {
  color: var(--gold-bright);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Primary CTA */
.cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 2.625rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  background-color: var(--gold);
  color: var(--gold-ink);
  font-size: var(--text-body);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--gold);
  transition: background-color 180ms var(--ease-out), border-color 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.cta-primary:hover {
  background-color: var(--gold-bright);
  border-color: var(--gold-bright);
}

@media (prefers-reduced-motion: no-preference) {
  .cta-primary:hover {
    transform: translateY(-1px);
  }
}

.header-cta {
  font-size: var(--text-sm);
  min-block-size: 2.375rem;
  padding: 0.5rem 1rem;
}

.cta-hero {
  min-block-size: 3.125rem;
  padding: 0.85rem 1.75rem;
}

/* Connected Segmented Controls (non-button clusters) */
.segmented-control {
  display: inline-flex;
  align-items: stretch;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.1875rem;
  gap: 0.125rem;
}

.segmented-wrap {
  flex-wrap: wrap;
}

.segment-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  min-block-size: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: calc(var(--radius) - 0.1875rem);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.segment-btn:hover {
  color: var(--text);
}

.segment-btn[aria-pressed="true"] {
  background-color: var(--gold);
  color: var(--gold-ink);
  font-weight: 600;
}

@media (forced-colors: active) {
  .segment-btn[aria-pressed="true"] {
    outline: 2px solid Highlight;
  }
}

.menu-toggle {
  display: none;
  appearance: none;
  align-items: center;
  justify-content: center;
  min-inline-size: 2.625rem;
  min-block-size: 2.625rem;
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.mobile-nav {
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem clamp(1rem, 4vw, 1.5rem) 1.5rem;
}

.mobile-nav nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav a:not(.cta-primary) {
  color: var(--text);
  font-size: var(--text-body);
  font-weight: 500;
  text-decoration: none;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border-hairline);
}

.mobile-cta {
  margin-top: 0.75rem;
  width: 100%;
}

/* 1. Full-bleed Monumental Hero */
.hero {
  position: relative;
  min-block-size: min(92svh, 54rem);
  display: grid;
  align-items: start;
  justify-items: center;
  padding: calc(var(--header-height) + clamp(3rem, 8vh, 5.75rem)) clamp(1rem, 4vw, 2rem) clamp(4rem, 12vh, 8rem);
  isolation: isolate;
  border-bottom: 1px solid var(--border-hairline);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background-color: var(--bg);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(17, 23, 19, 0.76) 0%,
      rgba(17, 23, 19, 0.56) 36%,
      rgba(17, 23, 19, 0.24) 68%,
      rgba(17, 23, 19, 0.88) 100%
    );
}

.hero-content {
  max-width: 56rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}

.hero-lead {
  margin: 0;
  max-width: 54ch;
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--text);
}

.hero-action {
  padding-top: 0.25rem;
}

/* Shared Section Rhythm */
.section {
  padding-block: clamp(4.25rem, 8vw, 6.75rem);
  border-bottom: 1px solid var(--border-hairline);
}

.section-surface {
  background-color: var(--surface);
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

h2 {
  margin: 0 0 0.875rem;
  font-family: var(--font-display);
  font-size: var(--text-heading);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}

h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

h4 {
  margin: 0 0 0.5rem;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
  color: var(--gold-bright);
}

p {
  margin: 0 0 1rem;
  max-width: 65ch;
  font-size: var(--text-body);
  color: var(--text-muted);
}

p:last-child {
  margin-bottom: 0;
}

.section-intro {
  color: var(--text-muted);
}

/* Accessible Single-Row Scrollable Tablist (per modern-web-guidance `tabs`) */
.tablist-scroller {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: inline proximity;
  scroll-padding-inline: 2.5rem;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  --fade-size: 2.5rem;
  --fade-dir: right;
  --fade-start-pos: 0;
  --fade-end-pos: 100%;
  mask:
    linear-gradient(black, black) no-clip subtract,
    linear-gradient(to var(--fade-dir), black, transparent) var(--fade-start-pos) 0 / var(--fade-start) 100% no-repeat no-clip,
    linear-gradient(to var(--fade-dir), transparent, black) var(--fade-end-pos) 0 / var(--fade-end) 100% no-repeat no-clip;
  transition: --fade-start 180ms var(--ease-out), --fade-end 180ms var(--ease-out);
}

.tablist-scroller::-webkit-scrollbar {
  display: none;
}

@supports (animation-timeline: scroll(self inline)) {
  @keyframes reveal-fade-start {
    to {
      --fade-start: var(--fade-size);
    }
  }

  @keyframes hide-fade-end {
    from {
      --fade-end: var(--fade-size);
    }
  }

  .tablist-scroller {
    animation: reveal-fade-start linear both, hide-fade-end linear both;
    animation-timeline: scroll(self inline);
    animation-range: 0 var(--fade-size), calc(100% - var(--fade-size)) 100%;
  }
}

.tablist-scroller.more-start {
  --fade-start: var(--fade-size);
}

.tablist-scroller.more-end {
  --fade-end: var(--fade-size);
}

[role="tab"] {
  position: relative;
  flex: none;
  scroll-snap-align: start;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 500;
  min-block-size: 3rem;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 180ms var(--ease-out);
}

[role="tab"]:hover {
  color: var(--text);
}

[role="tab"][aria-selected="true"] {
  color: var(--gold-bright);
}

[role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  border-block-end: 3px solid var(--gold);
}

/* Panels share one grid cell with zero padding/border on [role="tabpanel"] itself (per `tabs` hidden="until-found") */
.stage-panels,
.lore-panels {
  display: grid;
}

.stage-panels > [role="tabpanel"],
.lore-panels > [role="tabpanel"] {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
}

.stage-panels > [role="tabpanel"][hidden],
.lore-panels > [role="tabpanel"][hidden] {
  pointer-events: none;
  z-index: 0;
}

/* 2. Interactive Studio Stage */
.stage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: start;
}

.stage-visual {
  margin: 0;
}

.visual-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--surface);
}

.visual-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.era-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(circle at 28% 52%, rgba(110, 200, 154, 0.22), transparent 60%);
  transition: opacity 220ms var(--ease-out);
}

.era-overlay[data-era="seals"] {
  background: radial-gradient(circle at 44% 52%, rgba(229, 130, 103, 0.24), transparent 60%);
}

.era-overlay[data-era="treaty"] {
  background: radial-gradient(circle at 60% 52%, rgba(104, 181, 216, 0.22), transparent 60%);
}

.era-overlay[data-era="ascension"] {
  background: radial-gradient(circle at 76% 52%, rgba(212, 166, 74, 0.20), transparent 60%);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
}

.grid-overlay.grid-square {
  background-image:
    linear-gradient(to right, rgba(212, 166, 74, 0.32) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(212, 166, 74, 0.32) 1px, transparent 1px);
  background-size: 36px 36px;
}

.grid-overlay.grid-hex {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='96' viewBox='0 0 56 96'%3E%3Cpath d='M28 0L56 16V48L28 64L0 48V16Z M28 64V96 M0 48L-28 64 M56 48L84 64' fill='none' stroke='%23d4a64a' stroke-opacity='0.5' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 56px 96px;
}

.stage-caption {
  margin-top: 0.75rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.stage-details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.stage-details > p {
  margin: 0;
}

.interactive-control {
  padding-block: 1.125rem;
  border-block: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.interactive-control .segmented-control {
  align-self: flex-start;
  max-width: 100%;
}

.control-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.control-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}

.control-value {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gold-bright);
}

.range-input {
  width: 100%;
  accent-color: var(--gold);
  min-block-size: 2rem;
  cursor: pointer;
}

.control-note {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Body Lists: identical body size as paragraphs */
.spec-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.spec-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: var(--text-body);
  color: var(--text);
}

.spec-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 1px;
  transform: rotate(45deg);
  background-color: var(--gold);
}

/* 3. Living Lore Encyclopedia */
.lore-explorer {
  display: grid;
  grid-template-columns: minmax(14rem, 19rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.category-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.category-btn {
  appearance: none;
  border: 0;
  border-bottom: 1px solid var(--border-hairline);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: left;
  min-block-size: 2.75rem;
  padding: 0.625rem 0.75rem;
  cursor: pointer;
  position: relative;
  transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}

.category-btn:hover {
  color: var(--text);
  background-color: var(--surface-tint);
}

.category-btn[aria-pressed="true"] {
  color: var(--gold-bright);
  background-color: var(--bg);
  font-weight: 600;
}

.category-btn[aria-pressed="true"]::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  border-inline-start: 3px solid var(--gold);
}

.lore-dossier {
  padding-left: clamp(0rem, 2vw, 1.5rem);
  border-left: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dossier-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-hairline);
}

.dossier-header h3 {
  margin: 0;
}

.dossier-coord {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--emerald);
  font-variant-numeric: tabular-nums;
}

.dossier-block {
  padding-top: 0.5rem;
}

.muted-note {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.editorial-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.editorial-divider {
  padding-left: clamp(0rem, 3vw, 2.5rem);
  border-left: 1px solid var(--border-hairline);
}

.timeline-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timeline-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: var(--text-body);
  color: var(--text);
  border-left: 1px solid var(--border);
  padding-block: 0.25rem;
}

.timeline-list li::before {
  content: "";
  position: absolute;
  left: -0.34rem;
  top: 0.65rem;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background-color: var(--gold);
}

/* Interactive Relation Web SVG */
.web-canvas-wrap {
  margin-top: 1rem;
  border-top: 1px solid var(--border-hairline);
  padding-top: 1rem;
}

.relation-web-svg {
  width: 100%;
  height: auto;
  display: block;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}

.web-node {
  cursor: pointer;
}

.web-node text {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  fill: var(--text);
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 4px;
  stroke-linejoin: round;
  user-select: none;
}

.web-edge {
  stroke: var(--border);
  stroke-width: 1.5;
  transition: stroke 160ms var(--ease-out), stroke-opacity 160ms var(--ease-out);
}

.web-edge.is-active {
  stroke: var(--gold-bright);
  stroke-width: 2.5;
}

.web-edge.is-dim {
  stroke-opacity: 0.22;
}

/* 4. Asymmetric Editorial: Solo vs Guild */
.asymmetric-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.editorial-pane {
  padding-block: clamp(2rem, 4vw, 3.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.pane-solo {
  padding-right: clamp(1.5rem, 4vw, 3.5rem);
}

.pane-guild {
  padding-left: clamp(1.5rem, 4vw, 3.5rem);
  border-left: 1px solid var(--border);
  background-color: rgba(24, 33, 27, 0.55);
  padding-right: clamp(1rem, 2.5vw, 2rem);
}

.editorial-pane p {
  margin: 0;
}

/* 5. Pricing Ledger (no nested cards, max 1 primary CTA button) */
.pricing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.pricing-header .section-head {
  margin-bottom: 0;
}

.pricing-ledger {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.plan-col {
  padding: 2rem 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-left: 1px solid var(--border-hairline);
}

.plan-col:first-child {
  border-left: 0;
}

.plan-col.is-highlighted {
  background-color: var(--bg);
  padding-top: calc(2rem - 2px);
  border-top: 3px solid var(--gold);
  margin-top: -1px;
}

.plan-name {
  margin: 0;
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--text);
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.plan-amount {
  font-size: var(--text-heading);
  font-weight: 700;
  line-height: 1.05;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.plan-period {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.plan-annual-note {
  margin: -0.75rem 0 0;
  font-size: var(--text-sm);
  color: var(--emerald);
  font-variant-numeric: tabular-nums;
}

.plan-quotas {
  padding-block: 0.875rem;
  border-block: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.plan-quotas p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.plan-features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  flex: 1;
}

.plan-features li {
  position: relative;
  padding-left: 1.15rem;
  font-size: var(--text-body);
  color: var(--text-muted);
}

.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 1px;
  transform: rotate(45deg);
  background-color: var(--gold);
}

.plan-link {
  color: var(--gold-bright);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.25em;
  padding-block: 0.25rem;
  align-self: flex-start;
  transition: color 160ms var(--ease-out);
}

.plan-link:hover {
  color: var(--text);
}

.pricing-action-row {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-start;
}

.addons-strip {
  margin-top: 2.75rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-hairline);
}

.addons-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2.5rem;
  margin-bottom: 1.5rem;
}

.addon-heading {
  margin: 0 0 0.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}

.addons-columns p:not(.addon-heading) {
  margin: 0;
  font-size: var(--text-body);
  color: var(--text-muted);
}

.legal-note {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 78ch;
}

/* 6. Final CTA & Footer */
.section-final {
  border-bottom: 1px solid var(--border);
}

.final-cta-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.final-cta-box h2,
.final-cta-box p {
  margin: 0;
}

.final-action {
  padding-top: 0.5rem;
}

.site-footer {
  background-color: var(--bg);
  padding-block: 3rem 3.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-hairline);
}

.footer-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--text);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  padding-block: 0.25rem;
  transition: color 160ms var(--ease-out);
}

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

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-legal p {
  margin: 0;
  max-width: 78ch;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.mojang-disclaimer {
  color: var(--text);
}

/* Coarse pointer touch targets (WCAG 2.5.8) */
@media (pointer: coarse) {
  .segment-btn,
  .category-btn,
  .footer-nav a,
  .plan-link {
    min-block-size: 2.75rem;
    display: inline-flex;
    align-items: center;
  }
}

/* Responsive Breakpoints */
@media (max-width: 1080px) {
  .pricing-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-col:nth-child(3) {
    border-left: 0;
  }

  .plan-col:nth-child(3),
  .plan-col:nth-child(4) {
    border-top: 1px solid var(--border-hairline);
  }
}

@media (max-width: 900px) {
  .primary-nav,
  .header-cta {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .stage-layout,
  .lore-explorer,
  .editorial-split,
  .asymmetric-grid,
  .addons-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .lore-dossier,
  .editorial-divider,
  .pane-guild {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--border-hairline);
    padding-top: 1.75rem;
  }

  .pane-solo {
    padding-right: 0;
  }

  .pane-guild {
    padding-inline: 1rem;
  }
}

@media (max-width: 640px) {
  .pricing-ledger {
    grid-template-columns: minmax(0, 1fr);
  }

  .plan-col {
    border-left: 0;
    border-top: 1px solid var(--border-hairline);
    padding-inline: 0.75rem;
  }

  .plan-col:first-child {
    border-top: 0;
  }

  .hero {
    min-block-size: 38rem;
    padding-top: calc(var(--header-height) + 2.5rem);
  }

  .brand-wordmark {
    font-size: 1.0625rem;
  }
}

/* Reduced motion: disable spatial animations while preserving non-motion color feedback */
@media (prefers-reduced-motion: reduce) {
  .site-header {
    animation: none;
  }

  .cta-primary:hover {
    transform: none;
  }
}
