/* ============================================
   Burrow Watch — design tokens
   ============================================ */
:root {
  --ink: #23261F;
  --parchment: #EDE8D8;
  --parchment-warm: #E4DEC9;
  --eucalypt: #3C4A34;
  --eucalypt-deep: #2A3526;
  --ember: #9C4221;
  --moss: #A9B48C;
  --bark: #7A6F5C;
  --paper-line: rgba(35, 38, 31, 0.14);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --measure: 62ch;
  --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

a {
  color: var(--eucalypt-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--ember); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.4em;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; font-weight: 600; }

p { max-width: var(--measure); margin: 0 0 1.1em; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--parchment);
  border-bottom: 1px solid var(--paper-line);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.96rem;
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  border-bottom-color: var(--ember);
}
.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--parchment);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--paper-line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--paper-line); }
  .nav-links a { display: block; padding: 14px 32px; }
  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    padding: 6px 10px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: #F6F3E9;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(35,38,31,0.05) 0%, rgba(24,26,20,0.78) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 56px 32px 44px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.hero h1 {
  color: #FBF9F1;
  max-width: 14ch;
  opacity: 0;
  animation: rise 0.7s ease-out 0.1s forwards;
}
.hero .lede {
  color: #E7E2CF;
  font-size: 1.15rem;
  max-width: 46ch;
  margin-top: 10px;
  opacity: 0;
  animation: rise 0.7s ease-out 0.28s forwards;
}
.hero .credit {
  color: rgba(251,249,241,0.55);
  font-size: 0.78rem;
  margin-top: 18px;
}
.hero .credit a { color: rgba(251,249,241,0.75); }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Sections ---------- */
.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--paper-line);
}
.section:last-of-type { border-bottom: none; }
.section-narrow { max-width: 900px; margin: 0 auto; }

.two-col {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
}

.facts {
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.facts dt {
  font-size: 0.78rem;
  color: var(--bark);
  margin-top: 14px;
}
.facts dt:first-child { margin-top: 0; }
.facts dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

/* ---------- Photo strip ---------- */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 720px) {
  .photo-strip { grid-template-columns: 1fr; }
}
.photo-strip figure { margin: 0; }
.photo-strip img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.photo-strip figcaption {
  font-size: 0.78rem;
  color: var(--bark);
  margin-top: 6px;
}

/* ---------- Resource preview ---------- */
.resource-preview-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--paper-line);
}
.resource-preview-list li {
  border-bottom: 1px solid var(--paper-line);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: baseline;
}
.resource-preview-list h3 { margin: 0; font-size: 1.05rem; }
.resource-preview-list p { margin: 4px 0 0; color: var(--bark); font-size: 0.94rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--eucalypt);
  background: var(--eucalypt);
  color: #F6F3E9;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--eucalypt-deep); color: #F6F3E9; }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--bark);
}
.btn-outline:hover { background: var(--ink); color: var(--parchment); border-color: var(--ink); }
.btn-small { padding: 6px 12px; font-size: 0.8rem; }

/* ---------- Resources page ---------- */
.resource-group { margin-bottom: 48px; }
.resource-group h2 {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 4px;
}
.resource-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--paper-line);
}
.resource-row .meta h3 { margin: 0 0 4px; font-size: 1.02rem; }
.resource-row .meta p { margin: 0; color: var(--bark); font-size: 0.9rem; max-width: 52ch; }
.resource-row .actions { display: flex; gap: 8px; flex-shrink: 0; }
.copy-feedback {
  font-size: 0.78rem;
  color: var(--eucalypt-deep);
  margin-left: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.copy-feedback.show { opacity: 1; }

/* ---------- Feedback form ---------- */
.form-field { margin-bottom: 22px; }
.form-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-field input[type=text],
.form-field input[type=email],
.form-field textarea,
.form-field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--bark);
  border-radius: var(--radius);
  background: #F7F4EA;
  color: var(--ink);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-hint { font-size: 0.8rem; color: var(--bark); margin-top: 4px; }
.rating-group { display: flex; gap: 10px; }
.rating-group label {
  border: 1px solid var(--bark);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-weight: 400;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rating-group input { accent-color: var(--eucalypt); }
.honeypot-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-success {
  border: 1px solid var(--eucalypt);
  background: rgba(60,74,52,0.08);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: none;
}
.form-success.show { display: block; }

/* ---------- Password gate ---------- */
.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--parchment);
  padding: 20px;
}
.gate-box { max-width: 380px; width: 100%; text-align: left; }
.gate-box h1 { color: var(--parchment); font-size: 1.8rem; }
.gate-box p { color: var(--bark); font-size: 0.92rem; }
.gate-box input {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--bark);
  background: #2E3128;
  color: var(--parchment);
  font-size: 1rem;
  margin: 14px 0 10px;
}
.gate-error { color: #E29A7A; font-size: 0.85rem; min-height: 1.2em; }

/* Real page content is hidden by default and only shown once the gate
   in main.js confirms the password (or finds a valid session). This
   avoids a flash of real content before the check runs. */
#site-content { display: none; }
body.gate-unlocked #site-content { display: block; }
body.gate-unlocked #password-gate { display: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Prompt blocks (toolkit page) ---------- */
.prompt-block {
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  background: #F7F4EA;
  padding: 18px 20px;
  margin: 14px 0 8px;
}
.prompt-block pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink);
}
.prompt-block-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}
.prompt-block-head h3 { margin: 0; font-size: 1rem; }

.ladder {
  border-top: 1px solid var(--paper-line);
  margin-top: 8px;
}
.ladder-rung {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--paper-line);
  align-items: baseline;
}
.ladder-rung .rung-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
}
@media (max-width: 640px) {
  .ladder-rung { grid-template-columns: 1fr; gap: 4px; }
}

.platform-note {
  border-left: 3px solid var(--ember);
  padding: 4px 0 4px 18px;
  margin: 20px 0;
  color: var(--ink);
}
.platform-note strong { color: var(--ember); }
footer.site-footer {
  padding: 40px 0 60px;
  color: var(--bark);
  font-size: 0.85rem;
}
footer.site-footer a { color: var(--bark); }
footer.site-footer .foot-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
