/* Pulla Games – winter night, pine, glaze gold, card cream (matches the game's own look) */
:root {
  --night: #081917;
  --pine: #12302A;
  --pine-line: #24483F;
  --gold: #F2C57C;
  --gold-deep: #D69A45;
  --cream: #F7ECDD;
  --mist: #A8BDB4;
  --aurora: #49D9A9;
  --ink: #0A1C1A;
  --round: ui-rounded, "SF Pro Rounded", "Nunito", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 36rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font: 1.0625rem/1.6 var(--body);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: .2em; }
a:hover { color: var(--cream); }
:focus-visible { outline: 3px solid var(--aurora); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 70rem; margin-inline: auto; padding-inline: 1.5rem; }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 1.1rem; padding-bottom: 1.1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font: 800 1.2rem/1 var(--round); color: var(--cream); text-decoration: none;
}
.brand::before {
  content: ""; width: 2.5rem; height: 1.9rem; flex: none;
  background: url(favicon.svg) center / contain no-repeat;
}
.top nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.top nav a { color: var(--cream); font-weight: 600; text-decoration: none; opacity: .9; }
.top nav a:hover, .top nav a[aria-current="page"] { opacity: 1; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }

/* Home hero: the game's own winter night, full bleed */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 40%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(8,25,23,.92) 0%, rgba(8,25,23,.62) 38%, rgba(8,25,23,0) 66%),
    linear-gradient(0deg, var(--night) 0%, rgba(8,25,23,0) 26%),
    linear-gradient(180deg, rgba(8,25,23,.7) 0%, rgba(8,25,23,0) 22%);
}
.hero-copy { padding-top: clamp(3rem, 9vw, 7rem); padding-bottom: clamp(4.5rem, 11vw, 9rem); }
.hero h1 {
  font: 900 clamp(2.9rem, 8.2vw, 5.8rem)/.96 var(--round);
  letter-spacing: -.03em; margin: 0 0 1.4rem; max-width: 9.5em;
  text-wrap: balance;
}
.hero .lead {
  font: 600 clamp(1.15rem, 2.2vw, 1.45rem)/1.4 var(--body);
  margin: 0 0 2rem; max-width: 27ch; color: var(--cream);
}
.when { margin: 1.1rem 0 0; color: var(--mist); font-size: .98rem; max-width: 34ch; }

/* Buttons */
.stores { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-block; padding: .9rem 1.4rem; border-radius: 999px;
  background: var(--gold); color: var(--ink); font: 800 1rem/1.2 var(--round); text-decoration: none;
  box-shadow: inset 0 -3px 0 var(--gold-deep);
}
.btn:hover { background: var(--cream); color: var(--ink); }
.btn[aria-disabled="true"] {
  background: rgba(8,25,23,.55); color: var(--cream);
  box-shadow: inset 0 0 0 2px rgba(242,197,124,.65); pointer-events: none;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* Sections */
main section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
h2 {
  font: 900 clamp(1.9rem, 4.4vw, 3rem)/1.05 var(--round);
  letter-spacing: -.02em; margin: 0 0 1rem; text-wrap: balance;
}
h3 { font: 800 1.2rem/1.25 var(--round); margin: 0 0 .35rem; }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1rem; color: var(--mist); }
.prose p strong { color: var(--cream); }

/* The game: two real screens from the app */
.game { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.screens { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(.75rem, 2vw, 1.25rem); margin: 0; justify-self: center; width: min(100%, 30rem); }
.screens img {
  width: 100%; border-radius: clamp(1.1rem, 3vw, 1.8rem);
  border: 5px solid #000; box-shadow: 0 0 0 1px var(--pine-line), 0 30px 60px -25px rgba(0,0,0,.8);
}
.screens picture:last-of-type img { margin-top: 2.5rem; }
.screens figcaption { grid-column: 1 / -1; color: var(--mist); font-size: .9rem; text-align: center; }

.facts { list-style: none; margin: 1.75rem 0 0; padding: 0; max-width: var(--measure); }
.facts li { position: relative; padding: .7rem 0 .7rem 2rem; border-top: 1px solid var(--pine-line); }
.facts li::before {
  content: ""; position: absolute; left: .15rem; top: 1.2rem;
  width: .85rem; height: .7rem; border-radius: 3px;
  background: var(--cream); box-shadow: inset 0 -2px 0 #d9c8b0;
  transform: rotate(-14deg);
}

/* How to play: five stops on a trail, like the route in the game */
.trail-band { background: var(--pine); border-block: 1px solid var(--pine-line); }
.steps {
  list-style: none; counter-reset: step; margin: 2.5rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; position: relative;
}
.steps::before {
  content: ""; position: absolute; left: 1.4rem; right: 1.4rem; top: 1.4rem;
  border-top: 4px dotted var(--pine-line);
}
.steps li { counter-increment: step; position: relative; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 2.8rem; height: 2.8rem; margin-bottom: 1rem;
  border-radius: 50%; background: var(--gold); color: var(--ink);
  font: 900 1.3rem/1 var(--round); box-shadow: 0 0 0 6px var(--pine);
}
.steps li:last-child::before { content: "\2691"; background: var(--aurora); font-size: 1.4rem; }
.steps p { margin: 0; color: var(--cream); }

/* Racers */
.racers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.lineup { display: flex; justify-content: center; align-items: flex-end; position: relative; padding-bottom: 1rem; }
.lineup::after {
  content: ""; position: absolute; left: 6%; right: 6%; bottom: 0; height: 2.6rem; z-index: -1;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(247,236,221,.22), rgba(247,236,221,0));
}
.lineup img { width: 46%; max-width: 15rem; }
.lineup img + img { margin-left: -6%; }

/* FAQ */
details { border-bottom: 1px solid var(--pine-line); padding: 1.1rem 0; max-width: var(--measure); }
summary { cursor: pointer; font: 800 1.15rem/1.35 var(--round); }
summary::marker { color: var(--gold); }
details[open] summary { margin-bottom: .5rem; }
details p { margin: .5rem 0 0; color: var(--mist); }

/* Plain pages (support, privacy, get) */
.glaze {
  background:
    radial-gradient(60rem 18rem at 78% -30%, rgba(73,217,169,.28), rgba(73,217,169,0)),
    var(--pine);
  border-bottom: 1px solid var(--pine-line);
}
.page-head { padding-block: 2rem 3rem; }
.page-head h1 { font: 900 clamp(2.4rem, 6vw, 3.8rem)/1 var(--round); letter-spacing: -.03em; margin: 0 0 .75rem; }
.page-head p { margin: 0; max-width: var(--measure); color: var(--mist); }
.legal h2 { font-size: 1.45rem; margin-top: 2.25rem; }
.legal ul { padding-left: 1.2rem; color: var(--mist); }
.updated { font-size: .95rem; }

/* Footer */
footer { background: #05110F; color: var(--mist); padding: 2.5rem 0; border-top: 1px solid var(--pine-line); font-size: .98rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
footer p { margin: 0; }
footer .made { display: flex; align-items: center; gap: .6rem; }
footer .made::before { content: ""; width: 2.2rem; height: 1.7rem; flex: none; background: url(favicon.svg) center / contain no-repeat; }
footer .legal-note { flex-basis: 100%; font-size: .75rem; opacity: .7; }

@media (max-width: 860px) {
  .game, .racers { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 1.5rem; }
  .steps::before { left: 1.25rem; right: auto; top: 1.4rem; bottom: 1.4rem; border-top: 0; border-left: 4px dotted var(--pine-line); }
  .steps li { display: grid; grid-template-columns: 2.8rem 1fr; gap: 1rem; align-items: center; }
  .steps li::before { margin: 0; }
}
@media (max-width: 640px) {
  .top { flex-direction: column; align-items: flex-start; gap: .7rem; }
  .top nav { gap: 1.1rem; }
  /* Reindeer on top, words underneath */
  .hero-art { bottom: auto; height: 78vw; }
  .hero-art img { object-position: 80% 30%; }
  .hero::after {
    background:
      linear-gradient(0deg, var(--night) 0%, var(--night) calc(100% - 78vw), rgba(8,25,23,0) calc(100% - 48vw)),
      linear-gradient(180deg, rgba(8,25,23,.85) 0%, rgba(8,25,23,0) 30vw);
  }
  .hero-copy { padding-top: 46vw; padding-bottom: 3rem; }
  .stores .btn { flex: 1 1 100%; text-align: center; }
}

/* Store links: the page's main job */
.top nav .nav-get {
  padding: .5rem 1rem; border-radius: 999px; background: var(--gold); color: var(--ink);
  font: 800 .95rem/1.2 var(--round); opacity: 1; box-shadow: inset 0 -2px 0 var(--gold-deep);
}
.top nav .nav-get:hover { background: var(--cream); text-decoration: none; }
.top nav { align-items: center; }
.hero .btn, .getband .btn { padding: 1.05rem 1.7rem; font-size: 1.1rem; }
html[data-device="android"] .stores a[data-store="android"],
html[data-device="ios"] .stores a[data-store="ios"] { order: -1; }
.getband { text-align: center; border-top: 1px solid var(--pine-line); }
.getband p { margin: 0 auto 1.75rem; max-width: 34rem; color: var(--mist); }
.getband .stores { justify-content: center; }
.getbar { display: none; }
@media (max-width: 640px) {
  .getbar.show {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
    background: rgba(8,25,23,.92); border-top: 1px solid var(--pine-line);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  .getbar .btn { display: none; width: 100%; text-align: center; }
  html[data-device="ios"] .getbar a[data-store="ios"],
  html[data-device="android"] .getbar a[data-store="android"] { display: block; }
  html.store-live footer { padding-bottom: 6.5rem; }
}
@media (max-width: 640px) {
  .top nav { gap: .5rem .95rem; font-size: .95rem; }
}
@media (max-width: 640px) {
  .top nav a[href*="#game"], .top nav a[href*="#peli"], .top nav .nav-get { display: none; }
}
