/* Colours and type start from the ARPG's hud/theme.css. Each site sets one accent, so the two read as one world but not one page. */
@font-face {
  font-family: Cinzel;
  src: url(cinzel.woff2) format('woff2');
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #09080b;
  --parch: #efe6d2;
  --muted: #b8ad98;
  --bronze-dim: #5e4a2e;
  --accent: #ff9d3c;
  --accent-ink: #1a0d03;
  --glow: rgba(255, 130, 40, 0.28);
  --panel: #15100c;
  --gutter: max(24px, 5vw, env(safe-area-inset-left, 0px));
  --font-title: Cinzel, 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --font-body: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}

.frost {
  --accent: #8fd3f5;
  --accent-ink: #04141d;
  --glow: rgba(90, 170, 230, 0.26);
  --panel: #0c1419;
  --bronze-dim: #34505e;
  --ink: #070a0e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--parch);
  font: 1.0625rem/1.65 var(--font-body);
  overflow-x: clip;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
p { margin: 0; max-width: 62ch; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--parch); }
:focus-visible { outline: 2px solid var(--parch); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--parch);
  color: var(--ink);
  transform: translateY(-300%);
}
.skip:focus { transform: none; color: var(--ink); }

/* Hero: the art is the first thing anyone sees, and the copy sits in its quiet side. */
.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(100svh, 62vw);
  isolation: isolate;
  overflow: hidden;
  padding: clamp(5rem, 12vh, 8rem) var(--gutter) clamp(3rem, 8vh, 5.5rem);
}
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 4, 6, 0.86) 0%, rgba(5, 4, 6, 0.55) 34%, rgba(5, 4, 6, 0) 62%),
    linear-gradient(0deg, var(--ink) 0%, rgba(5, 4, 6, 0) 34%);
}
.frost .hero { align-items: start; min-height: max(min(100svh, 62vw), 640px); }
.frost .hero-art img { object-position: 50% 100%; }
.frost .hero::before {
  background:
    linear-gradient(180deg, rgba(4, 7, 11, 0.9) 0%, rgba(4, 7, 11, 0.62) 38%, rgba(4, 7, 11, 0) 60%),
    linear-gradient(0deg, var(--ink) 0%, rgba(4, 7, 11, 0) 14%);
}

.hero-copy { display: grid; gap: 1.25rem; max-width: 640px; justify-items: start; }
.frost .hero-copy { max-width: 900px; }
.frost .hero h1 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); }
.wordmark { width: min(100%, 340px); height: auto; }
.mark-link { display: block; width: min(100%, 200px); }
.mark-link .wordmark { width: 100%; }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8); }

.status {
  display: inline-block;
  padding: 0.2rem 0.8rem;
  border: 1px solid var(--accent);
  background: rgba(0, 0, 0, 0.55);
  color: var(--accent);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Tells the visitor which pictures are illustrations and which are the game. */
.art-tag {
  position: absolute;
  right: var(--gutter);
  bottom: 1rem;
  padding: 0.1rem 0.6rem;
  background: rgba(0, 0, 0, 0.7);
  color: var(--parch);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border: 1px solid var(--accent);
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 34px var(--glow); }
.btn-primary:hover { background: var(--parch); border-color: var(--parch); color: var(--ink); }
.btn-ghost { background: rgba(0, 0, 0, 0.5); color: var(--parch); }
.btn-ghost:hover { background: var(--accent); color: var(--accent-ink); }

/* Sections */
.band { padding: clamp(4rem, 9vw, 7.5rem) var(--gutter); }
.band-tight { padding-block-end: 0; }
.heading { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.kicker {
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.note { color: var(--muted); font-size: 0.9375rem; }
.band-note { padding: 0.75rem var(--gutter) 0; }

/* The climb: five acts as tall panels. Every caption is always visible, hover only gives one more room. */
.acts { display: flex; gap: 4px; min-height: clamp(460px, 64vh, 660px); }
.act {
  position: relative;
  display: grid;
  flex: 1 1 0;
  align-content: end;
  gap: 0.4rem;
  min-width: 0;
  padding: 1.25rem;
  overflow: hidden;
  isolation: isolate;
  transition: flex-grow 0.5s ease;
}
.act:hover { flex-grow: 1.7; }
.act img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.act::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(4, 3, 5, 0.97) 0%, rgba(4, 3, 5, 0.8) 38%, rgba(4, 3, 5, 0) 74%);
}
.act h3 { min-height: 2.24em; display: flex; align-items: end; }
.act p { font-size: 0.9375rem; line-height: 1.45; min-height: 2.9em; }
.act-num, .act-boss { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.act-num { color: var(--accent); }
.act-boss { color: var(--parch); }

/* Facts */
.facts { display: grid; gap: 1.25rem; margin-top: 1.75rem; }
.facts li { padding-left: 1rem; border-left: 2px solid var(--accent); }
.facts-row { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; }
.facts b { display: block; font-family: var(--font-title); font-size: 1.0625rem; }

/* Sovereigns stand on the page itself, with light behind them. */
.sovereigns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem) 1rem; margin-bottom: 2rem; }
.sovereign { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem; justify-items: center; text-align: center; align-content: start; }
.sovereign-art {
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  background: radial-gradient(ellipse 58% 55% at 50% 58%, var(--glow), transparent 72%);
}
.sovereign img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; transition: transform 0.4s ease; }
.sovereign:hover img { transform: scale(1.04); }
.sovereign-height { color: var(--accent); font-family: var(--font-title); font-size: 1.5rem; font-weight: 600; }
.sovereign p { color: var(--muted); font-size: 0.9375rem; line-height: 1.45; }

/* Peoples */
.peoples { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1.5rem 0.75rem; margin-bottom: 1.5rem; }
.person { display: grid; gap: 0.15rem; justify-items: center; text-align: center; }
.person img { width: 100%; height: auto; }
.person b { font-family: var(--font-title); }
.person span { color: var(--muted); font-size: 0.875rem; line-height: 1.35; }

/* Two games */
.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.game {
  position: relative;
  display: grid;
  align-content: end;
  gap: 1rem;
  justify-items: start;
  min-height: clamp(480px, 70vh, 680px);
  padding: clamp(1.5rem, 4vw, 3.5rem);
  overflow: hidden;
  isolation: isolate;
}
.game > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.game:hover > img { transform: scale(1.03); }
.game::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(4, 3, 5, 0.96) 0%, rgba(4, 3, 5, 0.76) 42%, rgba(4, 3, 5, 0.1) 78%);
}

/* MMO feature rows */
.feature { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.feature + .feature { margin-top: clamp(3.5rem, 7vw, 6rem); }
.feature:nth-of-type(even) > img { order: 2; }
.feature > img { width: 100%; height: auto; border: 1px solid var(--bronze-dim); box-shadow: 0 0 70px var(--glow); }
.feature-copy { display: grid; gap: 1rem; }
.feature-copy h3 { font-size: clamp(1.75rem, 3.2vw, 2.75rem); }

/* The city runs edge to edge: this page is about a place, where the ARPG page is about a climb. */
.city {
  position: relative;
  display: grid;
  align-content: end;
  gap: 1rem;
  min-height: clamp(520px, 80vh, 820px);
  padding: clamp(2rem, 6vw, 5rem) var(--gutter);
  isolation: isolate;
  overflow: hidden;
}
.city > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.city::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(4, 7, 11, 0.96) 0%, rgba(4, 7, 11, 0.74) 34%, rgba(4, 7, 11, 0) 66%);
}
.city h2 { max-width: 18ch; }

.roster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--bronze-dim); border: 1px solid var(--bronze-dim); }
.roster li { display: grid; gap: 0.3rem; align-content: start; padding: 1.25rem; background: var(--panel); }
.roster b { font-family: var(--font-title); font-size: 1.125rem; color: var(--accent); }
.roster span { font-size: 0.9375rem; line-height: 1.45; }

.factions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.faction {
  position: relative;
  display: grid;
  gap: 0.6rem;
  align-content: end;
  min-height: 420px;
  padding: 1.5rem;
  overflow: hidden;
  isolation: isolate;
}
.faction > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.faction::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(4, 7, 11, 0.97) 0%, rgba(4, 7, 11, 0.8) 44%, rgba(4, 7, 11, 0.1) 80%);
}

.today { background: var(--panel); border-block: 1px solid var(--bronze-dim); }
.today ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem 2rem; margin-block: 1.5rem; }
.today li { padding-left: 1rem; border-left: 2px solid var(--accent); font-size: 0.9375rem; }

.foot {
  display: grid;
  gap: 0.75rem;
  padding: 2.5rem var(--gutter);
  border-top: 1px solid var(--bronze-dim);
  color: var(--muted);
  font-size: 0.875rem;
}
.foot-row { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; }
.foot p { max-width: none; }

.single { display: grid; align-content: center; min-height: 100svh; padding: 24px; }
.single-copy { display: grid; gap: 1.25rem; justify-items: center; text-align: center; }

/* Motion is decoration only, runs under five seconds and stops by itself. */
@media (prefers-reduced-motion: no-preference) {
  .hero-art img { animation: settle 4.5s ease-out both; }
  .hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
      radial-gradient(2px 2px at 18% 80%, var(--accent), transparent),
      radial-gradient(1.5px 1.5px at 42% 92%, var(--accent), transparent),
      radial-gradient(2px 2px at 63% 74%, var(--accent), transparent),
      radial-gradient(1.5px 1.5px at 78% 88%, var(--accent), transparent),
      radial-gradient(2.5px 2.5px at 88% 68%, var(--accent), transparent),
      radial-gradient(1.5px 1.5px at 30% 62%, var(--accent), transparent);
    animation: drift 4.5s ease-out both;
  }
  @keyframes settle { from { transform: scale(1.05); } to { transform: scale(1); } }
  @keyframes drift {
    0% { transform: translateY(6%); opacity: 0; }
    25% { opacity: 0.9; }
    100% { transform: translateY(-30%); opacity: 0; }
  }
  @supports (animation-timeline: view()) {
    .rise { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media (max-width: 1100px) {
  .peoples { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .today ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero { min-height: 100svh; padding-block-end: 2.5rem; }
  .hero::before {
    background: linear-gradient(0deg, var(--ink) 4%, rgba(5, 4, 6, 0.84) 40%, rgba(5, 4, 6, 0) 66%);
  }
  .hero .wordmark { position: absolute; top: 20px; left: var(--gutter); width: 170px; }
  .hero .mark-link { position: absolute; top: 20px; left: var(--gutter); width: 170px; }
  .hero .mark-link .wordmark { position: static; width: 100%; }
  .frost .hero { padding-block-start: 6.5rem; }
  .frost .hero::before {
    background:
      linear-gradient(180deg, rgba(4, 7, 11, 0.95) 0%, rgba(4, 7, 11, 0.8) 46%, rgba(4, 7, 11, 0) 68%),
      linear-gradient(0deg, var(--ink) 0%, rgba(4, 7, 11, 0) 10%);
  }
  .actions .btn { flex: 1 1 100%; text-align: center; }
  .acts { flex-direction: column; }
  .act { flex: none; min-height: 250px; }
  .act:hover { flex-grow: 0; }
  .act h3, .act p { min-height: 0; }
  .facts-row { grid-template-columns: minmax(0, 1fr); }
  .feature, .games, .factions { grid-template-columns: minmax(0, 1fr); }
  .feature:nth-of-type(even) > img { order: 0; }
  .game { min-height: 460px; }
  .faction { min-height: 320px; }
  .sovereigns, .roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
