@font-face {
  font-family: 'Jersey 15';
  src: url('assets/fonts/Jersey15-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('assets/fonts/SourceSans3-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --yellow: #fff200;
  --gold: #c89b39;
  --cream: #f4f0e8;
  --copy: #eeeae2;
  --gutter: clamp(24px, 3vw, 35px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 0, #30322c 0, #171815 55%, #0c0d0b 100%);
  color: var(--cream);
  font: 17px/1.5 'Source Sans 3', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img { display: block; max-width: 100%; height: auto; }
figure, h1, h2, p { margin: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
:focus-visible { outline: 3px solid #fff45c; outline-offset: 4px; }

.site-canvas {
  position: relative;
  width: 100%;
  margin-inline: auto;
  overflow: hidden;
  border-inline: 3px solid #141510;
  background: #191a17;
  box-shadow: 0 0 0 1px #56584f, 0 0 45px #000d;
}
.page-shell { width: calc(100% - clamp(60px, 6vw, 110px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 12px; transform: translateY(-160%); padding: 9px 14px; background: #fff; color: #111; }
.skip-link:focus { transform: none; }

/* Forged navigation rail from the reference. */
.site-header { position: absolute; z-index: 20; inset: 0 0 auto; height: 155px; pointer-events: none; }
.header-inner { position: relative; height: 155px; display: flex; align-items: flex-start; padding-top: 57px; pointer-events: auto; }
.site-nav { width: 100%; display: grid; grid-template-columns: 1fr 1fr 194px 1fr 1fr; gap: 10px; align-items: center; }
.brand {
  position: absolute;
  z-index: 3;
  top: 7px;
  left: 50%;
  width: 194px;
  height: 140px;
  transform: translateX(-50%);
  filter: drop-shadow(0 6px 5px #000c) drop-shadow(0 0 10px #941c12aa);
}
.brand img { width: 194px; height: 140px; object-fit: contain; }
.nav-button {
  position: relative;
  min-height: 55px;
  display: grid;
  place-items: center;
  border: 8px solid transparent;
  border-image: url('assets/impact-metal-frame-nine-slice.webp') 66 70 / 8px / 0 stretch;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(255,255,255,.07), transparent 56%),
    linear-gradient(#42433d, #292a25 52%, #1a1b18);
  box-shadow: inset 0 -10px 15px #0008, 0 5px 10px #000b;
  color: var(--yellow);
  font: 400 25px/1 'Jersey 15', sans-serif;
  letter-spacing: .045em;
  text-transform: uppercase;
  text-shadow: 2px 2px #000;
}
.nav-button.active { background: radial-gradient(ellipse at 50% 20%, rgba(255,115,82,.16), transparent 58%), linear-gradient(#76241f, #491411 58%, #32100e); }
.nav-button:hover { filter: brightness(1.16); }
.menu-toggle { display: none; }

/* Courtyard opening: the same offset two-panel composition as the concept. */
.hero {
  min-height: clamp(575px, 38vw, 730px);
  background: url('assets/courtyard-background-1920.webp') center 48% / cover no-repeat;
}
.hero-layout {
  width: calc(100% - clamp(70px, 7vw, 120px));
  min-height: clamp(575px, 38vw, 730px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(38px, 5vw, 95px);
  align-items: start;
  padding-top: 160px;
  padding-bottom: clamp(32px, 4vw, 70px);
}
.metal-panel,
.media-frame {
  position: relative;
  border: 15px solid transparent;
  border-image: url('assets/impact-metal-frame-nine-slice.webp') 66 70 / 15px / 0 stretch;
  background:
    radial-gradient(ellipse at 20% 12%, rgba(124, 123, 101, .09), transparent 48%),
    linear-gradient(115deg, rgba(13, 14, 12, .94), rgba(27, 28, 24, .9));
  filter: drop-shadow(0 9px 8px #0009);
}
.hero-copy { align-self: start; width: min(100%, 620px); margin-top: clamp(80px, 8vw, 140px); padding: clamp(17px, 1.8vw, 28px) clamp(16px, 2vw, 30px) clamp(20px, 2vw, 30px); transform: none; }
.hero-copy h1,
.hero-copy p,
.hero-question h2,
.feature-copy h2,
.play-inner h2 {
  color: var(--yellow);
  font-family: 'Jersey 15', sans-serif;
  font-weight: 400;
  letter-spacing: .03em;
  text-shadow: 3px 3px #000;
}
.hero-copy h1 { font-size: clamp(28px, 2.1vw, 40px); line-height: 1.12; }
.hero-copy p { margin-top: 7px; font-size: clamp(28px, 2.1vw, 40px); line-height: 1.12; }
.hero-question { min-height: 386px; overflow: hidden; }
.hero-question { width: min(100%, 680px); min-height: clamp(386px, 28vw, 540px); justify-self: end; transform: none; }
.hero-question h2 { position: relative; z-index: 2; width: 76%; padding: clamp(12px, 1.5vw, 25px) 0 0 clamp(26px, 2.4vw, 44px); font-size: clamp(40px, 2.7vw, 56px); line-height: .96; }
.hero-question img { position: absolute; z-index: 1; right: 0; bottom: -2px; width: 51%; max-height: 95%; object-fit: contain; object-position: bottom; }

/* Full-width metal beams divide the page into the same bounded scenes. */
.section-divider {
  position: relative;
  z-index: 8;
  height: 31px;
  margin-block: -1px;
  border: 0 31px solid transparent;
  border-image: url('assets/impact-metal-divider-strip.webp') 0 95 fill / 0 31px / 0 stretch;
  filter: drop-shadow(0 4px 5px #000b);
}
.section-divider span { display: none; }
.section-divider::before,
.section-divider::after {
  content: none;
}

/* Every content scene uses the reference's image/copy split. */
.feature {
  position: relative;
  background-color: #20211e;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 2px #262721;
}
#bosses {
  background-image:
    linear-gradient(90deg, rgba(13,14,12,.48), rgba(13,14,12,.82) 56%, rgba(13,14,12,.9)),
    url('assets/castle-great-hall-background-1920.webp');
  background-position: center 48%;
}
#community {
  background-image:
    linear-gradient(270deg, rgba(14,15,13,.88), rgba(14,15,13,.74) 46%, rgba(12,13,11,.46)),
    url('assets/castle-garden-background-1920.webp');
  background-position: center 58%;
}
#plugins {
  background-image:
    linear-gradient(270deg, rgba(12,13,11,.46), rgba(14,15,13,.82) 58%, rgba(14,15,13,.9)),
    url('assets/stone-hall-1920.webp');
  background-position: center 45%;
}
#clans {
  background-image:
    linear-gradient(270deg, rgba(14,15,13,.9), rgba(14,15,13,.77) 48%, rgba(12,13,11,.46)),
    url('assets/castle-wall-background-1920.webp');
  background-position: center 50%;
}
#blackjack {
  background-image:
    linear-gradient(270deg, rgba(12,13,11,.48), rgba(14,15,13,.83) 58%, rgba(14,15,13,.91)),
    url('assets/castle-wall-background-1920.webp');
  background-position: center 48%;
}
#flower-poker {
  background-image:
    linear-gradient(90deg, rgba(14,15,13,.9), rgba(14,15,13,.78) 46%, rgba(13,14,12,.5)),
    url('assets/stone-hall-1920.webp');
  background-position: center 45%;
}
#events {
  background-image:
    linear-gradient(270deg, rgba(12,13,11,.46), rgba(14,15,13,.82) 58%, rgba(14,15,13,.9)),
    url('assets/castle-great-hall-background-1920.webp');
  background-position: center 48%;
}
#pvp-leagues {
  background-image:
    linear-gradient(270deg, rgba(14,15,13,.9), rgba(14,15,13,.76) 48%, rgba(12,13,11,.46)),
    url('assets/castle-garden-background-1920.webp');
  background-position: center 58%;
}
#latest-additions {
  background-image: linear-gradient(90deg, rgba(14,15,13,.9), rgba(14,15,13,.78) 48%, rgba(12,13,11,.48)), url('assets/castle-great-hall-background-1920.webp');
}
.latest-gallery .gallery-slide { object-fit: cover; object-position: 50% 35%; }
.latest-gallery .gallery-slide[data-title="Sol Heredit"] { object-position: center top; }
.feature-copy .addition-title { color: var(--cream); font-size: clamp(23px, 2vw, 30px); line-height: 1.25; max-width: 30ch; }
.feature-row {
  max-width: 1450px;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  gap: clamp(30px, 3vw, 60px);
  align-items: center;
  padding-block: clamp(14px, 1.2vw, 22px);
}
.feature-row.reverse { grid-template-columns: 1fr 1.12fr; }
.feature-row:not(.reverse) .media-frame { width: min(100%, 620px); justify-self: start; }
.feature-row.reverse .media-frame { width: min(100%, 620px); justify-self: end; }
.feature-row:not(.reverse) .feature-copy { transform: none; }
.media-frame { overflow: hidden; background: #10110e; }
.media-frame img { width: 100%; aspect-ratio: 1.56 / 1; object-fit: cover; }
[data-gallery] { isolation: isolate; }
.gallery-slides { position: relative; aspect-ratio: 1.56 / 1; overflow: hidden; background: #0d0e0c; }
.gallery-slide { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; visibility: hidden; object-fit: cover; transition: opacity 180ms ease; }
.gallery-slide.is-active { z-index: 1; opacity: 1; visibility: visible; }
.gallery-arrow,
.gallery-dots { display: none; }
.js .gallery-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 42px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid #9d8752;
  background: rgba(13, 14, 12, .82);
  box-shadow: inset 0 0 0 2px #262720, 0 4px 9px #000b;
  color: #fff200;
  cursor: pointer;
}
.js .gallery-arrow:hover { background: rgba(64, 54, 38, .94); }
.gallery-arrow svg { width: 26px; height: 26px; stroke-width: 2.5; }
.gallery-previous { left: 8px; }
.gallery-next { right: 8px; }
.js .gallery-dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 11px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
  padding: 6px 9px;
  border: 1px solid rgba(177, 151, 88, .72);
  background: rgba(10, 11, 9, .76);
  box-shadow: 0 3px 8px #000a;
}
.gallery-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid #bca76b;
  border-radius: 50%;
  background: #37382f;
  cursor: pointer;
}
.gallery-dots button.is-active { background: #fff200; box-shadow: 0 0 5px #fff200aa; }
.gallery-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.population-art {
  min-height: 100%;
  aspect-ratio: 1.56 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(0,0,0,.08), rgba(5,6,4,.7) 76%),
    url('assets/castle-garden-background-1920.webp') center / cover no-repeat;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 #000, 0 0 18px #000;
}
.population-art strong { color: var(--yellow); font: 400 clamp(78px, 8vw, 142px)/.8 'Jersey 15', sans-serif; letter-spacing: .035em; }
.population-art span { margin-top: 20px; color: #fff; font: 400 clamp(27px, 2.6vw, 45px)/1 'Jersey 15', sans-serif; letter-spacing: .055em; }
.feature-row:not(.reverse) .clan-frame {
  width: min(321px, 100%);
  justify-self: center;
}
.media-frame.clan-frame img {
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  image-rendering: pixelated;
}
.feature-copy { padding: clamp(12px, 2vw, 34px); text-shadow: 0 2px 4px #000; }
.feature-copy h2 { font-size: clamp(40px, 3.2vw, 60px); line-height: 1.03; text-wrap: balance; }
.feature-copy p { max-width: 48ch; color: var(--copy); font-size: clamp(17px, 1.05vw, 20px); line-height: 1.56; }
.feature-copy p + p { margin-top: 17px; }
.gold-rule { display: block; width: min(100%, 440px); height: 2px; margin: 21px 0; background: linear-gradient(90deg, #d5a440, #84795b 78%, transparent); box-shadow: 0 1px #000; }

.modes {
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(14,15,13,.86), rgba(14,15,13,.76) 46%, rgba(12,13,11,.48)),
    url('assets/courtyard-background-1920.webp') center 73% / cover no-repeat;
}
.modes .feature-row { min-height: 0; position: relative; z-index: 1; }
.modes .feature-row { grid-template-columns: 1fr 1.05fr; gap: clamp(30px, 3vw, 60px); padding-block: clamp(14px, 1.2vw, 22px); }
.modes .feature-copy { padding-left: 30px; }
.modes-frame { width: 100%; transform: none; }
.modes-frame img {
  aspect-ratio: auto;
  object-fit: contain;
  clip-path: inset(3px 7px 5px 3px round 42px);
  background: #11120f;
}

.play-section {
  background:
    linear-gradient(rgba(18, 19, 16, .63), rgba(18, 19, 16, .76)),
    url('assets/courtyard-background-1920.webp') center 66% / cover;
}
.play-inner { min-height: clamp(290px, 25vw, 460px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.play-inner h2 { font-size: clamp(45px, 4.6vw, 61px); line-height: 1; }
.play-inner p { margin-top: 8px; font-size: 19px; }
.download-button { min-width: 220px; margin-top: 19px; padding: 10px 24px; border: 8px solid transparent; border-image: url('assets/impact-metal-frame-nine-slice.webp') 66 70 / 8px / 0 stretch; background: linear-gradient(#7c2822, #501512); box-shadow: inset 0 -8px 13px #0006, 0 7px 14px #0009; color: var(--yellow); font: 400 28px/1 'Jersey 15', sans-serif; letter-spacing: .05em; text-transform: uppercase; text-shadow: 2px 2px #000; }
.download-button:hover { filter: brightness(1.18); }
.discord-link { margin-top: 12px; color: #eee6d1; text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 1000px) {
  .site-canvas { width: 100%; border-inline: 0; }
  .site-nav { grid-template-columns: 1fr 1fr 158px 1fr 1fr; }
  .brand, .brand img { width: 156px; }
  .nav-button { font-size: 20px; }
  .page-shell { width: calc(100% - (var(--gutter) * 2)); }
  .hero-layout, .feature-row { gap: 30px; }
}

@media (max-width: 860px) {
  html { scroll-padding-top: 76px; }
  .site-header, .header-inner { height: 76px; }
  .header-inner { justify-content: flex-end; padding-top: 17px; }
  .brand { top: -5px; width: 118px; height: 90px; }
  .brand img { width: 118px; height: 90px; }
  .js .menu-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 5px 10px; border: 7px solid transparent; border-image: url('assets/impact-metal-frame-nine-slice.webp') 66 70 / 7px / 0 stretch; background: #34362f; box-shadow: 0 5px 12px #0008; color: var(--yellow); font: 400 24px/1 'Jersey 15', sans-serif; letter-spacing: .04em; text-transform: uppercase; }
  .site-nav { display: grid; position: absolute; top: 76px; left: 0; right: 0; grid-template-columns: 1fr 1fr; gap: 9px; padding: 13px var(--gutter) 16px; background: rgba(24, 26, 22, .97); border-block: 1px solid #74766d; box-shadow: 0 10px 20px #0008; }
  .js .site-nav { display: none; }
  .js .site-header[data-menu-open] .site-nav { display: grid; }
  .logo-space { display: none; }
  .nav-button { min-height: 44px; font-size: 20px; }
  .hero, .hero-layout { min-height: 0; }
  .hero-layout { width: min(calc(100% - (var(--gutter) * 2)), 1100px); grid-template-columns: 1fr; gap: 25px; padding-top: 94px; padding-bottom: 30px; }
  .metal-panel, .media-frame { border-width: 12px; border-image-width: 12px; }
  .hero-copy { margin-top: 0; padding: 9px 10px; }
  .hero-copy, .hero-question { width: 100%; max-width: none; transform: none; }
  .hero-copy h1 { font-size: 24px; }
  .hero-copy p { font-size: 23px; }
  .hero-question { min-height: 304px; }
  .hero-question h2 { padding: 8px 0 0 10px; font-size: clamp(34px, 9vw, 42px); }
  .hero-question img { width: 48%; max-height: 85%; }
  .section-divider { height: 25px; border-inline-width: 25px; border-image-width: 0 25px; }
  .feature-row,
  .feature-row.reverse { min-height: 0; grid-template-columns: 1fr; gap: 23px; padding-block: 27px; }
  .feature-row.reverse .feature-copy { order: 2; }
  .feature-row.reverse .media-frame { order: 1; }
  .feature-row:not(.reverse) .media-frame,
  .feature-row:not(.reverse) .feature-copy,
  .modes-frame { width: 100%; transform: none; }
  .feature-copy { padding: 8px 5px 14px; }
  .feature-copy h2 { font-size: clamp(35px, 9vw, 43px); }
  .feature-copy p { max-width: none; font-size: 18px; }
  .modes .feature-row { min-height: 0; }
  .feature-row:not(.reverse) .clan-frame { width: min(315px, 100%); justify-self: center; }
}

@media (max-width: 420px) {
  :root { --gutter: 16px; }
  .menu-toggle span { display: none; }
  .site-nav { grid-template-columns: 1fr; }
  .hero { background-image: url('assets/courtyard-background-1200.webp'); background-position: 58% center; }
  .hero-copy h1 { font-size: 22px; }
  .hero-copy p { font-size: 21px; }
  .hero-question { min-height: 280px; }
  .hero-question h2 { font-size: 33px; }
  .feature-copy h2 { font-size: 35px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery-slide { transition: none; }
}
