/**
 * Trace Town's theme, shared by every page.
 *
 * The values are the town's own: the greens are its grass, the blues its sky
 * and sea, the timber its signposts, and the chunky offset shadow is the one
 * the HUD panels sit on. A landing page that used a different palette from the
 * thing it is advertising would be selling something else.
 *
 * Kept as plain CSS custom properties, so the app can adopt the same file the
 * moment it wants to.
 */

:root {
  /* Ink and paper */
  --ink: #22303f;
  --ink-soft: #55677a;
  --paper: #f4f6ef;
  --panel: #ffffff;
  --edge: rgba(34, 48, 63, 0.14);

  /* Straight off the island */
  --grass: #87a468;
  --grass-deep: #5c7b45;
  --sky: #a9c2d4;
  --sky-bright: #8fd3f4;
  --sea: #357f9d;
  --sand: #d8cba4;
  --timber: #b08a55;
  --timber-dark: #8a6a3f;

  /* The health ramp, used here only where something means health */
  --ok: #25ff7d;
  --ok-ink: #1f7a48;
  --warn: #ffb200;
  --bad: #ff1400;

  /* The town's panels sit on a hard offset shadow, not a soft blur. It is most
     of why the thing reads as built out of blocks. */
  --lift: 0 4px 0 rgba(34, 48, 63, 0.14), 0 10px 24px rgba(34, 48, 63, 0.14);
  --lift-lg: 0 6px 0 rgba(34, 48, 63, 0.16), 0 18px 40px rgba(34, 48, 63, 0.18);
  --radius: 14px;
  --radius-pill: 999px;

  --font: 'Nunito', 'Avenir Next', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 44rem; }

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); font-weight: 900; margin: 0 0 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin: 0 0 0.6rem; }
h3 { font-size: 1.05rem; font-weight: 800; margin: 0 0 0.3rem; }
p { margin: 0 0 1rem; }
a { color: var(--ok-ink); }

.lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--ink-soft); }
.note { color: var(--ink-soft); font-size: 0.95rem; }

/* ---- the pill, which is the town's one repeated shape ---------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--panel);
  border: 2px solid var(--edge);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.95rem;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: var(--lift);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--grass-deep);
  color: #fff;
  border: 2px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-pill);
  padding: 0.85rem 1.6rem;
  font-weight: 900;
  font-size: 1.02rem;
  text-decoration: none;
  box-shadow: var(--lift);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.cta:hover { transform: translateY(-2px); box-shadow: var(--lift-lg); }
.cta.ghost { background: var(--panel); color: var(--ink); border-color: var(--edge); }

.panel {
  background: var(--panel);
  border: 2px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: var(--lift);
  padding: 1.4rem 1.5rem;
}

/* ---- layout ---------------------------------------------------------- */

section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.grid { display: grid; gap: 1.1rem; }
@media (min-width: 44rem) { .cols-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 58rem) { .cols-3 { grid-template-columns: repeat(3, 1fr); } }

figure { margin: 0; }
figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 2px solid var(--edge);
  box-shadow: var(--lift-lg);
  background: var(--sky);
}
figcaption { margin-top: 0.7rem; color: var(--ink-soft); font-size: 0.93rem; }

/* A swatch of what a signal turns into, so the mapping table is not all text. */
.swatch {
  width: 1.1rem; height: 1.1rem; border-radius: 5px; flex: none;
  border: 2px solid rgba(34, 48, 63, 0.18);
}

/* ---- the cookie notice ------------------------------------------------
   Styled as one of the town's signposts: a timber board on two posts, planted
   in the corner of the page. It is asking permission, so it should look like
   part of the place rather than a piece of legal furniture bolted on. */

.consent {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1.25rem;
  display: flex;
  justify-content: center;
  z-index: 50;
}

.consent-sign {
  position: relative;
  max-width: 34rem;
  background: linear-gradient(180deg, #d8b98c, #c9a274);
  color: #3a2b18;
  border: 3px solid var(--timber-dark);
  border-radius: 10px;
  padding: 1rem 1.2rem 1.1rem;
  box-shadow: var(--lift-lg);
  font-size: 0.95rem;
}

/* The two posts it is nailed to. */
.consent-sign::before,
.consent-sign::after {
  content: '';
  position: absolute;
  bottom: -1.1rem;
  width: 0.7rem;
  height: 1.2rem;
  background: var(--timber-dark);
  border-radius: 0 0 3px 3px;
  z-index: -1;
}
.consent-sign::before { left: 2.2rem; }
.consent-sign::after { right: 2.2rem; }

.consent-sign p { margin: 0 0 0.9rem; }
.consent-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.consent-actions .cta { padding: 0.5rem 1.1rem; font-size: 0.92rem; cursor: pointer; }

@media (max-width: 30rem) {
  .consent-sign::before, .consent-sign::after { display: none; }
}
