/* Colours from docs/art/style.md; fonts are the game's own (web/fonts/, OFL). */
@font-face {
  font-family: "Cinzel";
  src: url("fonts/cinzel.woff") format("woff");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("fonts/alegreya-sans.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("fonts/alegreya-sans-bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --navy: #0E1426;
  --navy-2: #151c33;
  --slate: #2A2F3A;
  --walnut: #3B2718;
  --walnut-light: #5C3D24;
  --gold: #C9A24A;
  --gold-bright: #F2D27A;
  --parchment: #E8D6AE;
  --text: #E9E2D0;
  --muted: #B3AC9C;
  --heading: "Cinzel", Georgia, serif;
  --body: "Alegreya Sans", system-ui, sans-serif;
  --gutter: 16px;
  --max: 1120px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { background: var(--navy); }

body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font: 18px/1.55 var(--body);
  overflow-x: hidden;
}

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

h1, h2, h3 { font-family: var(--heading); font-weight: 700; color: var(--parchment); line-height: 1.2; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); margin: 0 0 0.6em; }

a { color: var(--gold-bright); }

:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Hero */

/* The key art (all eight heroes) is shown whole, and the text starts on its ground, below the heroes. */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  isolation: isolate;
}

.hero-art {
  position: relative;
  z-index: -1;
  overflow: hidden;
}
.hero-art img {
  width: 100%;
  height: min(56.6vw, 66svh);
  min-height: 300px;
  object-fit: cover;
  object-position: center 70%;
  animation: drift 40s ease-in-out infinite alternate;
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgb(14 20 38 / 0.35) 0%, transparent 25%, transparent 72%, var(--navy) 100%);
}

@keyframes drift {
  from { transform: scale(1.04) translateX(0); }
  to { transform: scale(1.1) translateX(-1.5%); }
}

.hero-content {
  width: 100%;
  max-width: var(--max);
  margin: calc(-1 * clamp(2rem, 6vw, 5.5rem)) auto 0;
  padding: 0 var(--gutter) clamp(1rem, 3vh, 2rem);
  text-align: center;
}

.title {
  margin: 0;
  font-size: clamp(2.2rem, 0.9rem + 7.5vw, 6.2rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(to bottom, #fff1c4 0%, var(--gold-bright) 40%, var(--gold) 75%, #8a6a2a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 10px rgb(0 0 0 / 0.75));
}

.tagline {
  margin: 0.2em 0 0;
  font-family: var(--heading);
  font-size: clamp(1.1rem, 0.9rem + 1vw, 1.6rem);
  color: var(--parchment);
  text-shadow: 0 2px 8px rgb(0 0 0 / 0.9);
}

.pitch {
  max-width: 34em;
  margin: 0.8em auto 0;
  color: var(--text);
  text-shadow: 0 1px 6px rgb(0 0 0 / 0.9);
}

.note {
  margin: 1em 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Buttons */

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 1.6em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.7em 1.6em;
  border: 2px solid var(--gold);
  border-radius: 8px;
  background: linear-gradient(to bottom, var(--walnut-light), var(--walnut));
  color: var(--parchment);
  font: 700 1rem/1.2 var(--heading);
  letter-spacing: 0.03em;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.5), inset 0 1px 0 rgb(255 255 255 / 0.12);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.button.primary {
  background: linear-gradient(to bottom, var(--gold-bright), var(--gold) 60%, #9c7a31);
  border-color: var(--gold-bright);
  color: #2B1D12;
}
.button[href]:hover {
  transform: translateY(-2px);
  border-color: var(--gold-bright);
  box-shadow: 0 6px 22px rgb(242 210 122 / 0.3);
}
/* Not ready yet: looks like a button, does nothing. */
.button[aria-disabled="true"] {
  cursor: default;
  opacity: 0.6;
  filter: saturate(0.4);
  box-shadow: none;
}

@media (max-width: 480px) {
  .actions .button { width: 100%; }
}

/* Sections */

main > section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) var(--gutter) 0;
}

.trailer h2, .classes h2, .cta h2 { text-align: center; }

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--gold);
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.6);
}
.video .play, .video video, .video img {
  display: block;
  width: 100%;
  height: 100%;
}
.video img { object-fit: cover; }
.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  border: 3px solid var(--gold-bright);
  border-radius: 50%;
  background: rgb(14 20 38 / 0.7);
  transition: transform 0.15s, background 0.15s;
}
.play-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 16px 0 16px 26px;
  border-color: transparent transparent transparent var(--gold-bright);
}
.play:hover .play-icon, .play:focus-visible .play-icon {
  transform: scale(1.08);
  background: rgb(59 39 24 / 0.85);
}

/* Features */

.features {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
}
.feature {
  display: grid;
  gap: 1.2rem 2.5rem;
  align-items: center;
}
.feature img {
  width: 100%;
  border: 2px solid var(--walnut-light);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.5);
}
.feature h2 { margin-bottom: 0.4em; }
.feature p { margin: 0; color: var(--text); }

@media (min-width: 800px) {
  .feature { grid-template-columns: 3fr 2fr; }
  .feature:nth-child(even) img { order: 2; }
}

/* Classes */

.classes ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 700px) {
  .classes ul { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}
.classes li {
  padding: 14px 12px 16px;
  border: 1px solid rgb(201 162 74 / 0.45);
  border-radius: 10px;
  background: linear-gradient(to bottom, var(--navy-2), var(--slate));
  text-align: center;
}
.classes img {
  width: 100%;
  max-width: 128px;
  margin: 0 auto 10px;
  border: 2px solid var(--gold);
  border-radius: 50%;
}
.classes h3 {
  margin: 0 0 0.3em;
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.classes p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--muted);
}

/* Closing call to action */

.cta { text-align: center; }
.cta p { max-width: 32em; margin: 0 auto; }

/* Footer */

footer {
  margin-top: clamp(3rem, 8vw, 5.5rem);
  padding: 2rem var(--gutter) 2.5rem;
  border-top: 1px solid rgb(201 162 74 / 0.3);
  background: #0a0f1d;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}
footer nav a[aria-disabled="true"] { display: none; }
footer p { margin: 1em 0 0; }

@media (prefers-reduced-motion: reduce) {
  .hero-art img { animation: none; transform: none; }
  .button, .play-icon { transition: none; }
}
