/* Turbo Tag website (turbotag.app). One deliberate look taken from the game's
   logo: candy pink "Turbo", sunny yellow "Tag", thick dark outlines, sky and
   grass. Light only, on purpose. Font: Baloo 2 (SIL OFL), self-hosted so the
   site sends visitors to no third party. */

@font-face {
  font-family: "Baloo 2";
  src: url("baloo2.woff") format("woff");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --ink: #1d1b2f;
  --ink-soft: #4a4763;
  --pink: #ee2a5b;
  --pink-deep: #c81447;
  --yellow: #ffc62b;
  --sky: #dff1ff;
  --sky-deep: #8fd0f7;
  --grass: #4fae45;
  --paper: #f7fbff;
  --card: #ffffff;
  --radius: 22px;
  --outline: 4px solid var(--ink);
  --lift: 0 6px 0 var(--ink);
  --body: "Baloo 2", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.55;
}

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

a { color: var(--pink-deep); text-underline-offset: 3px; }
a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
  border-radius: 8px;
}

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

/* ---------------------------------------------------------------- header */

.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  padding: 1rem 0;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand {
  display: flex; align-items: center; gap: .6rem;
  color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.25rem;
}
.brand img { width: 44px; height: 44px; border-radius: 12px; border: 3px solid var(--ink); }
.topbar nav { display: flex; gap: 1.25rem; font-weight: 700; }
.topbar nav a { color: var(--ink); text-decoration: none; }
.topbar nav a:hover { color: var(--pink-deep); }

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 6.5rem 0 5rem;
  background: url("hero-bg.webp") center / cover no-repeat, var(--sky-deep);
  overflow: hidden;
}
.hero::after {
  /* soften the forest behind the logo and fade into the page */
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 55% at 50% 42%, rgba(255,255,255,.55), rgba(255,255,255,0) 70%),
    linear-gradient(to bottom, rgba(247,251,255,0) 70%, var(--paper));
}
.hero > .wrap { position: relative; z-index: 1; }
.hero .logo {
  width: min(560px, 88%);
  margin: 0 auto;
  filter: drop-shadow(0 10px 0 rgba(29,27,47,.25));
  animation: bob 4.5s ease-in-out infinite;
}
.hero h1 {
  margin: 0 auto;
  max-width: 22ch;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.12;
  font-weight: 800;
  text-wrap: balance;
}
.hero .words {
  display: inline-block;
  margin: .6rem auto 1.6rem;
  padding: .7rem 1.6rem .9rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(6px);
}
.hero h1 + p.lede { margin-top: .3rem; }
.hero p.lede {
  margin: 0 auto;
  max-width: 46ch;
  font-size: 1.25rem;
  color: var(--ink-soft);
  font-weight: 600;
  text-wrap: balance;
}
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

.button {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .7rem 1.4rem;
  border: var(--outline);
  border-radius: 999px;
  box-shadow: var(--lift);
  font: 800 1.15rem/1.1 var(--body);
  color: var(--ink);
  background: var(--yellow);
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
.button:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.button.pink { background: var(--pink); color: #fff; }
.button.soon { background: #fff; cursor: default; }
.button.soon:hover, .button.soon:active { transform: none; box-shadow: var(--lift); }
.button .dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--grass); border: 2px solid var(--ink); }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

/* ----------------------------------------------------------------- modes */

section { padding: 4.5rem 0; }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.eyebrow {
  display: inline-block;
  padding: .15rem .8rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font-weight: 800; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase;
}
h2 {
  margin: .6rem 0 .3rem;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.1;
  font-weight: 800;
  text-wrap: balance;
}
.section-head p { margin: 0 auto; max-width: 52ch; color: var(--ink-soft); }

.modes, .promises {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.6rem;
}
.mode {
  background: var(--card);
  border: var(--outline);
  border-radius: var(--radius);
  box-shadow: var(--lift);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.mode:nth-child(odd) { transform: rotate(-1deg); }
.mode:nth-child(even) { transform: rotate(1deg); }
.mode img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-bottom: var(--outline); }
.mode .body { padding: 1rem 1.2rem 1.3rem; }
.mode h3 { margin: 0 0 .25rem; font-size: 1.5rem; line-height: 1.15; font-weight: 800; }
.mode p { margin: 0; color: var(--ink-soft); font-size: 1.05rem; }
.tag {
  display: inline-block; margin-bottom: .45rem;
  font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--pink-deep);
}

/* ----------------------------------------------------------- worlds strip */

.worlds { background: var(--sky); border-block: var(--outline); }
.worlds .grid {
  display: grid; gap: 2rem; align-items: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}
.worlds .shots { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.worlds .shots img {
  border: var(--outline); border-radius: 16px; box-shadow: var(--lift);
  aspect-ratio: 4 / 3; object-fit: cover;
}
.worlds .shots img.wide { grid-column: 1 / -1; aspect-ratio: 1200 / 494; }
.worlds ul { padding-left: 1.1rem; margin: 1rem 0 0; }
.worlds li { margin: .35rem 0; }
.worlds li::marker { color: var(--pink); }

/* --------------------------------------------------------------- families */

.promise {
  background: var(--card);
  border: var(--outline); border-radius: var(--radius); box-shadow: var(--lift);
  padding: 1.2rem 1.3rem;
}
.promise h3 { margin: 0 0 .2rem; font-size: 1.3rem; font-weight: 800; }
.promise p { margin: 0; color: var(--ink-soft); font-size: 1.05rem; }
.promise .mark {
  width: 2.4rem; height: 2.4rem; margin-bottom: .6rem;
  border: 3px solid var(--ink); border-radius: 12px;
  display: grid; place-items: center;
  background: var(--yellow);
}
.promise .mark svg { width: 1.4rem; height: 1.4rem; }

/* ----------------------------------------------------------------- footer */

footer {
  background: var(--ink); color: #e9e7f7;
  padding: 2.5rem 0;
  font-size: 1rem;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
footer a { color: var(--yellow); }
footer nav { display: flex; flex-wrap: wrap; gap: 1.2rem; font-weight: 700; }

/* ------------------------------------------------------------ legal pages */

.page-head {
  background: var(--sky);
  border-bottom: var(--outline);
  padding: 6.5rem 0 2.5rem;
}
.page-head h1 { margin: 0; font-size: clamp(2.1rem, 5vw, 3.2rem); line-height: 1.05; font-weight: 800; }
.page-head p { margin: .4rem 0 0; color: var(--ink-soft); font-weight: 600; }
.legal { padding: 2.5rem 0 4rem; }
.legal article { max-width: 68ch; }
.legal h2 { font-size: 1.45rem; margin: 2rem 0 .3rem; }
.legal p, .legal li { color: #2f2c44; }
.legal .summary {
  border: var(--outline); border-radius: var(--radius); box-shadow: var(--lift);
  background: var(--yellow);
  padding: 1rem 1.3rem; font-weight: 700; font-size: 1.2rem;
}

.topbar.solid { position: static; background: var(--sky); padding-bottom: 0; }

/* ------------------------------------------------------------------ small */

@media (max-width: 980px) {
  .modes, .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .modes, .promises { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar nav { gap: .9rem; font-size: 1rem; }
  .brand span { display: none; }
  .worlds .grid { grid-template-columns: 1fr; }
  .mode:nth-child(odd), .mode:nth-child(even) { transform: none; }
  section { padding: 3.5rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero .logo { animation: none; }
  .button { transition: none; }
}
