/* ── Yield marketing site — design tokens ──────────────────────────────────
   The palette is sampled from the game's own tileset rather than invented:
   quantising a village screenshot to 16 colours gives the grass, soil and
   wood values below. The previous site used the in-game *UI* tokens instead
   (a near-black navy built for glass panels floating over the world), which
   read as generic dark-mode SaaS once there was no world behind it.

   Gold is the one value carried over from css/variables.css unchanged — it
   is the brand accent everywhere in the product, so it has to match.
   ------------------------------------------------------------------------ */

@font-face { font-family: 'Inter'; src: url('../assets/fonts/inter-latin-400-normal.woff2') format('woff2'); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../assets/fonts/inter-latin-400-italic.woff2') format('woff2'); font-weight: 400 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../assets/fonts/inter-latin-700-normal.woff2') format('woff2'); font-weight: 600 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../assets/fonts/inter-latin-700-italic.woff2') format('woff2'); font-weight: 600 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'VT323'; src: url('../assets/fonts/vt323-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  /* ── Type ── */
  --font-ui:      'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'VT323', 'Courier New', monospace;

  /* ── Earth: sampled from the tilemap ── */
  --grass-300: #a8d24a;
  --grass-400: #6b9d2c;
  --grass-500: #517d1f;
  --grass-600: #4b711c;
  --grass-700: #376d29;
  --grass-800: #235d37;

  --soil-300:  #c98b4a;
  --soil-400:  #ad7138;
  --soil-500:  #8d592f;
  --soil-600:  #763a27;

  --wood-500:  #5c3a24;
  --wood-600:  #472926;
  --wood-700:  #33201a;

  /* ── Night: the page ground, warm not blue ── */
  --night-900: #0b0f07;
  --night-850: #101609;
  --night-800: #141c0e;
  --night-700: #1b2513;
  --night-600: #24301c;
  --night-500: #33422658;

  /* ── Accents ── */
  --gold-300:  #ffe9a8;
  --gold-400:  #f7d977;
  --gold-500:  #f0c040;   /* brand — matches css/variables.css */
  --gold-600:  #c99a22;
  --sky-400:   #4aa8d8;
  --sky-500:   #2f87b8;
  --berry-400: #d4707f;
  --plum-400:  #9d7ad4;

  /* ── Text: warm off-whites. Pure #f0f0f0 on a green ground reads cold. ── */
  --ink-100:   #f6efdd;
  --ink-200:   #e8e0cc;
  --ink-300:   #bfba9f;
  --ink-400:   #8f8d76;

  /* ── Surfaces ── */
  --plate:        #18220f;
  --plate-raised: #1e2a13;
  --plate-line:   #3a4b26;
  --plate-line-2: #4d6333;

  /* ── Pixel-craft primitives ──
     Corners are cut with clip-path rather than rounded: an 8px notch reads as
     a sprite edge at any zoom, where border-radius reads as a web card. The
     shadow is hard-edged for the same reason — a blurred shadow is the single
     biggest giveaway of a stock CSS component. */
  --notch: 10px;
  --cut: polygon(
    var(--notch) 0, calc(100% - var(--notch)) 0, 100% var(--notch),
    100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%,
    var(--notch) 100%, 0 calc(100% - var(--notch)), 0 var(--notch)
  );
  --shadow-hard:  4px 4px 0 rgba(0, 0, 0, 0.45);
  --shadow-lift:  6px 8px 0 rgba(0, 0, 0, 0.5);
  --shadow-glow:  0 0 32px rgba(240, 192, 64, 0.18);

  /* ── Motion: mirrors css/variables.css so the site feels like the game ── */
  --dur-fast:   150ms;
  --dur-base:   200ms;
  --dur-slow:   320ms;
  --ease-spring: cubic-bezier(0.34, 1.3, 0.64, 1);
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);

  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* The sticky header would otherwise cover the top of every anchored section. */
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background-color: var(--night-900);
  color: var(--ink-200);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* A hand-mixed dither over the flat background. Two offset dot grids at very
   low alpha break up the large empty areas the way a tileset's noise pixels
   do, so the page never shows a dead flat field of colour. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(rgba(168, 210, 74, 0.045) 1px, transparent 1px),
    radial-gradient(rgba(240, 192, 64, 0.03) 1px, transparent 1px);
  background-size: 6px 6px, 10px 10px;
  background-position: 0 0, 3px 5px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.05;
  color: var(--ink-100);
  margin: 0;
  /* A hard 2px offset in the darkest earth tone — the same emboss the game's
     own panel headers use. No blur: blur would soften it into a web shadow. */
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55);
}

p { margin: 0; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

*:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
}

::selection { background: var(--gold-500); color: var(--night-900); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
