:root {
  color-scheme: dark;
  --ink: #05090b;
  --paper: #e8eee9;
  --muted: #9aa8a1;
  --cyan: #65e6db;
  --cyan-dim: #1a817c;
  --gold: #c99b55;
  --line: rgba(202, 224, 216, 0.18);
  --panel: rgba(8, 17, 19, 0.78);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: "Arial Narrow", "Roboto Condensed", Inter, system-ui, sans-serif;
  letter-spacing: 0.01em;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

#particle-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.85;
}

.page-noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.15;
  background-image: repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(255,255,255,.025) 4px);
  mix-blend-mode: soft-light;
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 12;
  height: 106px;
  padding: 0 clamp(24px, 5vw, 84px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(215, 234, 226, 0.13);
}

.brand img { width: clamp(150px, 14vw, 220px); height: auto; aspect-ratio: 3 / 1; object-fit: contain; filter: drop-shadow(0 4px 22px rgba(0,0,0,.7)); }
nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 48px); }
nav a {
  padding: 14px 0;
  color: #bcc9c4;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: color .2s ease;
}
nav a:hover, nav a:focus-visible { color: var(--cyan); }
.nav-support { border-bottom: 1px solid var(--cyan-dim); }

.hero {
  position: relative;
  isolation: isolate;
  min-height: max(760px, 100svh);
  padding: 150px clamp(24px, 8vw, 145px) 135px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-art {
  position: absolute;
  z-index: -3;
  inset: 0;
  background: url('/assets/citadel-of-the-first.webp') 38% 52% / cover no-repeat;
  transform: scale(1.035);
  animation: hero-drift 18s ease-in-out infinite alternate;
}

.hero-vignette {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4,9,11,.93) 0%, rgba(4,9,11,.7) 34%, rgba(4,9,11,.14) 66%, rgba(4,9,11,.66) 100%),
    linear-gradient(0deg, #05090b 0%, transparent 34%, rgba(5,9,11,.4) 100%),
    radial-gradient(circle at 54% 49%, transparent 0, rgba(0,0,0,.18) 44%, rgba(0,0,0,.72) 100%);
}

.hero::before, .hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.hero::before {
  left: clamp(24px, 5vw, 84px);
  top: 106px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(transparent, var(--line) 25%, var(--line) 80%, transparent);
}
.hero::after {
  width: 420px;
  height: 420px;
  right: -200px;
  top: 28%;
  border: 1px solid rgba(101,230,219,.14);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(101,230,219,.025), 0 0 0 140px rgba(101,230,219,.018);
}

.hero-content { position: relative; z-index: 5; width: min(700px, 66vw); margin-left: clamp(0px, 4vw, 72px); }
.eyebrow {
  margin: 0 0 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .25em;
  text-transform: uppercase;
}
.eyebrow span { width: 34px; height: 1px; background: currentColor; box-shadow: 0 0 10px currentColor; }
h1, h2, h3 { margin: 0; line-height: .92; text-transform: uppercase; }
h1 {
  max-width: 850px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 7.4vw, 118px);
  font-weight: 500;
  letter-spacing: -.055em;
  text-shadow: 0 8px 45px #000;
}
h1 em { color: var(--cyan); font-weight: 400; }
.hero-copy {
  max-width: 590px;
  margin: 32px 0 0;
  padding-left: 24px;
  border-left: 1px solid var(--gold);
  color: #c2ccc8;
  font-family: system-ui, sans-serif;
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.75;
}
.hero-actions { margin-top: 42px; display: flex; flex-wrap: wrap; gap: 14px; }
.button {
  min-height: 54px;
  padding: 0 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  border: 1px solid rgba(221,238,232,.28);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.button:hover, .button:focus-visible { transform: translateY(-2px); border-color: var(--cyan); }
.button-primary { background: var(--cyan); border-color: var(--cyan); color: #04100f; box-shadow: 0 0 34px rgba(101,230,219,.16); }
.button-primary:hover, .button-primary:focus-visible { background: #8af0e7; }
.button-ghost { background: rgba(3,10,11,.5); backdrop-filter: blur(8px); }
.button span { font-size: 17px; }

.hero-rail {
  position: absolute;
  right: clamp(24px, 5vw, 84px);
  bottom: 68px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: rgba(4,10,11,.55);
  backdrop-filter: blur(12px);
}
.hero-rail div { min-width: 150px; padding: 17px 22px; border-right: 1px solid var(--line); }
.hero-rail div:last-child { border-right: 0; }
.hero-rail strong { display: block; color: var(--cyan); font-family: Georgia, serif; font-size: 22px; font-weight: 400; }
.hero-rail span { color: #899690; font-size: 9px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.scroll-cue { position: absolute; z-index: 5; left: clamp(24px, 5vw, 84px); bottom: 50px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: #899690; }
.scroll-cue span { font-size: 9px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; writing-mode: vertical-rl; }
.scroll-cue i { display: block; width: 1px; height: 42px; background: linear-gradient(var(--cyan), transparent); animation: pulse-line 2s ease-in-out infinite; }

.manifesto, .section-shell, .bosses, .legacy, .final-cta { position: relative; z-index: 4; }
.section-shell, .bosses, .legacy, .final-cta {
  content-visibility: auto;
  contain-intrinsic-size: auto 850px;
}
.manifesto {
  padding: clamp(90px, 10vw, 165px) clamp(24px, 8vw, 145px);
  display: grid;
  grid-template-columns: minmax(110px, .45fr) 1.5fr 1fr;
  gap: clamp(36px, 6vw, 100px);
  align-items: end;
  background: radial-gradient(circle at 75% 40%, rgba(23,91,87,.12), transparent 35%), #071012;
  border-bottom: 1px solid var(--line);
}
.section-marker { align-self: start; color: #5e6c67; font-size: 10px; font-weight: 800; letter-spacing: .2em; writing-mode: vertical-rl; }
.manifesto h2, .section-heading h2, .bosses h2, .legacy h2, .final-cta h2 { font-family: Georgia, serif; font-size: clamp(42px, 5vw, 80px); font-weight: 400; letter-spacing: -.045em; }
.manifesto-text { margin: 0; color: #9aa8a2; font-family: system-ui, sans-serif; font-size: 16px; line-height: 1.8; }

.section-shell { padding: clamp(85px, 9vw, 145px) clamp(24px, 5vw, 84px); }
.section-heading { margin: 0 auto 55px; max-width: 1360px; display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.section-heading > p { max-width: 390px; margin: 0; color: #7f8b86; font-family: system-ui, sans-serif; line-height: 1.7; }

.game-loop { background: linear-gradient(180deg, #05090b, #071113); border-bottom: 1px solid var(--line); }
.loop-grid { max-width: 1360px; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; border: 1px solid var(--line); }
.loop-grid li { position: relative; min-height: 280px; padding: 35px 29px; border-right: 1px solid var(--line); overflow: hidden; }
.loop-grid li:last-child { border-right: 0; }
.loop-grid li::after { content: ""; position: absolute; width: 145px; height: 145px; right: -88px; bottom: -88px; border: 1px solid rgba(101,230,219,.12); transform: rotate(45deg); }
.loop-grid span, .class-copy > span, .boss-card span, .relic-grid span { color: var(--cyan); font-size: 9px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.loop-grid h3 { margin: 60px 0 18px; font-family: Georgia, serif; font-size: 28px; font-weight: 400; letter-spacing: -.025em; }
.loop-grid p, .class-copy p, .boss-card p, .relic-grid p { margin: 0; color: #899791; font-family: system-ui, sans-serif; font-size: 14px; line-height: 1.7; }

.classes { background: radial-gradient(circle at 50% 20%, rgba(31,112,106,.1), transparent 40%), #071012; border-bottom: 1px solid var(--line); }
.class-grid { max-width: 1360px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.class-card { position: relative; min-height: 390px; display: grid; grid-template-columns: .9fr 1.1fr; align-items: end; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(20,37,39,.9), rgba(5,10,11,.98)); }
.class-card::before { content: ""; position: absolute; inset: 10% 12% auto auto; width: 190px; height: 190px; border: 1px solid rgba(101,230,219,.09); border-radius: 50%; }
.class-art { align-self: stretch; display: flex; align-items: end; min-width: 0; }
.class-art img { width: 100%; height: auto; object-fit: contain; object-position: bottom; filter: drop-shadow(0 20px 30px rgba(0,0,0,.7)); transition: transform .45s ease; }
.class-card:hover .class-art img { transform: scale(1.025) translateY(-4px); }
.class-copy { position: relative; z-index: 1; padding: 44px 38px 44px 10px; }
.class-copy h3 { margin: 12px 0 20px; font-family: Georgia, serif; font-size: clamp(34px, 3vw, 53px); font-weight: 400; letter-spacing: -.035em; }
.class-copy small { display: block; margin-top: 27px; color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }

.bosses { padding: clamp(90px, 10vw, 170px) clamp(24px, 5vw, 84px); display: grid; grid-template-columns: minmax(280px, .8fr) minmax(600px, 1.7fr); gap: clamp(45px, 7vw, 120px); align-items: center; overflow: hidden; background: radial-gradient(circle at 78% 45%, rgba(110,47,35,.22), transparent 34%), #040708; border-bottom: 1px solid var(--line); }
.boss-intro { max-width: 520px; }
.boss-intro > p:not(.eyebrow) { margin: 30px 0; color: #929f99; font-family: system-ui, sans-serif; line-height: 1.8; }
.boss-facts { display: flex; flex-wrap: wrap; gap: 9px; }
.boss-facts span { padding: 10px 12px; border: 1px solid var(--line); color: #a5b2ad; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.boss-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.boss-card { position: relative; min-height: 610px; display: flex; flex-direction: column; justify-content: end; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(#101718, #070b0c); }
.boss-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 38%, rgba(4,8,9,.96) 80%); }
.boss-card img { position: absolute; inset: 0; width: 100%; height: 82%; object-fit: contain; object-position: center top; transition: transform .55s ease; }
.boss-card:hover img { transform: scale(1.03); }
.boss-card > div { position: relative; z-index: 2; padding: 34px; }
.boss-card h3 { margin: 10px 0 16px; font-family: Georgia, serif; font-size: clamp(31px, 3vw, 48px); font-weight: 400; letter-spacing: -.04em; }
.boss-card--rust { background: radial-gradient(circle at 50% 35%, rgba(132,79,33,.28), transparent 48%), #080b0b; }
.boss-card--nyxara { background: radial-gradient(circle at 50% 35%, rgba(22,103,99,.24), transparent 48%), #060a0b; }

.relics { background: #071012; border-bottom: 1px solid var(--line); }
.relic-grid { max-width: 1360px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.relic-grid article { position: relative; min-height: 410px; padding: 35px; border-right: 1px solid var(--line); overflow: hidden; }
.relic-grid article:last-child { border-right: 0; }
.relic-grid img { width: 170px; height: 170px; margin: -4px auto 10px; object-fit: contain; filter: drop-shadow(0 0 26px rgba(101,230,219,.13)); }
.relic-grid h3 { margin: 12px 0 17px; font-family: Georgia, serif; font-size: 34px; font-weight: 400; letter-spacing: -.03em; }

.legacy { min-height: 760px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; overflow: hidden; background: #05090b; border-bottom: 1px solid var(--line); }
.legacy-art { position: relative; align-self: stretch; overflow: hidden; opacity: .68; }
.legacy-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 65%, #05090b), linear-gradient(0deg, #05090b, transparent 30%); }
.legacy-art img { width: 100%; height: 100%; object-fit: cover; }
.legacy-copy { max-width: 650px; padding: 90px clamp(28px, 7vw, 120px) 90px 20px; }
.legacy-copy > p:not(.eyebrow) { color: #929f99; font-family: system-ui, sans-serif; line-height: 1.8; }
.legacy-copy h2 { margin-bottom: 32px; }
.legacy-stats { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.legacy-stats div { padding: 20px 12px 20px 0; }
.legacy-stats strong { display: block; color: var(--cyan); font-family: Georgia, serif; font-size: 25px; font-weight: 400; }
.legacy-stats span { color: #73817b; font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.regions { background: #05090b; }
.region-grid { max-width: 1360px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; }
.region-card { position: relative; min-height: 470px; overflow: hidden; border: 1px solid var(--line); background: #0b1618; }
.region-card img { width: 100%; height: 100%; object-fit: cover; opacity: .68; filter: saturate(.78) contrast(1.1); transition: transform .8s cubic-bezier(.2,.75,.2,1), opacity .4s; }
.region-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(3,8,9,.93)); }
.region-card:hover img { transform: scale(1.045); opacity: .88; }
.region-label { position: absolute; z-index: 2; inset: auto 28px 27px; }
.region-label span { color: var(--cyan); font-size: 9px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.region-label h3 { margin-top: 8px; font-family: Georgia, serif; font-size: clamp(25px, 2.4vw, 38px); font-weight: 400; letter-spacing: -.025em; }

.final-cta { min-height: 580px; padding: 100px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; background: #05090b; }
.final-cta::before { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(rgba(4,10,11,.58), rgba(4,10,11,.9)), radial-gradient(circle at center, transparent 0, #05090b 78%); pointer-events: none; }
.final-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.final-cta > *:not(.final-art) { position: relative; z-index: 2; }
.final-cta .eyebrow { justify-content: center; }
.final-cta p:not(.eyebrow) { margin: 25px 0 35px; color: #a9b5b0; }

footer { position: relative; z-index: 4; min-height: 115px; padding: 25px clamp(24px, 5vw, 84px); display: flex; align-items: center; gap: 35px; border-top: 1px solid var(--line); color: #66736e; font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
footer img { width: 130px; height: auto; aspect-ratio: 3 / 1; object-fit: contain; opacity: .65; }
footer p { margin-right: auto; }
footer a:hover { color: var(--cyan); }

@keyframes hero-drift { to { transform: scale(1.07) translate3d(-.5%, -.5%, 0); } }
@keyframes pulse-line { 0%, 100% { opacity: .35; transform: scaleY(.65); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

@media (max-width: 900px) {
  .site-header { height: 82px; }
  nav a:not(.nav-support) { display: none; }
  .hero { min-height: 790px; padding-top: 125px; align-items: flex-start; }
  .hero-art { background-position: 55% center; }
  .hero-vignette { background: linear-gradient(90deg, rgba(4,9,11,.9), rgba(4,9,11,.28)), linear-gradient(0deg, #05090b 0%, transparent 55%, rgba(5,9,11,.4)); }
  .hero-content { width: 100%; margin: 10vh 0 0; }
  .hero-rail { left: 24px; right: 24px; bottom: 30px; }
  .hero-rail div { min-width: 0; padding: 14px; }
  .scroll-cue { display: none; }
  .manifesto { grid-template-columns: 1fr; }
  .section-marker { writing-mode: initial; }
  .loop-grid { grid-template-columns: repeat(2, 1fr); }
  .loop-grid li:nth-child(2) { border-right: 0; }
  .loop-grid li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .class-grid { grid-template-columns: 1fr; }
  .bosses { grid-template-columns: 1fr; }
  .boss-intro { max-width: 720px; }
  .relic-grid { grid-template-columns: 1fr 1fr; }
  .relic-grid article:nth-child(2) { border-right: 0; }
  .relic-grid article:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .legacy { grid-template-columns: 1fr; }
  .legacy-art { min-height: 430px; }
  .legacy-art::after { background: linear-gradient(0deg, #05090b, transparent 45%); }
  .legacy-copy { max-width: 760px; padding: 20px 40px 90px; }
  .region-grid { grid-template-columns: 1fr; }
  .region-card { min-height: 360px; }
}

@media (max-width: 560px) {
  .site-header { padding-inline: 20px; }
  .brand img { width: 135px; }
  .hero { padding: 110px 20px 155px; }
  h1 { font-size: clamp(48px, 15vw, 76px); }
  .hero-copy { padding-left: 17px; font-size: 14px; }
  .hero-actions { display: grid; }
  .hero-rail { grid-template-columns: 1fr 1fr 1fr; left: 0; right: 0; bottom: 0; border-inline: 0; }
  .hero-rail div { padding: 12px 10px; }
  .hero-rail strong { font-size: 17px; }
  .hero-rail span { font-size: 7px; letter-spacing: .08em; }
  .manifesto { padding-inline: 24px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .loop-grid { grid-template-columns: 1fr; }
  .loop-grid li { min-height: 230px; border-right: 0; border-bottom: 1px solid var(--line); }
  .loop-grid li:last-child { border-bottom: 0; }
  .loop-grid h3 { margin-top: 42px; }
  .class-card { min-height: 560px; grid-template-columns: 1fr; }
  .class-art { position: absolute; inset: 0 0 130px; opacity: .62; }
  .class-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, #091011 90%); }
  .class-copy { align-self: end; padding: 32px 26px; }
  .boss-grid { grid-template-columns: 1fr; }
  .boss-card { min-height: 540px; }
  .relic-grid { grid-template-columns: 1fr; }
  .relic-grid article, .relic-grid article:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .relic-grid article:last-child { grid-column: auto; border-top: 0; border-bottom: 0; }
  .legacy-art { min-height: 320px; }
  .legacy-copy { padding-inline: 24px; }
  .legacy-stats span { letter-spacing: .06em; }
  footer { flex-wrap: wrap; }
}

@media (hover: none), (max-width: 700px) {
  .button-ghost, .hero-rail { backdrop-filter: none; }
  .page-noise { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art, .scroll-cue i { animation: none; }
  * { transition-duration: .01ms !important; }
  #particle-field { display: none; }
}
