@font-face {
  font-family: 'Cinzel';
  src: url('fonts/Cinzel-Variable.ttf') format('truetype');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Alegreya';
  src: url('fonts/Alegreya-Variable.ttf') format('truetype');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Jost';
  src: url('fonts/Jost-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0c0e;
  --surface: #101215;
  --surface-elevated: #15181d;
  --ink: #f6f4ee;
  --muted: #b8b5ad;
  --subtle: #8b887f;
  --hairline: rgba(255, 255, 255, 0.11);
  --hairline-strong: rgba(255, 255, 255, 0.22);

  --ember: #e86a2c;
  --ember-deep: #b83d14;
  --amber: #f0b24a;

  --rider-accent: #e2483c;
  --mage-accent: #68a4ec;
  --soldier-accent: #9fb2c4;

  --font-display: 'Cinzel', Georgia, serif;
  --font-serif: 'Alegreya', Georgia, serif;
  --font-sans: 'Jost', system-ui, -apple-system, sans-serif;

  --max-width: 1180px;
  --header-height: 70px;
  --radius: 6px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--surface-elevated);
  color: var(--ink);
  border: 1px solid var(--amber);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

/* Header & Navigation */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 80;
  transition: background-color 220ms ease, border-color 220ms ease, backdrop-filter 220ms ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled,
.site-header.menu-open {
  background-color: rgba(10, 12, 14, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--hairline);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 1.5rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.19em;
  color: var(--ink);
}

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
}

.nav-devlog {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.95rem;
  border: 1px solid rgba(240, 178, 74, 0.45);
  border-radius: 999px;
  color: var(--amber);
  background: rgba(232, 106, 44, 0.08);
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.nav-devlog:hover,
.nav-devlog:focus-visible {
  color: var(--ink);
  border-color: var(--amber);
  background: rgba(232, 106, 44, 0.22);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: rgba(16, 18, 21, 0.72);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 200ms ease, opacity 200ms ease;
}

.menu-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.menu-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1.25rem 1.4rem;
  border-top: 1px solid var(--hairline);
  background: rgba(10, 12, 14, 0.96);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
}

.mobile-nav a:last-child {
  border-bottom: 0;
  color: var(--amber);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding-top: var(--header-height);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(0.95) contrast(1.04);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 65% at 50% 42%, rgba(10, 12, 14, 0.34) 0%, rgba(10, 12, 14, 0.72) 72%, rgba(10, 12, 14, 0.9) 100%),
    linear-gradient(180deg, rgba(10, 12, 14, 0.72) 0%, rgba(10, 12, 14, 0.25) 38%, rgba(10, 12, 14, 0.62) 76%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: clamp(2.5rem, 6vh, 4.5rem);
}

.hero-logo {
  width: min(440px, 78vw);
  height: auto;
  filter: drop-shadow(0 18px 38px rgba(0, 0, 0, 0.75));
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  max-width: 62ch;
  margin: 0 0 2rem;
  font-size: clamp(1.04rem, 0.96rem + 0.35vw, 1.24rem);
  font-weight: 300;
  color: var(--ink);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.95rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.75rem 1.55rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 160ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, #b93c14 0%, #982b0f 100%);
  border: 1px solid rgba(240, 178, 74, 0.6);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(184, 61, 20, 0.35);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: linear-gradient(135deg, #cb461a 0%, #aa3313 100%);
  border-color: var(--amber);
  box-shadow: 0 12px 32px rgba(232, 106, 44, 0.42);
}

.btn-secondary {
  background: rgba(16, 18, 21, 0.65);
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.42);
}

.hero-facts {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--hairline);
  background: linear-gradient(180deg, rgba(10, 12, 14, 0.62) 0%, var(--bg) 100%);
}

.hero-facts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.hero-fact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.05rem 1rem;
  border-right: 1px solid var(--hairline);
}

.hero-fact:last-child {
  border-right: 0;
}

.fact-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.14em;
  color: var(--amber);
  text-transform: uppercase;
}

.fact-label {
  font-size: 0.86rem;
  color: var(--muted);
}

/* Shared Section Layout */
.section {
  padding-block: clamp(4rem, 7vw, 6.5rem);
  border-top: 1px solid var(--hairline);
}

.eyebrow {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem);
}

.section-head h2,
.devlog-inner h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 1.35rem + 1.5vw, 2.55rem);
  line-height: 1.18;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.section-lead {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 0.96rem + 0.22vw, 1.14rem);
}

/* Premise */
.premise {
  background: radial-gradient(ellipse 70% 80% at 50% 0%, rgba(232, 106, 44, 0.07) 0%, transparent 70%);
}

.premise-inner {
  max-width: 780px;
  text-align: center;
  margin-inline: auto;
}

.premise-quote {
  margin: 0.4rem 0 1.4rem;
  font-family: var(--font-serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.38rem, 1.18rem + 0.85vw, 1.9rem);
  line-height: 1.4;
  color: var(--ink);
}

.premise-copy {
  margin: 0;
  color: var(--muted);
}

.premise-copy strong {
  color: var(--ink);
  font-weight: 500;
}

/* Paths */
.paths-list {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}

.path-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 3.5vw, 3.2rem);
  align-items: center;
  padding-bottom: clamp(2.5rem, 4.5vw, 4rem);
  border-bottom: 1px solid var(--hairline);
}

.path-card:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.path-card--reverse .path-media {
  order: 2;
}

.path-card--reverse .path-body {
  order: 1;
}

.shot-frame {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
}

.shot-frame img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 420ms ease, filter 280ms ease;
}

.shot-frame:hover img,
.shot-frame:focus-visible img {
  transform: scale(1.025);
}

.shot-zoom {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  background: rgba(10, 12, 14, 0.78);
  color: var(--ink);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 200ms ease;
}

.shot-frame:hover .shot-zoom,
.shot-frame:focus-visible .shot-zoom {
  opacity: 1;
}

.path-rider {
  --path-accent: var(--rider-accent);
}

.path-mage {
  --path-accent: var(--mage-accent);
}

.path-soldier {
  --path-accent: var(--soldier-accent);
}

.path-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.55rem;
}

.path-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.16em;
  color: var(--path-accent);
}

.path-origin {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
}

.path-body h3 {
  margin: 0 0 0.8rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  letter-spacing: 0.06em;
  color: var(--ink);
}

.path-summary {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.path-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.path-points li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--ink);
  font-size: 0.98rem;
}

.path-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--path-accent);
}

/* World Section */
.world {
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%);
}

.world-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.world-card {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  background: var(--surface-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}

.world-card .shot-frame {
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
}

.world-card--wide {
  grid-column: span 12;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  align-items: center;
}

.world-card--wide .shot-frame {
  border-bottom: 0;
  border-right: 1px solid var(--hairline);
  height: 100%;
}

.world-card--wide .shot-frame img {
  height: 100%;
}

.world-card--accent {
  grid-column: span 12;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr);
  align-items: center;
}

.world-card--accent .shot-frame {
  order: 2;
  border-bottom: 0;
  border-left: 1px solid var(--hairline);
  height: 100%;
}

.world-card--accent .world-body {
  order: 1;
}

.world-body {
  padding: 1.4rem 1.55rem 1.55rem;
}

.world-body h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: var(--ink);
}

.world-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

/* Systems Section (CleanUI hairline aesthetic) */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline);
}

.system-item {
  padding: 1.85rem 1.65rem;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: rgba(16, 18, 21, 0.45);
}

.system-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(240, 178, 74, 0.3);
  background: rgba(232, 106, 44, 0.08);
  color: var(--amber);
}

.system-item h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.system-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Gallery */
.gallery {
  background: var(--surface);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  cursor: pointer;
  text-align: left;
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 380ms ease, opacity 240ms ease;
}

.gallery-card:hover img,
.gallery-card:focus-visible img {
  transform: scale(1.04);
}

.gallery-caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 1.6rem 0.9rem 0.65rem;
  background: linear-gradient(180deg, rgba(10, 12, 14, 0) 0%, rgba(10, 12, 14, 0.86) 100%);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Devlog CTA Band */
.devlog-band {
  background: radial-gradient(ellipse 65% 90% at 50% 100%, rgba(232, 106, 44, 0.13) 0%, transparent 72%);
  text-align: center;
}

.devlog-inner {
  max-width: 720px;
}

.devlog-copy {
  margin: 0 auto 2rem;
  color: var(--muted);
}

.devlog-copy strong {
  color: var(--ink);
  font-weight: 500;
}

.devlog-actions {
  display: flex;
  justify-content: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 2rem;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.footer-domain,
.footer-note {
  margin: 0;
  font-size: 0.86rem;
  color: var(--subtle);
}

/* Lightbox */
.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 7, 9, 0.92);
  backdrop-filter: blur(8px);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1160px, 100%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
}

.lightbox-figure {
  margin: 0;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}

.lightbox-figure img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: #060709;
}

.lightbox-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.95rem;
  color: var(--ink);
}

.lightbox-counter {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--amber);
  flex-shrink: 0;
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  background: rgba(16, 18, 21, 0.88);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-nav {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  background: rgba(16, 18, 21, 0.88);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* Progressive scroll reveal */
.reveal-pending {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 480ms ease, transform 480ms ease;
}

.reveal-pending.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-pending {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .shot-frame img,
  .gallery-card img,
  .btn {
    transition: none;
  }
}

/* Responsive */
@media (max-width: 960px) {
  .path-card,
  .path-card--reverse,
  .world-card--wide,
  .world-card--accent {
    grid-template-columns: 1fr;
  }

  .path-card--reverse .path-media,
  .world-card--accent .shot-frame {
    order: 0;
  }

  .path-card--reverse .path-body,
  .world-card--accent .world-body {
    order: 0;
  }

  .world-card--wide .shot-frame,
  .world-card--accent .shot-frame {
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid var(--hairline);
  }

  .systems-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-facts-grid {
    grid-template-columns: 1fr;
  }

  .hero-fact {
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
    padding: 0.75rem 0.5rem;
  }

  .hero-fact:last-child {
    border-bottom: 0;
  }

  .world-card {
    grid-column: span 12;
  }

  .systems-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .lightbox-dialog {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .lightbox-nav {
    position: fixed;
    bottom: 1.15rem;
    z-index: 2;
  }

  .lightbox-prev {
    left: 1.25rem;
  }

  .lightbox-next {
    right: 1.25rem;
  }
}
