/* DinoDynasty — public site styles (docs/plan/17-design-system.md tokens, "rojo look
   re-hued": canopy green brand, amber reserved for money — this marketing site shows no
   money, so amber stays unused here by design). Served as a real file (not inline) because
   server.js's CSP is `style-src 'self'` with no 'unsafe-inline'. Dark-only: doc 17 calls www
   "site dark-led" and the nocturnal-jungle mood IS the brand, so there's no light-mode
   toggle here (cpanel gets light+dark; this is the marketing front door). */

:root {
  --bg: #171814;
  --bg-deep: #11120e;
  --panel: rgba(255, 255, 255, 0.03);
  --panel-2: linear-gradient(160deg, rgba(44, 64, 48, 0.55), rgba(20, 28, 22, 0.55));
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f3ee;
  --muted: #b8b5a6;
  --muted-2: #8e8b7a;

  --brand: #22c55e;
  --brand-2: #4ade80;
  --brand-fill: linear-gradient(180deg, #34d066, #16a34a);
  --brand-glow: rgba(34, 197, 94, 0.35);
  --brand-ink: #04170b;

  --bad: #ef4444;
  --warn: #fb923c;
  --live: #38bdf8;

  --radius: 18px;
  --radius-ctl: 12px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background:
    radial-gradient(1100px 600px at 50% -10%, rgba(16, 36, 22, 0.55) 0%, transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(251, 191, 36, 0.06) 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 0.5em; }
p { margin: 0 0 1em; color: var(--muted); }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.tnum { font-variant-numeric: tabular-nums; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: var(--brand-ink); padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ── Ticker strip (rotates every few seconds via /assets/site.js) ───────────────────── */
.ticker-strip {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--live); flex: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.ticker-text { overflow: hidden; text-overflow: ellipsis; transition: opacity 0.3s ease; }

/* ── Header ───────────────────────────────────────────────────────────────────────────── */
.site-header { border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(23, 24, 20, 0.85); backdrop-filter: blur(10px); z-index: 10; }
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 22px; }
.brand-rest { color: var(--muted); font-weight: 700; }
.site-nav { display: flex; gap: 4px; margin-right: auto; }
.site-nav a { color: var(--muted); padding: 8px 12px; border-radius: var(--radius-ctl); font-size: 14px; font-weight: 600; }
.site-nav a:hover { color: var(--text); text-decoration: none; background: var(--panel); }
.site-nav a.active { color: var(--text); background: var(--panel); }
.header-cta { display: flex; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-ctl); font-weight: 700; font-size: 14px;
  border: 1px solid transparent; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-ghost { color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--panel); }
.btn-brand { background: var(--brand-fill); color: var(--brand-ink); box-shadow: 0 6px 24px var(--brand-glow); }
.btn-brand:hover { filter: brightness(1.06); }
.btn-lg { padding: 14px 26px; font-size: 16px; }

main { display: block; }

/* ── Hero ─────────────────────────────────────────────────────────────────────────────── */
.hero { padding: 64px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-2); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); }
.hero-sub { font-size: 18px; max-width: 46ch; }
.hero-ctas { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-ctas-center { justify-content: center; }

/* ── ImageSlot-equivalent placeholder (no art pipeline wired into www yet — always the
   graceful "no art" box, same fallback semantics as app/src/ui/ImageSlot.tsx) ──────────── */
.image-slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 100%; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel-2);
  color: var(--muted-2); overflow: hidden;
}
.image-slot .is-icon { font-size: 28px; opacity: 0.6; }
.image-slot .is-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; text-align: center; padding: 0 8px; }
.image-slot.ratio-16x9 { aspect-ratio: 16 / 9; }
.image-slot.ratio-2x1 { aspect-ratio: 2 / 1; }
.image-slot.ratio-1x1 { aspect-ratio: 1 / 1; max-width: 96px; }

/* ── World strip ──────────────────────────────────────────────────────────────────────── */
.world-strip { padding: 28px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--panel); }
.world-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; text-align: center; }
.world-stat .value { font-size: 28px; font-weight: 800; color: var(--text); }
.world-stat .label { font-size: 12px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

/* ── Sections ─────────────────────────────────────────────────────────────────────────── */
section.section { padding: 56px 0; }
section.section-tight-bottom { padding-bottom: 0; }
section.section-tight-top { padding-top: 24px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 34px); }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.feature-card h3 { font-size: 16px; margin-top: 12px; margin-bottom: 6px; color: var(--text); }
.feature-card p { font-size: 14px; margin: 0; }

.loop-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.loop-step { position: relative; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 18px 18px; background: var(--panel); }
.loop-step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -14px; left: 18px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand-fill); color: var(--brand-ink); font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px var(--brand-glow);
}
.loop-step h4 { font-size: 15px; margin: 0 0 6px; color: var(--text); }
.loop-step p { font-size: 13px; margin: 0; }

.boards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.board { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.board-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.board-head h3 { margin: 0; font-size: 15px; }
.board-head a { font-size: 13px; font-weight: 700; }
.board table { width: 100%; border-collapse: collapse; }
.board td { padding: 10px 20px; font-size: 14px; border-top: 1px solid var(--border); }
.board td:first-child { color: var(--muted-2); width: 36px; }
.board td:last-child { text-align: right; font-weight: 700; color: var(--text); }
.board-empty { padding: 24px 20px; color: var(--muted-2); font-size: 14px; }
.tag-chip { display: inline-block; margin-left: 6px; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); }

/* ── Board tabs (rankings sub-nav) ───────────────────────────────────────────────────────── */
.board-tabs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.board-tabs a { padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); border: 1px solid var(--border); }
.board-tabs a:hover { color: var(--text); text-decoration: none; background: var(--panel); }
.board-tabs a.active { color: var(--brand-ink); background: var(--brand-fill); border-color: transparent; }

/* ── "Coming soon" panel (rankings/hall-of-fame/news/profile — no backing endpoint yet) ──── */
.coming-soon { text-align: center; padding: 48px 24px; }
.coming-soon .cs-icon { display: block; font-size: 36px; margin-bottom: 12px; opacity: 0.85; }
.coming-soon .cs-title { color: var(--text); font-weight: 700; font-size: 16px; margin: 0 0 8px; }
.coming-soon p:last-child { margin: 0 auto; max-width: 48ch; }

.courier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.courier-item { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-ctl); padding: 16px; }
.chip { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; margin-bottom: 8px; }
.chip-success { background: rgba(34, 197, 94, 0.16); color: var(--brand-2); }
.chip-info { background: rgba(56, 189, 248, 0.16); color: var(--live); }
.chip-danger { background: rgba(239, 68, 68, 0.16); color: var(--bad); }
.chip-event { background: rgba(167, 139, 250, 0.16); color: #c4b5fd; }
.chip-muted { background: var(--panel-2); color: var(--muted); }
.courier-item .headline { font-size: 14px; color: var(--text); margin: 0 0 6px; }
.courier-item .meta { font-size: 12px; color: var(--muted-2); }

.cta-band { text-align: center; padding: 64px 0; border-top: 1px solid var(--border); }
.cta-band h2 { font-size: clamp(24px, 3vw, 32px); }

footer.site-footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 24px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted-2); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-weight: 600; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .world-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .loop-steps { grid-template-columns: repeat(2, 1fr); }
  .boards-grid { grid-template-columns: 1fr; }
  .courier-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
}
@media (max-width: 560px) {
  .world-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-live-dot { animation: none; }
  * { transition: none !important; animation-duration: 0.001ms !important; }
}
