/* Attack of the Bonekin, landing page. The game's stone-and-gold look (src/style.css), kept small.
   The page is always dark, like the game's menus. */

@font-face {
  font-family: 'Oswald';
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/oswald-latin-600-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Oswald';
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/oswald-latin-700-normal.woff2) format('woff2');
}

:root {
  color-scheme: dark;
  --font-display: 'Oswald', 'Arial Narrow', 'Roboto Condensed', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --stone-0: #1f140b;
  --stone-1: #2e1f13;
  --stone-2: #3e2a19;
  --stone-edge: #160d06;
  --ink: #f3e6cc;
  --ink-soft: #d9c6a2;
  --gold-hi: #f4e3bd;
  --gold: #d4b07a;
  --gold-lo: #8a6a40;
  --gold-ink: #2b1904;
  --gold-text: #e2c793;
  --gold-fill: linear-gradient(180deg, #f2dfb5 0%, #d8b680 45%, #a7854f 100%);
  --amber: #ffb43a;
  --gutter: 16px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--stone-0);
  color: var(--ink);
  font: 17px/1.55 var(--font-body);
  overflow-x: hidden;
}

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0;
}

/* The EN / DA switch, top right. */
.top {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 12px);
  right: max(var(--gutter), env(safe-area-inset-right));
  z-index: 5;
}
.lang {
  display: flex;
  border: 2px solid var(--stone-edge);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 0 rgb(0 0 0 / 45%);
}
.lang button {
  font: 600 15px/1 var(--font-display);
  letter-spacing: 0.08em;
  padding: 9px 12px;
  min-width: 44px;
  min-height: 40px;
  border: 0;
  color: var(--gold-text);
  background: linear-gradient(180deg, #7a5634, #4e341d);
  cursor: pointer;
}
.lang button + button { border-left: 2px solid var(--stone-edge); }
.lang button[aria-pressed='true'] {
  background: var(--gold-fill);
  color: var(--gold-ink);
}

/* The big amber Play button, like the game's Start. */
.play {
  display: inline-block;
  font: 700 clamp(22px, 5vw, 28px)/1 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-ink);
  background: var(--gold-fill);
  padding: 18px 44px;
  border: 3px solid var(--stone-edge);
  border-radius: 14px;
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 55%), inset 0 -3px 0 rgb(0 0 0 / 25%),
    0 4px 0 var(--stone-edge), 0 0 32px rgb(255 180 58 / 45%);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.play:hover { filter: brightness(1.06); }
.play:active { transform: translateY(2px); }
.play:focus-visible, .lang button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

/* Top: the village painting with the logo and Play. */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(env(safe-area-inset-top) + 64px) var(--gutter) 48px;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg, .final-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-bg img, .final-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgb(20 12 5 / 55%), transparent 75%),
    linear-gradient(180deg, rgb(20 12 5 / 25%) 0%, transparent 30%, transparent 60%, var(--stone-0) 100%);
}
.hero-inner {
  max-width: 680px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 20px;
}
.logo {
  /* Short sideways phones: the logo shrinks so Play stays on screen. */
  width: min(90vw, 620px, max(260px, calc((100svh - 250px) * 2.35)));
  filter: drop-shadow(0 6px 18px rgb(0 0 0 / 60%));
}
.tagline {
  margin: 0;
  font-size: clamp(18px, 4.4vw, 22px);
  font-weight: 600;
  text-shadow: 0 2px 6px rgb(0 0 0 / 85%), 0 0 2px rgb(0 0 0 / 90%);
}
.where {
  margin: 0;
  max-width: 440px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 15px;
  color: var(--ink);
  background: rgb(20 12 5 / 62%);
  text-shadow: 0 1px 3px rgb(0 0 0 / 90%);
}
@media (max-height: 500px) {
  .hero-inner { gap: 12px; }
  .hero { padding-top: calc(env(safe-area-inset-top) + 24px); padding-bottom: 24px; }
  .tagline { font-size: 17px; }
}

/* Campfire sparks drifting up, as on the game's menus. */
.sparks {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 12% 90%, var(--amber), transparent),
    radial-gradient(2px 2px at 28% 80%, #ffd27a, transparent),
    radial-gradient(1.5px 1.5px at 47% 95%, var(--amber), transparent),
    radial-gradient(2px 2px at 63% 85%, #ffd27a, transparent),
    radial-gradient(1.5px 1.5px at 81% 92%, var(--amber), transparent),
    radial-gradient(2px 2px at 92% 78%, #ffd27a, transparent);
  animation: drift 9s linear infinite;
  opacity: 0.8;
}
@keyframes drift {
  from { transform: translateY(0); opacity: 0.9; }
  to { transform: translateY(-60vh); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sparks { animation: none; opacity: 0.5; }
  .play { transition: none; }
}

/* Sections below. */
.story, .how {
  padding: 56px var(--gutter);
  max-width: 1240px;
  margin: 0 auto;
}
.story h2, .how h2, .final h2 {
  font-size: clamp(28px, 7vw, 40px);
  color: var(--gold-text);
  text-align: center;
  margin-bottom: 28px;
  text-shadow: 0 2px 0 var(--stone-edge);
}

.story-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  counter-reset: picture;
}
.story-strip li {
  background: linear-gradient(180deg, rgb(112 80 50 / 96%), rgb(70 48 28 / 96%));
  border: 2px solid var(--stone-edge);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgb(255 232 190 / 24%), 0 3px 0 rgb(0 0 0 / 45%);
}
.story-strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-bottom: 2px solid var(--stone-edge);
}
.story-strip p {
  margin: 0;
  padding: 14px 16px 18px;
  font-size: 16px;
}
@media (min-width: 640px) {
  .story-strip { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
  .story-strip { grid-template-columns: repeat(4, 1fr); }
}

.how-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.how-list li {
  padding: 18px 20px;
  border-radius: 10px;
  background: linear-gradient(180deg, #2c1c0f, #1e130a);
  border: 2px solid var(--stone-edge);
  box-shadow: inset 0 2px 3px rgb(0 0 0 / 60%), 0 1px 0 rgb(255 232 190 / 10%);
}
.how-list h3 {
  font-size: 21px;
  color: var(--amber);
  margin-bottom: 6px;
}
.how-list p { margin: 0; color: var(--ink-soft); }
@media (min-width: 640px) {
  .how-list { grid-template-columns: 1fr 1fr; }
}

/* Last call: the mountain camp painting and Play again. */
.final {
  position: relative;
  isolation: isolate;
  padding: 96px var(--gutter);
  text-align: center;
  overflow: hidden;
}
.final::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--stone-0) 0%, rgb(20 12 5 / 45%) 30%, rgb(20 12 5 / 55%) 70%, var(--stone-0) 100%);
}
.final-inner {
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 18px;
}
.final h2 { margin-bottom: 0; }
.final p {
  margin: 0;
  font-weight: 600;
  text-shadow: 0 2px 6px rgb(0 0 0 / 85%);
}

.foot {
  padding: 24px var(--gutter) calc(env(safe-area-inset-bottom) + 24px);
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
  border-top: 1px solid var(--stone-2);
}
.foot p { margin: 0; }
