/* Guac-A-Mole landing page. Colours are the game's clay tokens
   (src/constants/clayTheme.ts); fonts are the game's self-hosted ones. */

@font-face {
  font-family: 'Lilita One';
  font-weight: 400;
  font-display: swap;
  src: url('/play/fonts/lilitaone-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Baloo 2';
  font-weight: 500;
  font-display: swap;
  src: url('/play/fonts/baloo2-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Baloo 2';
  font-weight: 700;
  font-display: swap;
  src: url('/play/fonts/baloo2-700.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --cream: #f6e7c8;
  --cream-light: #fff3d6;
  --cream-edge: #e2cfa6;
  --ink: #2a1a0c;
  --ink-muted: #5c4126;
  --ink-green: #2f5e12;
  --brown: #8a4b1f;
  --gold: #ffd23f;
  --gold-shade: #e0a800;
  --gold-ink: #6b3b00;
  --green: #6db535;
  --green-shade: #59942b;
  --red: #e2382f;
  --red-shade: #b92e27;
  --purple: #8a4fd6;
  --purple-shade: #7141af;
  --orange: #f08a24;
  --orange-shade: #c96d14;
  --gutter: 16px;
  --max: 1080px;
  --radius: 22px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font:
    500 17px/1.6 'Baloo 2',
    system-ui,
    sans-serif;
}

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

a {
  color: var(--ink-green);
}

h1,
h2,
h3 {
  font-family: 'Lilita One', 'Baloo 2', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 12px;
}

h2 {
  font-size: clamp(28px, 6vw, 40px);
  color: var(--ink-green);
  text-align: center;
}

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: var(--gutter);
  top: 8px;
  z-index: 10;
  background: var(--cream-light);
  padding: 8px 12px;
  border-radius: 10px;
}

/* Header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font:
    400 22px/1 'Lilita One',
    system-ui,
    sans-serif;
}
.brand img {
  border-radius: 10px;
}
.topbar nav {
  display: flex;
  gap: 16px;
}
.topbar nav a {
  font-weight: 700;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.topbar nav a:hover {
  text-decoration: underline;
}

/* Hero */
.hero {
  display: grid;
  gap: 28px;
  align-items: center;
  padding-top: 16px;
  padding-bottom: 40px;
}
.hero h1 {
  font-size: clamp(52px, 13vw, 88px);
  color: var(--green);
  -webkit-text-stroke: 2px var(--ink-green);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--ink-green);
  margin-bottom: 6px;
}
.tagline {
  font:
    400 clamp(24px, 5.5vw, 32px) / 1.2 'Lilita One',
    system-ui,
    sans-serif;
  color: var(--brown);
  margin: 0 0 12px;
}
.lede {
  font-size: 19px;
  max-width: 34em;
  margin: 0 0 22px;
}
.promise {
  margin: 18px 0 0;
  color: var(--ink-muted);
  font-weight: 700;
}
.hero-shot {
  justify-self: center;
  width: min(300px, 62vw);
}

/* Phones: the screenshots in a clay frame */
.phone {
  border-radius: 34px;
  border: 8px solid var(--cream-light);
  box-shadow:
    0 0 0 3px var(--cream-edge),
    0 14px 0 var(--cream-edge),
    0 22px 40px rgba(60, 35, 10, 0.25);
}

/* CTAs */
.ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
/* The official badges, unaltered. Google's PNG carries its own clear space (its artwork
   is 168 of 250 px tall), so at 83 px with a -14 px margin it matches Apple's 56 px badge. */
.badge {
  display: inline-flex;
  border-radius: 10px;
  transition: transform 0.15s ease;
}
.badge:hover {
  transform: translateY(-2px);
}
.badge-apple {
  height: 56px;
  width: auto;
}
.badge-play {
  height: 83px;
  width: auto;
  margin: -14px;
}
.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 16px;
  background: var(--gold);
  color: var(--gold-ink);
  font:
    400 20px/1 'Lilita One',
    system-ui,
    sans-serif;
  text-decoration: none;
  box-shadow:
    inset 0 -4px 0 var(--gold-shade),
    0 5px 0 #8a5a00;
  transition: transform 0.15s ease;
}
.play-btn:hover {
  transform: translateY(-2px);
}
.play-btn:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 -2px 0 var(--gold-shade),
    0 2px 0 #8a5a00;
}

/* Trailer */
.trailer {
  padding-top: 24px;
  padding-bottom: 48px;
}
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 860px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  box-shadow:
    0 0 0 4px var(--cream-light),
    0 12px 0 var(--cream-edge);
}
.video iframe,
.video-poster,
.video-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-poster {
  padding: 0;
  background: none;
  cursor: pointer;
}
.video-poster img {
  object-fit: cover;
}
.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  box-shadow:
    inset 0 -5px 0 var(--red-shade),
    0 6px 0 #7c1f1a;
  transition: transform 0.15s ease;
}
.video-poster:hover .video-play {
  transform: scale(1.06);
}

/* How it plays */
.how {
  padding-top: 24px;
  padding-bottom: 48px;
}
.steps {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 32px;
}
.step {
  text-align: center;
}
.step img {
  width: min(240px, 50vw);
  margin: 0 auto 18px;
  border-radius: 28px;
  border: 6px solid var(--cream-light);
  box-shadow:
    0 0 0 3px var(--cream-edge),
    0 10px 0 var(--cream-edge);
}
.step h3 {
  font-size: 28px;
  color: var(--brown);
}
.step p {
  margin: 0 auto;
  max-width: 22em;
}

/* Modes */
.modes,
.extras {
  display: grid;
  gap: 28px;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 48px;
}
.modes .phone,
.extras .phone {
  justify-self: center;
  width: min(260px, 56vw);
}
.mode-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 14px;
}
.mode {
  padding: 14px 18px;
  border-radius: 18px;
  color: #fff;
  font-weight: 500;
}
.mode strong {
  display: block;
  font:
    400 24px/1.1 'Lilita One',
    system-ui,
    sans-serif;
  margin-bottom: 2px;
}
.mode-classic {
  /* Darker than the game's card green so white text passes 4.5:1. */
  background: #3c7419;
  box-shadow: 0 6px 0 #2a5410;
}
.mode-endless {
  background: var(--purple-shade);
  box-shadow: 0 6px 0 #4c2b76;
}
.mode-daily {
  background: #b35a0c;
  box-shadow: 0 6px 0 #7a3c06;
}
.mode-challenge {
  background: var(--red-shade);
  box-shadow: 0 6px 0 #7c1f1a;
}
.extras h2,
.modes h2 {
  text-align: left;
}
.extras p {
  font-size: 19px;
  margin: 0;
}

/* Cast */
.cast {
  padding-top: 24px;
  padding-bottom: 48px;
}
.cast-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.cast-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 10px 18px;
  border-radius: var(--radius);
  background: var(--cream-light);
  box-shadow:
    inset 0 0 0 2px var(--cream-edge),
    0 8px 0 var(--cream-edge);
}
.cast-list img {
  height: 120px;
  width: auto;
  margin-bottom: 10px;
}
.cast-list strong {
  font:
    400 22px/1.1 'Lilita One',
    system-ui,
    sans-serif;
  color: var(--brown);
}
.cast-list span {
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink-muted);
}
.cast-list .hazard {
  background: #fde4e1;
  box-shadow:
    inset 0 0 0 2px #f2b6b0,
    0 8px 0 #f2b6b0;
}

/* Closing */
.closing {
  text-align: center;
  padding-top: 32px;
  padding-bottom: 56px;
}
.closing h2 {
  font-size: clamp(36px, 8vw, 52px);
}
.facts {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  font-weight: 700;
  color: var(--ink-muted);
}
.closing .ctas {
  justify-content: center;
}

/* Footer */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 24px;
  padding-bottom: 32px;
  border-top: 2px solid var(--cream-edge);
  font-size: 15px;
  color: var(--ink-muted);
}
.footer p {
  margin: 0;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .cast-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.2fr 1fr;
    padding-top: 32px;
  }
  .modes {
    grid-template-columns: 1.3fr 1fr;
  }
  .extras {
    grid-template-columns: 1fr 1.3fr;
  }
}

@media (max-width: 420px) {
  .topbar nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .badge,
  .play-btn,
  .video-play {
    transition: none;
  }
}
