:root {
  --ink: #0e1419;
  --ink-soft: #131c23;
  --surface: #18232c;
  --stone: #e6e9ec;
  --muted: #9faeba;
  --steel: #a8bdd2;
  --ember: #ff8a3c;
  --rule: rgba(230, 233, 236, .18);
  --shell: min(92vw, 1540px);
  --serif: "Newsreader", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--stone);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background: radial-gradient(circle at 78% 8%, rgba(92, 130, 154, .18), transparent 34%), linear-gradient(120deg, transparent 0 48%, rgba(255,255,255,.012) 48% 49%, transparent 49%);
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ember); outline-offset: 4px; }
.shell { width: var(--shell); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 1rem; left: 1rem; z-index: 100; padding: .7rem 1rem; background: var(--stone); color: var(--ink); transform: translateY(-200%); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--rule); background: rgba(14, 20, 25, .88); backdrop-filter: blur(18px); }
.site-header__inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand img { width: clamp(205px, 18vw, 285px); height: auto; }
.site-nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.5vw, 3.25rem); text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 500; }
.site-nav a { text-decoration: none; position: relative; }
.site-nav > a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -.7rem; height: 2px; background: var(--ember); transition: right .2s ease; }
.site-nav > a:hover::after, .site-nav > a:focus-visible::after { right: 0; }
.site-nav a[aria-current="page"]::after { right: 0; }
.nav-cta { border: 1px solid var(--rule); padding: .65rem .85rem; }
.menu-toggle { display: none; border: 0; background: transparent; color: var(--stone); padding: .5rem; }
.menu-toggle span:not(.sr-only) { display: block; width: 28px; height: 1px; background: currentColor; margin: 6px 0; }

.hero { min-height: calc(100svh - 76px); display: grid; grid-template-columns: .84fr 1.16fr; gap: clamp(2rem, 4vw, 6rem); align-items: center; padding-block: clamp(4rem, 8vw, 8.5rem); }
.eyebrow { display: flex; align-items: center; gap: 1.1rem; margin: 0 0 1.75rem; text-transform: uppercase; letter-spacing: .2em; color: var(--muted); font-size: .75rem; }
.eyebrow span { width: 42px; height: 1px; background: var(--stone); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, .post-card h3 { font-family: var(--serif); font-weight: 400; }
h1 { margin-bottom: 1.5rem; max-width: 12ch; font-size: clamp(3.65rem, 6.7vw, 7.6rem); line-height: .9; letter-spacing: -.045em; }
.hero__intro { max-width: 34rem; color: #bdc7cf; font-size: clamp(1.05rem, 1.35vw, 1.35rem); line-height: 1.45; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 2.25rem; padding: .75rem 1.5rem; border: 1px solid var(--rule); text-decoration: none; text-transform: uppercase; letter-spacing: .16em; font-size: .76rem; font-weight: 600; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button--primary { background: var(--steel); color: var(--ink); border-color: var(--steel); }
.button--primary:hover { background: var(--stone); }
.button--secondary:hover { border-color: var(--steel); }
.hero-media { margin: 0; position: relative; overflow: hidden; border: 1px solid var(--rule); }
.hero-media img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.hero-media figcaption { position: absolute; left: 1rem; bottom: 1rem; padding: .25rem .55rem; background: rgba(14,20,25,.82); text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; }

.principles { display: grid; grid-template-columns: repeat(3, 1fr) .72fr; border-block: 1px solid var(--rule); }
.principles > * { margin: 0; padding: 1.4rem clamp(1rem, 2vw, 2.2rem); border-right: 1px solid var(--rule); }
.principles > *:last-child { border: 0; }
.principles strong, .principles span { display: block; text-transform: uppercase; letter-spacing: .18em; }
.principles strong { font-size: .74rem; }
.principles span, .principles p { color: var(--muted); font-size: .65rem; }
.principles p { text-transform: uppercase; letter-spacing: .16em; }

.section { padding-block: clamp(6rem, 11vw, 11rem); border-bottom: 1px solid var(--rule); scroll-margin-top: 76px; }
.game { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8vw; }
.section-heading h2, .section-bar h2, .about h2, .contact h2 { font-size: clamp(3.4rem, 7vw, 7.8rem); line-height: .92; letter-spacing: -.04em; margin: 0; }
.game__body { max-width: 48rem; }
.game__lead { font-family: var(--serif); font-size: clamp(2rem, 3.3vw, 3.75rem); line-height: 1.08; }
.game__body > p:not(.game__lead) { max-width: 45rem; color: var(--muted); font-size: 1.1rem; }

.section-bar { display: flex; justify-content: space-between; align-items: end; gap: 4rem; margin-bottom: 4rem; }
.section-bar h2 { font-size: clamp(3rem, 5vw, 5.5rem); }
.section-bar > p { max-width: 25rem; color: var(--muted); }
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.post-card { padding: clamp(1.25rem, 2vw, 2rem); background: var(--ink); }
.post-card__image { overflow: hidden; margin-bottom: 1.35rem; background: var(--surface); }
.post-card__image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform .45s ease; }
.post-card:hover .post-card__image img { transform: scale(1.025); }
.post-card__meta { text-transform: uppercase; letter-spacing: .15em; color: var(--muted); font-size: .7rem; }
.post-card__meta span, .post-card > a { color: var(--ember); }
.post-card h3 { margin-bottom: .5rem; font-size: clamp(1.85rem, 2.5vw, 3rem); line-height: 1; }
.post-card > p:not(.post-card__meta) { color: var(--muted); }
.post-card > a, .text-link { display: inline-flex; gap: 1.5rem; text-underline-offset: .35rem; text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 600; }

.about { display: grid; grid-template-columns: 1fr 1fr; gap: 10vw; }
.about h2 { font-size: clamp(3.5rem, 6vw, 6.5rem); max-width: 8ch; }
.about__copy { max-width: 38rem; padding-top: 3.75rem; }
.about__copy h3 { text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; }
.about__copy p { color: #bdc7cf; font-size: clamp(1.15rem, 1.8vw, 1.65rem); line-height: 1.45; }

.contact { display: grid; grid-template-columns: 1.25fr .75fr; align-items: end; gap: 8vw; }
.contact h2 { max-width: 11ch; }
.contact__content > p:last-child { max-width: 45rem; color: var(--muted); font-size: 1.1rem; }
.contact__actions { display: flex; flex-direction: column; align-items: start; gap: 1.5rem; }

.site-footer { min-height: 130px; display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 2rem; align-items: center; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: .66rem; }
.site-footer p { margin: 0; }
.site-footer a { text-underline-offset: .3rem; }
.footer-links { display: flex; gap: 1.25rem; }
.toast { position: fixed; right: 1.25rem; bottom: 1.25rem; max-width: min(90vw, 360px); padding: .9rem 1rem; background: var(--stone); color: var(--ink); box-shadow: 0 12px 40px rgba(0,0,0,.35); opacity: 0; transform: translateY(1rem); pointer-events: none; transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: none; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Game page */
.game-hero { min-height: calc(100svh - 76px); display: grid; grid-template-columns: .82fr 1.18fr; gap: clamp(2rem, 5vw, 7rem); align-items: center; padding-block: clamp(4rem, 8vw, 8rem); }
.game-hero h1 { max-width: none; margin-bottom: 1rem; }
.game-hero__lead { max-width: 25ch; font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 3.4rem); line-height: 1.05; }
.game-hero__copy > p:not(.eyebrow, .game-hero__lead) { max-width: 40rem; color: var(--muted); font-size: 1.08rem; }
.manifesto__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 10vw; }
.manifesto h2 { max-width: 11ch; margin: 0; font: 400 clamp(3rem, 5.8vw, 6.5rem)/.95 var(--serif); letter-spacing: -.04em; }
.manifesto__grid > div { max-width: 42rem; color: #bdc7cf; font-size: clamp(1.1rem, 1.5vw, 1.35rem); }
.pillar-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule); }
.pillar-grid article { min-height: 330px; padding: clamp(1.4rem, 2.5vw, 2.5rem); border-right: 1px solid var(--rule); }
.pillar-grid article:last-child { border: 0; }
.pillar-grid span { color: var(--ember); font-size: .72rem; letter-spacing: .16em; }
.pillar-grid h3 { margin-top: 5rem; font: 400 clamp(1.7rem, 2.2vw, 2.6rem)/1 var(--serif); }
.pillar-grid p { color: var(--muted); }
.gallery-grid { display: grid; grid-template-columns: 1.35fr .825fr .825fr; gap: 1rem; }
.gallery-grid figure { margin: 0; border: 1px solid var(--rule); background: var(--surface); }
.gallery-grid img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; }
.gallery-grid figure:not(:first-child) img { aspect-ratio: 4/5; }
.gallery-grid figcaption { padding: .8rem 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; }
.platform { display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 8vw; }
.platform h2 { margin-bottom: 1rem; font: 400 clamp(3.2rem, 6vw, 6.5rem)/.95 var(--serif); letter-spacing: -.04em; }
.platform > div:first-child > p:last-child { max-width: 45rem; color: var(--muted); font-size: 1.1rem; }

/* Articles and legal */
.article { padding-block: clamp(4rem, 8vw, 8rem); }
.article-header { max-width: 1100px; margin-inline: auto; text-align: center; }
.article-header .eyebrow { justify-content: center; margin-top: 3rem; }
.article-back { color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; }
.article-header h1 { max-width: 13ch; margin-inline: auto; font-size: clamp(3.5rem, 7.2vw, 7.7rem); }
.article-deck { max-width: 45rem; margin: 0 auto 1.5rem; color: #bdc7cf; font: 400 clamp(1.4rem, 2.1vw, 2rem)/1.25 var(--serif); }
.article-meta { color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; }
.article-hero { max-width: 1280px; margin: clamp(3rem, 7vw, 7rem) auto; }
.article-hero img { width: 100%; max-height: 720px; object-fit: cover; border: 1px solid var(--rule); }
.article-hero figcaption { margin-top: .7rem; color: var(--muted); font-size: .75rem; }
.article-body { max-width: 760px; margin-inline: auto; color: #c2ccd3; font-size: clamp(1.05rem, 1.35vw, 1.22rem); line-height: 1.78; }
.article-body .article-lead { color: var(--stone); font: 400 clamp(1.7rem, 2.6vw, 2.6rem)/1.25 var(--serif); }
.article-body h2 { margin: 3.75rem 0 1rem; color: var(--stone); font-size: clamp(2rem, 3.2vw, 3.25rem); line-height: 1; }
.article-body a { color: var(--steel); }
.article-cta { max-width: 960px; margin: clamp(5rem, 10vw, 10rem) auto 0; padding: clamp(2rem, 4vw, 4rem); border-block: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 3rem; }
.article-cta > p { max-width: 14ch; margin: 0; font: 400 clamp(2rem, 3.5vw, 3.8rem)/1 var(--serif); }
.article-cta > div { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.legal { min-height: 70svh; padding-block: clamp(5rem, 10vw, 10rem); }
.legal > h1 { max-width: none; font-size: clamp(4rem, 8vw, 8rem); }
.legal > .article-body { margin: 4rem 0 0; }
.error-page { min-height: 100svh; display: grid; align-items: center; }
.error-content { padding-block: 4rem; }
.error-content > img { margin-bottom: 3rem; }
.error-content h1 { max-width: 10ch; }
.error-content > p:not(.eyebrow) { color: var(--muted); font-size: 1.2rem; }

@media (max-width: 920px) {
  .menu-toggle { display: block; z-index: 2; }
  .site-nav { position: fixed; inset: 76px 0 auto; display: grid; gap: 0; padding: 1.25rem 4vw 2rem; background: var(--ink-soft); border-bottom: 1px solid var(--rule); transform: translateY(-120%); visibility: hidden; transition: transform .25s ease, visibility .25s; }
  .site-nav.is-open { transform: none; visibility: visible; }
  .site-nav a { padding: .9rem 0; }
  .nav-cta { border: 0; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-media { order: 2; }
  .principles { grid-template-columns: repeat(3, 1fr); }
  .principles p { display: none; }
  .game, .about, .contact, .game-hero, .manifesto__grid, .platform { grid-template-columns: 1fr; }
  .about__copy { padding-top: 0; }
  .post-grid { grid-template-columns: 1fr; }
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .pillar-grid article:nth-child(2) { border-right: 0; }
  .pillar-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid figure:first-child { grid-column: 1 / -1; }
  .article-cta { align-items: start; flex-direction: column; }
  .section-bar { display: block; }
  .section-bar > p { margin-top: 1.5rem; }
  .site-footer { grid-template-columns: auto 1fr auto; }
  .site-footer p:nth-of-type(2) { display: none; }
}

@media (max-width: 600px) {
  :root { --shell: min(91vw, 520px); }
  .site-header__inner { min-height: 68px; }
  .site-nav { inset-block-start: 68px; }
  .brand img { width: 205px; }
  .hero { padding-block: 3.5rem 4rem; gap: 2.5rem; }
  h1 { font-size: clamp(3.2rem, 15vw, 5rem); }
  .hero__actions { display: grid; }
  .button { width: 100%; }
  .principles { grid-template-columns: 1fr; }
  .principles > * { border-right: 0; border-bottom: 1px solid var(--rule); }
  .principles > *:last-of-type { border: 0; }
  .section { padding-block: 5.5rem; }
  .section-heading h2, .section-bar h2, .about h2, .contact h2 { font-size: clamp(3rem, 15vw, 4.75rem); }
  .game { gap: 2.5rem; }
  .game-hero { padding-block: 3.5rem 5rem; }
  .game-hero h1 { font-size: clamp(4rem, 21vw, 7rem); }
  .post-card { display: grid; grid-template-columns: 39% 1fr; column-gap: 1rem; }
  .post-card__image { grid-row: 1 / span 5; margin: 0; }
  .post-card__image img { height: 100%; min-height: 185px; }
  .post-card h3 { font-size: 1.55rem; }
  .post-card > p:not(.post-card__meta) { font-size: .9rem; line-height: 1.4; }
  .site-footer { grid-template-columns: auto 1fr; padding-block: 2rem; }
  .footer-links { grid-column: 1 / -1; }
  .pillar-grid, .gallery-grid { grid-template-columns: 1fr; }
  .pillar-grid article { min-height: auto; border-right: 0; border-bottom: 1px solid var(--rule); }
  .pillar-grid article:nth-child(3) { border-bottom: 1px solid var(--rule); }
  .pillar-grid h3 { margin-top: 3rem; }
  .gallery-grid figure:first-child { grid-column: auto; }
  .gallery-grid img, .gallery-grid figure:not(:first-child) img { min-height: 0; aspect-ratio: 16/10; }
  .article-header { text-align: left; }
  .article-header .eyebrow { justify-content: flex-start; }
  .article-header h1 { margin-inline: 0; font-size: clamp(3.25rem, 15vw, 5rem); }
  .article-deck { margin-inline: 0; }
  .article-cta > div { align-items: stretch; width: 100%; }
  .article-cta .text-link { padding-block: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

.article-video video { display: block; width: 100%; height: auto; background: #000; border: 1px solid var(--rule); }
.article-inline-media { margin: 2.5rem 0 3rem; }
.article-inline-media img { width: 100%; height: auto; border: 1px solid var(--rule); }
.article-inline-media figcaption { margin-top: .7rem; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.article-diagram img { background: var(--surface); }

/* In-game imagery for the four Helrift pillars */
.pillar-grid article { padding: 0; overflow: hidden; }
.pillar-grid article > img { display: block; width: 100%; height: clamp(150px, 15vw, 230px); object-fit: cover; object-position: center; border-bottom: 1px solid var(--rule); }
.pillar-grid__copy { padding: clamp(1.4rem, 2.5vw, 2.5rem); }
.pillar-grid h3 { margin-top: 2rem; }
.article-video { max-width: 1100px; }
.article-video video { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
.article-video__download { display: inline-block; margin-top: .8rem; color: var(--steel); font-size: .82rem; }
@media (max-width: 600px) { .pillar-grid article > img { height: auto; aspect-ratio: 16 / 9; } }
