/*
  Gordie's Field Book: shared styles for every page of gordiesfieldbook.com.

  - No web fonts, no third-party assets, no inline styles anywhere in the HTML.
  - CSP: /delete-account/ is served with default-src 'none' (no images or fonts;
    style-src 'self'). Rules that load an image with url(...) live only on classes
    that page never uses: .hero, .page-hero--art, .section--topo and .cta-card.
    Gradients are not image fetches, so they are safe everywhere.
  - Palette: spruce #17443a, cream #f9f2e3, blaze orange, lake blue, maple amber.
    Blaze and amber are for graphics only; text uses the darker "-ink" variants.
*/

:root {
  color-scheme: light dark;

  --spruce: #17443a;
  --deep: #0e2a24;
  --pine: #2a5c4f;
  --sage: #9fc2a8;
  --cream: #f9f2e3;
  --kraft: #e6d7b8;
  --blaze: #e8601c;
  --lake: #2b6585;
  --amber: #c7861e;
  --gold: #f2cf7e;
  --bezel: #111816;

  --bg: var(--cream);
  --bg-alt: #f3e9d4;
  --surface: #fffcf4;
  --text: #1f2d27;
  --muted: #4f5e55;
  --border: #dccaa6;
  --link: #245a78;
  --accent-ink: #a13f12;
  --hunt-ink: #a13f12;
  --fish-ink: #245a78;
  --maple-ink: #8a5a10;
  --focus: #a13f12;
  --danger-bg: #a3271b;
  --danger-bg-hover: #861d13;
  --danger-text: #fff8ee;
  --on-dark: #f9f2e3;
  --on-dark-muted: #d4e0d6;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 72rem;
  --radius: 0.875rem;
  --radius-lg: 1.375rem;
  --shadow: 0 1px 0 rgb(23 68 58 / 0.06), 0 18px 40px -26px rgb(23 68 58 / 0.5);
  --device-shadow: 0 34px 60px -30px rgb(0 0 0 / 0.55);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e2a24;
    --bg-alt: #11312a;
    --surface: #153a31;
    --text: #f3ebda;
    --muted: #bdd0c2;
    --border: #2f5d50;
    --link: #9dd0ea;
    --accent-ink: #ffa477;
    --hunt-ink: #ffa477;
    --fish-ink: #9dd0ea;
    --maple-ink: #f2cf7e;
    --focus: #f2cf7e;
    --shadow: 0 18px 40px -26px rgb(0 0 0 / 0.8);
  }
}

/* ---------- Base ---------- */

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

/* account.js shows and hides elements with the hidden attribute; never let a
   display rule below override it. */
[hidden] {
  display: none !important;
}

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
}

main {
  flex: 1 0 auto;
}

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.16em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

button {
  font: inherit;
}

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

.skip-link {
  position: absolute;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  background: var(--gold);
  color: var(--deep);
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  outline-color: var(--deep);
}

/* Dark contexts: the header, heroes, bands and footer stay spruce in both themes. */
.site-header,
.hero,
.page-hero,
.band,
.cta-card,
.site-footer {
  --link: var(--gold);
  --focus: var(--gold);
  --accent-ink: var(--gold);
  --muted: var(--on-dark-muted);
  color: var(--on-dark);
}

/* ---------- Kicker labels ---------- */

.kicker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.85rem;
  color: var(--accent-ink);
  font: 700 0.78rem/1.3 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  flex: none;
  width: 1.75rem;
  height: 3px;
  border-radius: 2px;
  background: var(--blaze);
}

/* ---------- Header ---------- */

.site-header {
  background: var(--spruce);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  color: var(--on-dark);
  font: 700 1.25rem/1.2 var(--serif);
  text-decoration: none;
}

.brand__mark {
  flex: none;
  width: 2.5rem;
  height: auto;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: 999px;
  color: var(--on-dark);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  background: rgb(249 242 227 / 0.1);
}

.site-nav a[aria-current="page"] {
  background: rgb(249 242 227 / 0.14);
  box-shadow: inset 0 -2px 0 var(--gold);
}

@media (max-width: 39.99rem) {
  .site-nav {
    width: 100%;
    margin-inline: -0.85rem;
  }
}

/* ---------- Store buttons (filled in by /site.js) ---------- */

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.store-btn {
  display: inline-flex;
  flex: 1 1 11rem;
  max-width: 15rem;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.55rem 1.25rem 0.55rem 1rem;
  border: 2px dashed rgb(249 242 227 / 0.6);
  border-radius: 0.9rem;
  color: var(--on-dark);
  line-height: 1.15;
  text-decoration: none;
}

.store-btn__icon {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
}

.store-btn__small {
  display: block;
  color: var(--gold);
  font: 700 0.7rem/1.3 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.store-btn__big {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
}

.store-btn--live {
  border-style: solid;
  border-color: var(--cream);
  background: var(--cream);
  color: var(--deep);
}

.store-btn--live .store-btn__small {
  color: var(--spruce);
}

.store-btn--live:hover {
  border-color: var(--gold);
  background: var(--gold);
}

.store-btn--badge,
.store-btn--badge:hover {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
}

.store-btn--badge img {
  display: block;
  width: auto;
  height: 3.25rem;
}

.store-note {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Device frames for screenshots ---------- */

.device {
  margin: 0;
}

.device img {
  display: block;
  width: 100%;
  height: auto;
  border: 0.65rem solid var(--bezel);
  border-radius: 2.6rem;
  background: var(--bezel);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), var(--device-shadow);
}

.device--phone {
  width: min(18rem, 66vw);
}

.device--tablet {
  width: min(27rem, 100%);
}

.device--tablet img {
  border-width: 0.85rem;
  border-radius: 1.6rem;
}

.device figcaption {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

/* ---------- Landing hero ---------- */

.hero {
  overflow: hidden;
  padding-block: clamp(2.25rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5.5rem);
  background: var(--spruce) url("/assets/art/topo-dark.svg") center / cover no-repeat;
}

.hero__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.6rem, 4.5vw + 1.2rem, 4.75rem);
}

.hero__lede {
  max-width: 34rem;
  margin: 0;
  color: var(--on-dark-muted);
  font-size: clamp(1.1rem, 0.6vw + 1rem, 1.3rem);
}

.hero__media {
  position: relative;
  justify-self: center;
}

.stamp {
  position: absolute;
  top: 1.75rem;
  left: -2.75rem;
  display: grid;
  place-content: center;
  width: 7rem;
  aspect-ratio: 1;
  margin: 0;
  padding: 0.6rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--spruce), 0 0 0 6px var(--gold);
  color: var(--deep);
  font: 700 0.74rem/1.25 var(--mono);
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-8deg);
}

@media (min-width: 56rem) {
  .hero__grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

@media (max-width: 30rem) {
  .stamp {
    left: -1.25rem;
    width: 5.75rem;
    font-size: 0.66rem;
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.section--alt {
  background: var(--bg-alt);
}

.section--topo {
  background: var(--bg-alt) url("/assets/art/topo-light.svg") center / cover no-repeat;
}

@media (prefers-color-scheme: dark) {
  .section--topo {
    background-image: url("/assets/art/topo-dark.svg");
  }
}

.band {
  background: var(--spruce);
}

.section__head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__head h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 2.4vw + 1.2rem, 3rem);
}

.section__head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.125rem;
}

/* ---------- Seasons ---------- */

.seasons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1.5rem;
}

.season {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.season__art {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--kraft);
}

.season__body {
  flex: 1;
  padding: 1.35rem 1.5rem 1.6rem;
  border-top: 6px solid var(--tab, var(--pine));
}

.season--hunting {
  --tab: var(--blaze);
  --label: var(--hunt-ink);
}

.season--fishing {
  --tab: var(--lake);
  --label: var(--fish-ink);
}

.season--sugaring {
  --tab: var(--amber);
  --label: var(--maple-ink);
}

.season__label {
  margin: 0 0 0.35rem;
  color: var(--label, var(--accent-ink));
  font: 700 0.75rem/1.3 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.season h3 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.season p:last-child {
  margin: 0;
  color: var(--muted);
}

/* ---------- Features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature {
  padding: 1.4rem 1.4rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.9rem;
  border-radius: 0.8rem;
  background: var(--spruce);
  color: var(--cream);
}

.feature__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.feature h3 {
  margin: 0 0 0.35rem;
  font: 700 1.1rem/1.3 var(--sans);
  letter-spacing: 0;
}

.feature p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Screenshots ---------- */

.gallery {
  display: grid;
  grid-auto-columns: min(15rem, 68vw);
  grid-auto-flow: column;
  gap: 1.5rem;
  margin-inline: -1.25rem;
  padding: 0.5rem 1.25rem 1.5rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1.25rem;
}

.gallery .device {
  width: 100%;
  scroll-snap-align: center;
}

.gallery:focus-visible {
  outline-offset: -3px;
}

@media (min-width: 56rem) {
  .gallery {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 16rem));
    justify-content: space-evenly;
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
  }
}

.tablet-row {
  display: grid;
  gap: 2rem;
  align-items: center;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

.tablet-row .device {
  justify-self: center;
}

.tablet-row h3 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.6rem, 1.4vw + 1.1rem, 2.1rem);
}

.tablet-row p {
  max-width: 30rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

@media (min-width: 56rem) {
  .tablet-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Privacy band ---------- */

.promises {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.promise {
  padding: 0.2rem 0 0.2rem 1.15rem;
  border-left: 3px solid var(--gold);
}

.promise h3 {
  margin: 0 0 0.35rem;
  font: 700 1.15rem/1.3 var(--sans);
  letter-spacing: 0;
}

.promise p {
  margin: 0;
  color: var(--muted);
}

.band__more {
  margin: 2.25rem 0 0;
  font-weight: 700;
}

/* ---------- FAQ ---------- */

.faq-layout {
  display: grid;
  gap: 0.5rem 3rem;
}

@media (min-width: 60rem) {
  .faq-layout {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: start;
  }
}

.faq {
  border-top: 1px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  position: relative;
  min-height: 44px;
  padding: 1.1rem 2.75rem 1.1rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  content: "+" / "";
  position: absolute;
  top: 50%;
  right: 0.35rem;
  color: var(--accent-ink);
  font: 400 1.75rem/1 var(--sans);
  transform: translateY(-50%);
}

.faq details[open] summary::after {
  content: "\2212";
  content: "\2212" / "";
}

.faq details p {
  max-width: 42rem;
  margin: 0 0 1.25rem;
  color: var(--muted);
}

/* ---------- Closing call to action ---------- */

.section--tight {
  padding-top: 0;
}

.cta-card {
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1.25rem, 5vw, 3rem);
  border-radius: var(--radius-lg);
  background: var(--spruce) url("/assets/art/topo-dark.svg") center / cover no-repeat;
  text-align: center;
}

.cta-card h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(2rem, 2.4vw + 1.2rem, 3rem);
}

.cta-card p {
  margin: 0 auto;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.cta-card .kicker,
.cta-card .store-row {
  justify-content: center;
}

/* ---------- Inner pages ---------- */

.page-hero {
  padding-block: clamp(1.75rem, 5vw, 3.25rem) clamp(2.25rem, 5vw, 3.75rem);
  background: var(--spruce);
}

.page-hero--art {
  background: var(--spruce) url("/assets/art/topo-dark.svg") center / cover no-repeat;
}

.page-hero h1 {
  max-width: 44rem;
  margin: 0;
  font-size: clamp(2.1rem, 3vw + 1.2rem, 3.25rem);
}

.page-hero__lede {
  max-width: 42rem;
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 1.125rem;
}

.page-body {
  padding-block: clamp(2.25rem, 6vw, 4rem) clamp(3rem, 7vw, 5rem);
}

.page-layout {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 60rem) {
  .page-layout {
    grid-template-columns: minmax(0, 44rem) minmax(15rem, 19rem);
    justify-content: space-between;
    align-items: start;
  }

  .aside-card {
    position: sticky;
    top: 1.5rem;
  }
}

.prose {
  max-width: 44rem;
}

.prose h2 {
  margin: 2.4rem 0 0.6rem;
  font-size: 1.65rem;
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 1rem;
}

.aside-card {
  padding: 1.4rem 1.5rem 1.5rem;
  border: 1px solid var(--border);
  border-top: 6px solid var(--blaze);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.aside-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
}

.aside-card p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.aside-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.aside-card li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.aside-card a[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

/* ---------- Account deletion ---------- */

.panel {
  max-width: 42rem;
  padding: clamp(1.4rem, 4vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel > p {
  margin: 0 0 1rem;
}

.signin-slot {
  min-height: 44px;
  margin: 1.5rem 0 0.75rem;
}

.status {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--lake);
  border-radius: 0.6rem;
  background: var(--bg-alt);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem 1.35rem;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.btn--danger {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.btn--danger:hover {
  background: var(--danger-bg-hover);
}

.notice {
  display: block;
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--blaze);
  border-radius: 0.6rem;
  background: var(--bg-alt);
}

.panel__help {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

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

.site-footer {
  margin-top: auto;
  /* Transparent behind the tree line, then solid spruce. */
  background: linear-gradient(to bottom, transparent 0 119px, var(--spruce) 119px);
}

.treeline {
  display: block;
  width: 100%;
  height: 120px;
}

.site-footer__inner {
  display: grid;
  gap: 2rem;
  padding-block: 0.5rem 3rem;
}

@media (min-width: 48rem) {
  .site-footer__inner {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.footer-tagline {
  max-width: 26rem;
  margin: 0.75rem 0 1rem;
  color: var(--on-dark-muted);
}

.footer-meta {
  margin: 0;
  color: var(--on-dark-muted);
  font-size: 0.95rem;
}

.footer-nav h2 {
  margin: 0 0 0.25rem;
  color: var(--gold);
  font: 700 0.78rem/1.3 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-nav ul {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--on-dark);
}

/* ---------- Motion and print ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .site-nav a,
  .store-btn,
  .btn {
    transition: background-color 0.15s ease, border-color 0.15s ease;
  }
}

@media print {
  .skip-link,
  .site-nav,
  .treeline,
  .store-row,
  .stamp {
    display: none;
  }

  .site-header,
  .hero,
  .page-hero,
  .band,
  .cta-card,
  .site-footer {
    background: none;
    color: #000;
  }
}
