/* ==========================================================================
   Farm Game — shared chrome
   Design tokens, reset, buttons, nav, footer, toast. Loaded by every page.
   Page-specific styles go in their own file loaded after this one.
   ========================================================================== */

:root {
  --sky-top:    #9fdcfb;
  --sky-bottom: #dff3ff;
  --cream:      #fffaf0;
  --cream-deep: #fdf0d9;
  --ink:        #3b2b1b;
  --ink-soft:   #6b5744;
  --grass:      #6cb63b;
  --grass-deep: #4d8f28;
  --barn:       #c0392b;
  --barn-dark:  #96291f;
  --wheat:      #e6a935;
  --wheat-deep: #c4801c;
  --wood:       #a06f3d;
  --line:       #ecdcc1;
  --shadow:     0 10px 24px rgba(59, 43, 27, .12);
  --radius:     18px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Nunito, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: Fredoka, Nunito, system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.12;
  margin: 0;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 12px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--wheat-deep);
  outline-offset: 3px;
}

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.35rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: Fredoka, Nunito, sans-serif;
  font-weight: 600;
  font-size: .98rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease;
}

.btn--lg { padding: .95rem 1.9rem; font-size: 1.1rem; }

.btn--primary {
  background: var(--wheat);
  color: #4a3308;
  border-color: var(--wheat-deep);
  box-shadow: 0 4px 0 var(--wheat-deep), var(--shadow);
}
.btn--primary:hover { background: #f0b944; transform: translateY(-2px); box-shadow: 0 6px 0 var(--wheat-deep), var(--shadow); }
.btn--primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--wheat-deep); }

.btn--ghost {
  background: rgba(255, 255, 255, .75);
  color: var(--ink);
  border-color: #d8c6a6;
}
.btn--ghost:hover { background: #fff; transform: translateY(-2px); }
.btn--ghost:active { transform: translateY(1px); }

.btn--on-dark {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .55);
  color: #fff;
}
.btn--on-dark:hover { background: rgba(255, 255, 255, .22); }

/* --- Nav ------------------------------------------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 250, 240, .88);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: .75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: var(--ink);
  font-family: Fredoka, sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
}
.brand__mark { font-size: 1.5rem; }

.nav__links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}
.nav__links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
}
.nav__links a:hover { color: var(--barn); }

.nav__actions { display: flex; gap: .6rem; }

/* --- Footer ------------------------------------------------------------------ */

.footer {
  background: var(--ink);
  color: #d9cbb9;
  padding: 2rem 0;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.footer__brand {
  font-family: Fredoka, sans-serif;
  font-weight: 600;
  color: #fff;
  font-size: 1.1rem;
}

.footer__legal { font-size: .88rem; opacity: .75; }

/* --- Toast (placeholder buttons) ---------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 150%);
  background: var(--ink);
  color: #fff;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
  z-index: 200;
  opacity: 0;
  transition: transform .28s cubic-bezier(.2, .9, .3, 1.4), opacity .28s ease;
  max-width: min(90vw, 420px);
  text-align: center;
}
.toast.is-open { transform: translate(-50%, 0); opacity: 1; }

/* --- Responsive ---------------------------------------------------------------- */

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__actions { margin-left: auto; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand__name { font-size: 1.15rem; }
  .btn { padding: .6rem 1.1rem; font-size: .9rem; }
  .btn--lg { padding: .85rem 1.5rem; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
