/* Animal Wasteland — site styling.
 *
 * Every colour here is lifted from UIKit.cs rather than picked by eye, so the site and the
 * game's HUD are literally the same palette. The panels copy the HUD's shape language: dark
 * rounded chips with cream text, rust pill buttons, teal for the quiet secondary labels.
 * The typeface is the one the game ships (Nunito SemiBold 600, a static instance).
 */

@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  /* UIKit.Sand / Rust / Teal / Cream / Charcoal / PanelBg / SlotBg */
  --sand: #e8c97a;
  --rust: #c2542e;
  --rust-lit: #d9673c;
  --teal: #2ea6a1;
  --cream: #fff2d6;
  --charcoal: #3b2e29;
  --panel: rgba(41, 33, 28, 0.93);
  --slot: rgba(74, 61, 48, 0.95);

  --ground: #150f0c;
  --ground-lit: #241a15;
  --ink: rgba(255, 242, 214, 0.72);
  --ink-dim: rgba(255, 242, 214, 0.45);
  --rule: rgba(232, 201, 122, 0.16);

  --measure: 62rem;
  --radius: 14px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--cream);
  font-family: "Nunito", ui-rounded, "Trebuchet MS", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  /* Sand grain over the whole page, so flat areas have the same grit the world does. */
  background-image:
    radial-gradient(1200px 620px at 50% -12%, rgba(194, 84, 46, 0.20), transparent 70%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/><feColorMatrix type='saturate' values='0'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.035'/></svg>");
  background-attachment: fixed;
}

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

a { color: var(--sand); text-decoration: none; }
a:hover { color: var(--cream); }

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

/* ---------------------------------------------------------------- nav
 * The HUD's currency bar: one dark chip, cream inside, sitting over the world. */
.nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(9px);
  background: linear-gradient(var(--ground) 30%, rgba(21, 15, 12, 0.55));
  border-bottom: 1px solid var(--rule);
}
.nav .wrap {
  display: flex; align-items: center; gap: 1.6rem;
  padding: 0.85rem 0;
}
.mark {
  font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  font-size: 0.86rem; color: var(--cream); margin-right: auto;
}
.mark span { color: var(--rust-lit); }
.nav a.link {
  font-size: 0.94rem; color: var(--ink);
  padding: 0.3rem 0.1rem; border-bottom: 2px solid transparent;
}
.nav a.link:hover { color: var(--cream); }
.nav a.link[aria-current="page"] { color: var(--sand); border-bottom-color: var(--rust); }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; isolation: isolate; }
.hero-art {
  width: 100%; height: clamp(340px, 68vh, 720px); object-fit: cover;
  object-position: 50% 42%;
}
/* Same scrim the title screen puts behind its buttons. */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(21,15,12,0.55) 0%, transparent 26%, transparent 52%, var(--ground) 97%);
}
.hero-text {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: clamp(1.5rem, 6vh, 4rem);
}
.hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(2.1rem, 7.2vw, 4.6rem);
  letter-spacing: 0.06em; line-height: 1.02; font-weight: 700;
  text-shadow: 0 4px 26px rgba(21, 15, 12, 0.75);
}
.tagline {
  margin: 0; max-width: 34rem;
  color: var(--sand); font-size: clamp(1rem, 2.1vw, 1.2rem);
  text-shadow: 0 2px 14px rgba(21, 15, 12, 0.8);
}

/* ---------------------------------------------------------------- buttons */
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.btn {
  display: inline-block; border: 0; cursor: pointer;
  padding: 0.72rem 1.7rem; border-radius: 10px;
  background: var(--rust); color: var(--cream);
  font: inherit; font-weight: 700; font-size: 1rem;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
  transition: background 120ms ease, transform 120ms ease;
}
.btn:hover { background: var(--rust-lit); color: var(--cream); transform: translateY(-1px); }
.btn.ghost {
  background: var(--slot); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
}
.btn.ghost:hover { background: #5a4b3c; }

/* ---------------------------------------------------------------- sections */
section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
h2 {
  font-size: clamp(1.35rem, 3vw, 1.8rem); margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
}
.eyebrow {
  color: var(--teal); text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.74rem; font-weight: 700; margin: 0 0 0.7rem;
}
p { color: var(--ink); margin: 0 0 1rem; max-width: 46rem; }
p.lead { color: var(--cream); font-size: clamp(1.05rem, 2.2vw, 1.24rem); }

/* Panels are the HUD chip, reused. */
.panel {
  background: var(--panel); border-radius: var(--radius);
  border: 1px solid rgba(232, 201, 122, 0.09);
  padding: clamp(1.1rem, 3vw, 1.7rem);
}

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid h3 { margin: 0 0 0.35rem; font-size: 1.02rem; color: var(--sand); }
.grid p { margin: 0; font-size: 0.95rem; }

/* Screenshot strip — real captures, so let them be big and quiet. */
.shots { display: grid; gap: 0.85rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.shot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); background: var(--ground-lit); }
.shot img { aspect-ratio: 16 / 10; object-fit: cover; }
.shot figcaption {
  padding: 0.6rem 0.85rem; font-size: 0.84rem; color: var(--ink-dim);
  border-top: 1px solid var(--rule);
}

/* ---------------------------------------------------------------- dev log */
.entries { display: flex; flex-direction: column; gap: 1rem; }
.entry { background: var(--panel); border-radius: var(--radius); border: 1px solid rgba(232,201,122,0.09); overflow: hidden; }
.entry > summary {
  cursor: pointer; list-style: none;
  padding: 1.05rem clamp(1rem, 3vw, 1.5rem);
  display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap;
}
.entry > summary::-webkit-details-marker { display: none; }
.entry > summary::after {
  content: "+"; margin-left: auto; color: var(--rust-lit);
  font-weight: 700; font-size: 1.25rem; line-height: 1;
}
.entry[open] > summary::after { content: "–"; }
.entry > summary:hover { background: rgba(232, 201, 122, 0.04); }
.entry h3 { margin: 0; font-size: 1.06rem; font-weight: 700; }
.stamp {
  color: var(--teal); font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 700; white-space: nowrap;
}
.body { padding: 0 clamp(1rem, 3vw, 1.5rem) 1.35rem; border-top: 1px solid var(--rule); }
.body p:first-child { margin-top: 1rem; }
.body p:last-child { margin-bottom: 0; }
.body img { border-radius: 10px; border: 1px solid var(--rule); margin: 0.4rem 0 1rem; }

/* ---------------------------------------------------------------- footer */
footer {
  border-top: 1px solid var(--rule); padding: 2.2rem 0 3rem;
  color: var(--ink-dim); font-size: 0.87rem;
}
footer .wrap { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; }
footer nav { margin-left: auto; display: flex; gap: 1.2rem; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
