/* ============================================================
   DROPGOAT — site styles
   Brand: DROPGOAT (never GOATDROP).
   Palette: dark base, gold accent, cream type.
   Mobile-first. Single stylesheet. Zero deps.
   ============================================================ */

:root {
  --bg: #0e0e10;
  --bg-elevated: #18181c;
  --bg-card: #1f1f24;
  --border: #2a2a32;
  --gold: #e8b62d;
  --gold-bright: #ffd24a;
  --cream: #f4eddb;
  --muted: #9b9b9b;
  --danger: #d96a4a;
  --max-w: 1100px;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  --font-display: "Bebas Neue", "Impact", "Arial Black", sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--gold-bright);
  text-decoration: none;
  border-bottom: 1px dotted rgba(232, 182, 45, 0.4);
}
a:hover { color: var(--cream); border-bottom-color: var(--cream); }

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  color: var(--cream);
  margin: 0 0 0.4em;
  line-height: 1.05;
  font-weight: 400;
}
h1 { font-size: clamp(2.4rem, 7vw, 5.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: 1.3rem; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(14, 14, 16, 0.85);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.25rem;
  max-width: var(--max-w); margin: 0 auto;
  gap: 1rem;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-decoration: none;
  border: none;
}
.brand:hover { color: var(--gold-bright); border: none; }
.nav-links { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.nav-links a {
  color: var(--cream);
  font-size: 0.95rem;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.nav-links a:hover { color: var(--gold-bright); }
.nav-links a[aria-current="page"] { color: var(--gold); }

/* (Old 540px column stack replaced by the burger nav below — see "mobile burger nav".) */

/* ---------- hero ---------- */
.hero {
  padding: clamp(3rem, 9vw, 6rem) 0 clamp(2rem, 6vw, 4rem);
  text-align: center;
}
.hero .tagline {
  font-family: var(--font-display);
  letter-spacing: 0.15em;
  color: var(--gold);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.hero p.lede {
  max-width: 640px;
  margin: 1.2rem auto 1.6rem;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: var(--cream);
}
.hero-cta {
  display: inline-flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center;
  margin-top: 1rem;
}
.no-ca-notice {
  max-width: 56ch;
  margin: 1rem auto 0;
  padding: 0.75rem 1rem;
  border: 1px dashed rgba(255, 200, 80, 0.45);
  border-radius: 0.6rem;
  background: rgba(255, 200, 80, 0.06);
  color: var(--cream);
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
}
.no-ca-notice a { color: var(--gold-bright); text-decoration: underline; }

.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1rem;
  border: 1px solid var(--gold);
  color: var(--bg);
  background: var(--gold);
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn:hover { background: var(--gold-bright); transform: translateY(-1px); }
.btn.btn-ghost {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.btn.btn-ghost:hover { background: rgba(232, 182, 45, 0.12); color: var(--gold-bright); }

/* ---------- section blocks ---------- */
section { padding: clamp(2rem, 6vw, 4rem) 0; }
section + section { border-top: 1px solid var(--border); }

.section-header { text-align: center; margin-bottom: 2rem; }
.section-header p { color: var(--muted); max-width: 540px; margin: 0.5rem auto 0; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.note {
  background: rgba(232, 182, 45, 0.08);
  border-left: 3px solid var(--gold);
  padding: 0.9rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--cream);
  margin: 1rem 0;
}
.note.danger {
  background: rgba(217, 106, 74, 0.08);
  border-left-color: var(--danger);
}

/* ---------- gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
}
.gallery .thumb {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s ease, border-color 0.15s ease;
}
.gallery .thumb:hover { transform: translateY(-2px); border-color: var(--gold); }
.gallery .thumb img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  background: #000;
}
.gallery .thumb figcaption {
  padding: 0.5rem 0.7rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: left;
  border-top: 1px solid var(--border);
}

/* "clean" gallery — no captions, no caption bar; thumb itself is the frame.
   Used on home (Recently dropped) and lore (full archive) where image
   captions have been removed. */
.gallery-clean .thumb { border-radius: 12px; }
.gallery-clean .thumb figcaption { display: none; }
.gallery-clean .thumb img { aspect-ratio: 1 / 1; }

p.muted { color: var(--muted); text-align: center; }

/* ---------- falling-goat hero ---------- */
/* Layout intent (Jay-approved): the DROPGOAT wordmark is the center of
   gravity of the hero and must read as visually centered to the viewport.
   The goat is a separate animation layer that sits on top of the hero, in
   its own column ("lane") whose horizontal position is set by the CSS
   custom property `--goat-x`. The lane is absolutely positioned against
   `.hero` so it does NOT affect H1 centering.

   `script.js` randomises `--goat-x` on each animation iteration so the
   goat falls in a different vertical line every loop. The default X is
   biased to the right of the wordmark (~72%) so the first drop reads
   "next to the words", with a small visible gap.

   Animation is suppressed for users with prefers-reduced-motion. */
.hero {
  position: relative;
  overflow: hidden;
}
.hero-title {
  text-align: center;
  margin: 0 auto 0.4em;
}
.hero-title h1 {
  margin: 0;
  line-height: 1;
  display: inline-block;
}
.goat-lane {
  position: absolute;
  /* `--goat-x` is set by JS per-iteration; default keeps a small gap to
     the right of the wordmark on first paint and as a no-JS fallback. */
  left: var(--goat-x, 72%);
  top: 0;
  width: clamp(72px, 12vw, 140px);
  height: 100%;
  pointer-events: none;
  z-index: 0;
  /* When the lane re-snaps to a new X the transform animation keeps
     running smoothly; we only animate the inner img so changing left
     doesn't visibly jump mid-fall. */
  transition: left 0s; /* explicit: no transition between lanes */
}
.falling-goat {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
  transform-origin: 50% 45%;
  /* Single combined keyframe so translate + rotate stay locked. */
  animation: dg-fall 4.5s linear infinite;
}
@keyframes dg-fall {
  0%   { transform: translateY(-120%) rotate(-8deg); }
  50%  { transform: translateY(50%)   rotate(6deg);  }
  100% { transform: translateY(120vh) rotate(-4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .falling-goat {
    animation: none;
    /* Park goat statically inside its lane next to the wordmark. */
    top: 50%;
    transform: translateY(-50%) rotate(-6deg);
  }
}
@media (max-width: 480px) {
  .goat-lane { width: 64px; }
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 95vw; max-height: 90vh; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--cream);
  width: 44px; height: 44px;
  border-radius: 50%; cursor: pointer;
  font-size: 1.2rem;
}
.lightbox-close:hover { background: var(--gold); color: var(--bg); }

/* ---------- prose pages (about / risks / treasury) ---------- */
.prose {
  max-width: 720px;
  margin: 0 auto;
}
.prose h2 { margin-top: 2.5rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }
.prose .kicker {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

/* ---------- competitions page ---------- */
.comp-tldr {
  margin: 1.25rem 0;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: var(--bg-elevated);
  font-size: 1.02rem;
}
.comp-cta-row {
  margin: 1rem 0 1.5rem;
  text-align: center;
}
.comp-cta-row .btn-primary,
a.btn-primary {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  background: var(--gold);
  color: #16161a;
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: filter 120ms ease, transform 120ms ease;
  min-height: 44px;
  min-width: 200px;
  box-sizing: border-box;
}
a.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
a.btn-primary:active { transform: translateY(0); }
.comp-hero {
  margin: 1.5rem 0 2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-elevated);
}
.comp-hero img {
  display: block;
  width: 100%;
  height: auto;
}
.comp-hero figcaption {
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  text-align: center;
  border-top: 1px solid var(--border);
}
.comp-callout {
  margin: 1.5rem 0;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: rgba(255, 210, 74, 0.07);
}
.comp-callout p { margin: 0; }
.comp-callout-warn {
  border-color: #d6612a;
  background: rgba(214, 97, 42, 0.10);
}
.comp-callout-warn strong:first-child { color: #ffb27a; }
@media (max-width: 600px) {
  .comp-hero figcaption { font-size: 0.85rem; padding: 0.5rem 0.7rem; }
  .comp-callout { padding: 0.75rem 0.9rem; }
  .comp-tldr { font-size: 0.98rem; padding: 0.75rem 0.9rem; }
  a.btn-primary { width: 100%; min-width: 0; }
}

/* ---------- table ---------- */
.tbl {
  width: 100%; border-collapse: collapse;
  font-size: 0.95rem; margin: 1rem 0;
}
.tbl th, .tbl td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.7rem; text-align: left;
}
.tbl th { background: var(--bg-elevated); color: var(--gold); font-weight: 600; }
.tbl-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
}
.tbl-wrap > .tbl { margin: 0; }
.tbl-wallets code {
  font-size: 0.78rem;
  word-break: break-all;
}
.wallet-cell {
  white-space: normal;
}
.wallet-cell a { display: inline-block; }
.copy-btn {
  display: inline-block;
  margin-left: .5rem;
  padding: .2rem .55rem;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.copy-btn:hover { background: var(--gold); color: var(--bg); }
.copy-btn.copied { background: var(--gold); color: var(--bg); }

.badge {
  display: inline-block;
  padding: .25rem .65rem;
  margin-bottom: .5rem;
  border-radius: 999px;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}
.badge-pending {
  border: 1px solid var(--gold);
  background: rgba(255, 200, 80, .08);
  color: var(--gold);
}

/* ---------- mobile burger nav ---------- */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--cream);
  font-size: 1.2rem;
  line-height: 1;
  padding: .35rem .55rem;
  cursor: pointer;
  font-family: inherit;
}
.nav-toggle:hover { border-color: var(--gold); }

@media (max-width: 640px) {
  .nav { flex-direction: row; align-items: center; flex-wrap: wrap; gap: .5rem; }
  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: .8rem;
    padding: .5rem 0 .25rem;
  }
  .nav-links.open { display: flex; }
}

/* ---------- links page ---------- */
.linklist { display: grid; gap: 0.8rem; max-width: 480px; margin: 0 auto; }
.linklist a {
  display: block;
  padding: 1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
}
.linklist a:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer .small { display: block; margin-top: 0.4rem; font-size: 0.75rem; }

/* ---------- accessibility ---------- */
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; border-radius: 4px; }
.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;
}
