@font-face {
  font-family: 'Geist';
  src: url('/assets/fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('/assets/fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Pixel';
  src: url('/assets/fonts/GeistPixel-Square.woff2') format('woff2');
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* Copied from reform-kingdom's src/styles/tailwind.scss and daisyUI's dark theme; keep them in sync. */
  --color-primary: oklch(48% 0.17 340);
  --color-primary-content: oklch(97% 0.02 340);
  --color-neutral: oklch(32% 0.02 340);
  --color-base-100: oklch(25.33% 0.016 252.42);
  --color-base-300: oklch(21.15% 0.012 254.09);
  --color-base-content: oklch(97.807% 0.029 256.847);

  /* Site-only: the game's primary is too dark to use as text on base-300. */
  --color-accent-text: oklch(74% 0.13 340);
  --color-text-soft: oklch(87% 0.02 256);
  --color-text-muted: oklch(76% 0.02 256);

  --font-sans: 'Geist', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
  --font-pixel: 'Geist Pixel', var(--font-mono);

  --container-width: 80rem;
  --gutter: 1.5rem;
  --section-space: clamp(4rem, 9vw, 7rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-base-300);
  color: var(--color-base-content);
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.6;
}

h1,
h2,
h3,
p,
ol,
ul {
  margin: 0;
}

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

a {
  color: var(--color-accent-text);
}

a:hover {
  color: var(--color-primary-content);
}

:focus-visible {
  outline: 2px solid var(--color-accent-text);
  outline-offset: 3px;
}

/* Utilities */

.container {
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-space);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.text-accent {
  color: var(--color-accent-text);
}

.text-muted {
  color: var(--color-text-muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100%;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--color-primary);
  color: var(--color-primary-content);
}

.skip-link:focus {
  top: 0.75rem;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0;
  list-style: none;
}

/* Buttons: square corners to match the game, which sets every daisyUI radius to 0. */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.875rem 1.5rem;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.button--primary {
  background: var(--color-primary);
  color: var(--color-primary-content);
}

.button--primary:hover {
  background: oklch(from var(--color-primary) calc(l + 0.06) c h);
  color: var(--color-primary-content);
}

.button--outline {
  border-color: var(--color-base-content);
  color: var(--color-base-content);
}

.button--outline:hover {
  background: var(--color-base-100);
  color: var(--color-base-content);
}

.button--small {
  padding: 0.625rem 1.125rem;
  font-size: 0.8125rem;
}

.button--large {
  padding: 1.125rem 1.75rem;
  font-size: 0.9375rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Header */

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  padding-block: 1.375rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.site-nav__brand {
  flex-grow: 1;
  font-family: var(--font-pixel);
  font-size: 1.375rem;
  color: var(--color-base-content);
  text-decoration: none;
}

.site-nav__links a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.site-nav__links a:hover {
  color: var(--color-base-content);
}

/* Hero */

.hero {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  padding-block: 2.5rem 4.5rem;
}

.hero__title {
  max-width: 69rem;
  font-size: clamp(2.75rem, 7.4vw, 6.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.hero__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}

.hero__pitch {
  max-width: 39rem;
  font-size: 1.3125rem;
  color: var(--color-text-soft);
}

/* Trailer */

.trailer {
  position: relative;
  display: grid;
  align-content: center;
  place-items: center;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--color-base-100);
  color: var(--color-base-content);
  text-decoration: none;
}

/* 21:9 is too thin to tap comfortably on a phone. */
@media (max-width: 40rem) {
  .trailer {
    aspect-ratio: 16 / 9;
  }
}

.trailer__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.85) brightness(0.45);
}

.trailer__label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.625rem;
  border: 1px solid var(--color-primary);
  background: oklch(from var(--color-base-300) l c h / 85%);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
}

a.trailer:hover .trailer__label {
  background: var(--color-primary);
}

.trailer__icon {
  width: 1.375rem;
  height: 1.375rem;
  fill: currentColor;
}

.trailer__player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* Opening crawl */

.crawl {
  border-block: 1px solid var(--color-neutral);
}

.crawl__inner {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-width: 54rem;
  margin-inline: auto;
  padding: clamp(5rem, 10vw, 7.5rem) var(--gutter);
  font-family: var(--font-pixel);
  font-size: clamp(1.375rem, 2.6vw, 1.75rem);
  line-height: 1.45;
  color: var(--color-text-muted);
}

.crawl__line--bright {
  color: var(--color-base-content);
}

.crawl__line--accent {
  color: var(--color-accent-text);
}

/* How you play */

/* Column breakpoints and ratios are mirrored in the `sizes` hints in macros/image.njk. */
.gameplay {
  display: grid;
  align-items: center;
  gap: 3rem;
  margin-top: 3rem;
}

@media (min-width: 60rem) {
  .gameplay {
    grid-template-columns: 3fr 2fr;
  }
}

.gameplay__shot {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding: 0;
  list-style: none;
}

.steps__item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--color-primary);
  color: var(--color-text-soft);
}

.steps__title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-base-content);
}

/* Gallery */

.gallery-section {
  background: var(--color-base-100);
}

/* Fixed at 1 or 3 columns: one wide shot plus three tiles never leaves an empty cell. */
.gallery {
  display: grid;
  gap: 1rem;
  padding: 0;
  list-style: none;
}

@media (min-width: 60rem) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.gallery__item--wide {
  grid-column: 1 / -1;
}

.gallery__link {
  display: block;
}

.gallery__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.gallery__item--wide .gallery__image {
  aspect-ratio: 21 / 9;
}

/* Closing call to action */

.closing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem 4rem;
}

.closing__title {
  max-width: 42rem;
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.closing__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
}

.closing__social {
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--color-neutral);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 2rem 3rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

@media (prefers-reduced-motion: no-preference) {
  .button,
  .trailer__label {
    transition: background-color 150ms ease;
  }
}
