/* Hunt the Chicko! - one stylesheet for every page. Palette and shapes come straight from the
   game: sunny sky, grass, warm wood, the golden title with a brown outline, red hearts. */

@font-face {
  font-family: "Lilita One";
  src: url("/fonts/lilita-one.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("/fonts/fredoka-var.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --sky: #47b1f2;
  --sky-deep: #2a97e0;
  --sky-light: #bfe9ff;
  --grass: #7dc142;
  --grass-dark: #4f9a2c;
  --grass-deep: #37711f;
  --wood: #9c5a25;
  --wood-dark: #74421a;
  --wood-deep: #4a2810;
  --gold: #f8c43a;
  --gold-light: #ffe07a;
  --gold-dark: #d9931c;
  --heart: #e8402e;
  --dirt: #f1d7a2;
  --dirt-dark: #e2bf7f;
  --cream: #fff6e3;
  --ink: #3b2412;
  --ink-soft: #6b4a2e;
  --display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --body: "Fredoka", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

/* The inline icon sheet: browsers ignore the hidden attribute on an inline <svg> and paint it as
   an empty 300x150 box at the top of the page, so hide it here. */
svg[hidden] { display: none; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--sky);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

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

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

/* The game's title lettering: golden face, thick brown outline, a hard drop shadow. */
.chunky {
  font-family: var(--display);
  color: var(--gold);
  -webkit-text-stroke: 0.045em var(--wood-deep);
  paint-order: stroke fill;
  text-shadow: 0 0.07em 0 var(--wood-deep), 0 0.14em 0 rgba(0, 0, 0, 0.22);
  letter-spacing: 0.01em;
}

/* ---------------------------------------------------------------- header */
.top {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-block: 1rem;
}

.wordmark {
  font-family: var(--display);
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--gold);
  -webkit-text-stroke: 0.04em var(--wood-deep);
  paint-order: stroke fill;
  text-shadow: 0 0.08em 0 var(--wood-deep);
}

.top nav {
  display: flex;
  gap: 0.35rem;
}

.top nav a {
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: rgba(58, 36, 18, 0.35);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}
.top nav a:hover { background: rgba(58, 36, 18, 0.55); }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-deep) 0%, var(--sky) 45%, var(--sky-light) 100%);
  color: var(--ink);
  padding-bottom: 5.5rem;
}

.hero .wrap { position: relative; z-index: 1; }

.hero-text {
  text-align: center;
  max-width: 44rem;
  margin: 1.5rem auto 0;
}

.hero h1 {
  font-size: clamp(3rem, 11vw, 6.5rem);
  transform: rotate(-2deg);
}

.tagline {
  font-size: clamp(1.25rem, 3.2vw, 1.7rem);
  font-weight: 600;
  margin: 1.25rem auto 0.75rem;
  max-width: 30ch;
}

.blurb {
  max-width: 52ch;
  margin-inline: auto;
}

/* The screenshot hangs in a chunky wooden frame with a nail in each corner. */
.frame {
  position: relative;
  margin: 2.25rem auto 0;
  max-width: 900px;
  padding: 12px;
  background: linear-gradient(180deg, #b06a2e, var(--wood-dark));
  border: 4px solid var(--wood-deep);
  border-radius: 22px;
  box-shadow: 0 18px 0 var(--wood-deep), 0 30px 40px rgba(30, 60, 90, 0.35);
  transform: rotate(-1.2deg);
}
.frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 3px solid var(--wood-deep);
}
.frame::before, .frame::after, .frame-nails::before, .frame-nails::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe9b8, #b48a47 70%, #6a4a20);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.frame::before { top: 7px; left: 7px; }
.frame::after { top: 7px; right: 7px; }
.frame-nails::before { bottom: 7px; left: 7px; }
.frame-nails::after { bottom: 7px; right: 7px; }

/* Drifting clouds: the one moving thing on the page. */
.cloud {
  position: absolute;
  z-index: 0;
  width: 160px;
  height: 56px;
  background: #fff;
  border-radius: 999px;
  opacity: 0.95;
  animation: drift linear infinite;
}
.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
}
.cloud::before { width: 70px; height: 70px; left: 28px; top: -36px; }
.cloud::after { width: 50px; height: 50px; left: 84px; top: -22px; }
.cloud-1 { top: 15%; left: -180px; animation-duration: 95s; }
.cloud-2 { top: 8%; left: -180px; animation-duration: 140s; animation-delay: -60s; transform: scale(0.7); }
.cloud-3 { top: 32%; left: -180px; animation-duration: 120s; animation-delay: -100s; transform: scale(0.85); opacity: 0.8; }
.cloud-4 { top: 22%; left: -180px; animation-duration: 170s; animation-delay: -30s; transform: scale(0.55); opacity: 0.85; }

@keyframes drift {
  from { translate: 0 0; }
  to { translate: calc(100vw + 400px) 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cloud { animation: none; }
  .cloud-1 { left: 10%; }
  .cloud-2 { left: 55%; }
  .cloud-3 { left: 78%; }
  .cloud-4 { left: 35%; }
}

/* Grass horizon between the sky and the rest of the farm. */
.horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  width: 100%;
  height: 70px;
  display: block;
  color: var(--grass);
  z-index: 1;
}

/* ---------------------------------------------------------------- store buttons */
.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem 1.1rem;
  margin-top: 1.5rem;
}

.btn-store {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.4rem 0.8rem 1.1rem;
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: var(--wood-deep);
  text-decoration: none;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
  border: 3px solid var(--wood-deep);
  border-radius: 999px;
  box-shadow: 0 6px 0 var(--wood-deep);
  transition: transform 120ms, box-shadow 120ms;
}
.btn-store:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--wood-deep); }
.btn-store:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--wood-deep); }
.btn-store svg { width: 1.5em; height: 1.5em; flex: none; }
.btn-store small {
  display: block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.7rem;
  line-height: 1;
  margin-bottom: 0.2em;
  opacity: 0.85;
}
.btn-store .label { line-height: 1; }

/* "Coming soon" ribbon pinned to a store button until the listing is live. */
.soon {
  position: absolute;
  top: -0.85rem;
  right: -0.6rem;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #fff;
  background: var(--heart);
  border: 2px solid var(--wood-deep);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  transform: rotate(6deg);
}

/* ---------------------------------------------------------------- sections */
.section { padding-block: 3.5rem; }

.section h2 {
  text-align: center;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  margin-bottom: 0.4em;
}

.lead {
  text-align: center;
  max-width: 50ch;
  margin-inline: auto;
  font-size: 1.15rem;
}

.field {
  background: linear-gradient(180deg, var(--grass) 0%, var(--grass-dark) 100%);
  color: #fff;
}

.field .lead { color: #f4ffe9; }

/* Wooden signposts standing in the grass. */
.signs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem 1.5rem;
  margin-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.sign {
  position: relative;
  padding: 1.4rem 1.4rem 1.5rem;
  background:
    repeating-linear-gradient(90deg, transparent 0 96px, rgba(0, 0, 0, 0.09) 96px 100px),
    linear-gradient(180deg, #b06a2e, var(--wood-dark));
  color: var(--cream);
  border: 4px solid var(--wood-deep);
  border-radius: 16px;
  box-shadow: 0 8px 0 var(--wood-deep), 0 14px 24px rgba(20, 50, 10, 0.3);
}
.sign::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2.5rem;
  width: 18px;
  height: 2.5rem;
  translate: -50% 0;
  background: linear-gradient(90deg, var(--wood-dark), #8a5020, var(--wood-deep));
  border-radius: 0 0 4px 4px;
  z-index: -1;
}
.sign svg {
  width: 3rem;
  height: 3rem;
  display: block;
  margin-bottom: 0.5rem;
}
.sign h3 {
  font-size: 1.7rem;
  color: var(--gold-light);
  margin-bottom: 0.35rem;
}
.sign p { font-size: 1rem; line-height: 1.5; }

/* The game's own heads-up display: hearts, chicken counter, timer. */
.hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 2.5rem;
  margin: 2.75rem auto 0;
  padding: 0.9rem 1.75rem;
  max-width: 640px;
  background: rgba(43, 26, 14, 0.5);
  border: 3px solid rgba(43, 26, 14, 0.7);
  border-radius: 999px;
}
.hud-hearts { display: flex; gap: 0.3rem; }
.hud-hearts svg { width: 2rem; height: 2rem; }
.hud .chunky { font-size: 2rem; text-shadow: 0 0.07em 0 var(--wood-deep); }
.hud-timer {
  font-family: var(--display);
  font-size: 2rem;
  color: #fff;
  -webkit-text-stroke: 0.04em var(--wood-deep);
  paint-order: stroke fill;
}
.hud-caption {
  text-align: center;
  color: #eaffd8;
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

/* Screenshots on the dirt road. */
.road {
  background:
    radial-gradient(ellipse 60% 40% at 30% 60%, rgba(255, 255, 255, 0.25), transparent 70%),
    linear-gradient(180deg, var(--dirt) 0%, var(--dirt-dark) 100%);
}

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.shot {
  aspect-ratio: 16 / 9;
  margin: 0;
  border-radius: 14px;
  border: 4px solid var(--wood-deep);
  background: var(--wood-dark);
  overflow: hidden;
  box-shadow: 0 6px 0 var(--wood-deep);
}
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot p { margin: 0; }

.shot-soon {
  display: grid;
  place-content: center;
  text-align: center;
  padding: 1rem;
  background: repeating-linear-gradient(-45deg, var(--dirt) 0 14px, #e9c98f 14px 28px);
  border-style: dashed;
  box-shadow: none;
  color: var(--ink-soft);
  font-weight: 600;
}
.shot-soon strong {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--wood-dark);
}

.shot-caption {
  text-align: center;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-top: 1.25rem;
}

/* Free to play + second call to action. */
.meadow {
  background: linear-gradient(180deg, var(--sky-light), #e2f6ff);
}

.perks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  max-width: 760px;
  margin: 2rem auto 0;
}

.perk {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.1rem 1.2rem;
  background: var(--cream);
  border: 3px solid var(--wood-deep);
  border-radius: 16px;
  box-shadow: 0 5px 0 var(--wood-deep);
}
.perk svg { width: 2.4rem; height: 2.4rem; flex: none; }
.perk h3 { font-size: 1.35rem; margin-bottom: 0.2rem; color: var(--wood-dark); }
.perk p { font-size: 0.98rem; }

.meadow .stores { margin-top: 2.5rem; }

/* ---------------------------------------------------------------- legal pages */
.paper-bg {
  background: linear-gradient(180deg, var(--sky) 0, var(--sky) 240px, var(--grass) 240px, var(--grass-dark) 100%);
  padding-bottom: 4rem;
}

.paper {
  max-width: 760px;
  margin: 1.5rem auto 0;
  padding: clamp(1.4rem, 4vw, 2.75rem);
  background: var(--cream);
  border: 4px solid var(--wood-deep);
  border-top-width: 14px;
  border-radius: 18px;
  box-shadow: 0 10px 0 var(--wood-deep), 0 22px 36px rgba(20, 50, 10, 0.3);
}
.paper h1 {
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  color: var(--wood-dark);
  margin-bottom: 0.3em;
}
.paper h2 {
  font-size: 1.45rem;
  color: var(--wood-dark);
  margin: 1.6em 0 0.4em;
}
.paper p, .paper li { max-width: 68ch; }
.paper em { color: var(--ink-soft); }
.paper a { color: #1b6fb8; text-decoration-thickness: 2px; }
.paper a { overflow-wrap: anywhere; } /* long URLs and mail addresses must wrap on a phone */
.paper ol { padding-left: 1.4rem; }
.paper li { margin-bottom: 0.5rem; }
.paper .steps li::marker {
  font-family: var(--display);
  color: var(--heart);
}

/* ---------------------------------------------------------------- footer */
.foot {
  background:
    repeating-linear-gradient(0deg, transparent 0 40px, rgba(0, 0, 0, 0.14) 40px 43px),
    linear-gradient(180deg, var(--wood-dark), var(--wood-deep));
  color: var(--cream);
  padding-block: 2.25rem;
  border-top: 5px solid var(--wood-deep);
}

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

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  font-weight: 600;
}
.foot nav a { text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }

.foot .fine {
  width: 100%;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* ---------------------------------------------------------------- small screens */
@media (max-width: 640px) {
  /* On a phone the hero is tall and narrow, so the clouds, placed as a share of its height,
     would drift straight through the title and the text. Keep them in a sky strip between the
     header and the title instead, smaller and fewer. */
  .hero-text { padding-top: 4rem; margin-top: 0.5rem; }
  .cloud { transform-origin: top left; }
  .cloud-1 { top: 6rem; transform: scale(0.6); }
  .cloud-2 { top: 6.4rem; transform: scale(0.45); }
  .cloud-3, .cloud-4 { display: none; }
  .hero h1 { font-size: clamp(2.2rem, 11.4vw, 3rem); transform: rotate(-1.5deg); }
  .hero { padding-bottom: 4rem; }
  .top { gap: 0.5rem 0.75rem; }
  .wordmark { font-size: 1.3rem; }
  .frame { transform: none; padding: 8px; border-radius: 16px; box-shadow: 0 10px 0 var(--wood-deep); }
  .hud { gap: 0.75rem 1.5rem; padding-inline: 1.2rem; }
  .hud-hearts svg { width: 1.6rem; height: 1.6rem; }
  .hud .chunky, .hud-timer { font-size: 1.6rem; }
  .sign::after { display: none; }
  .signs { gap: 1.25rem; padding-bottom: 0; }
  .top nav a { padding: 0.3rem 0.65rem; font-size: 0.9rem; }
}
