/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --bg: #FDF8F0;
  --surface: #FFFFFF;
  --ink: #1A1A1A;
  --ink-muted: #5C5C5C;
  --accent: #F7C948;
  --accent-hover: #EAB938;
  --border: #EFE7D9;
  --shadow: 0 8px 24px rgba(26, 26, 26, 0.06);
  --radius: 18px;
  --max: 960px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --nav-h: 64px;
  --pad: 24px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snappy: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

img { max-width: 100%; }

/* ============================================================
   Links
   ============================================================ */
a {
  color: var(--ink);
  text-decoration: none;
}
a:hover { text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   Site header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(253, 248, 240, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: calc(var(--max) + var(--pad) * 2);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.header-logo:hover { color: var(--ink-muted); text-decoration: none; }

.header-nav {
  display: flex;
  gap: 28px;
}

.header-nav a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.16s ease-out;
}
.header-nav a:hover { color: var(--ink); text-decoration: none; }

/* ============================================================
   Main column
   ============================================================ */
.main {
  max-width: calc(var(--max) + var(--pad) * 2);
  margin: 0 auto;
  padding: 0 var(--pad) 96px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 96px 0 72px;
  text-align: center;
  margin-bottom: 24px;
}

.hero-name {
  position: relative;
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 84px);
  font-weight: 700;
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

.hero-name::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 108%;
  height: 22%;
  background: var(--accent);
  border-radius: 999px;
  opacity: 0.55;
}

.hero-credentials {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 28px;
}

.hero-rule {
  width: 0;
  height: 2px;
  background: var(--accent);
  margin: 0 auto 28px;
  border-radius: 2px;
  transition: width 320ms ease-out;
  transition-delay: 240ms;
}
.hero-rule.is-in { width: 48px; }

.hero-tagline {
  font-size: 20px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-links {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--accent);
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 160ms ease-out, transform 160ms ease-out;
}
.hero-links a:hover {
  background: var(--accent-hover);
  text-decoration: none;
  transform: translateY(-2px);
}

/* ============================================================
   Scroll/load animation primitives
   ============================================================ */
.js-anim { opacity: 0; }
.js-anim[data-anim="hero"] {
  transform: translateY(10px);
  transition: opacity 480ms var(--ease-out), transform 480ms var(--ease-out);
}
.js-anim[data-anim="card"] {
  transform: translateY(14px);
  transition: opacity 360ms var(--ease-snappy), transform 360ms var(--ease-snappy);
}
.js-anim[data-anim="fade"] {
  transition: opacity 400ms ease-out;
}
.js-anim.is-in {
  opacity: 1 !important;
  transform: none !important;
}

/* ============================================================
   Credibility strip
   ============================================================ */
.credibility {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 72px;
}

.credibility-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 18px;
  box-shadow: var(--shadow);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-muted);
}

.credibility-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-right: 4px;
}

.credibility-item {
  color: var(--ink-muted);
  font-weight: 500;
}

.credibility-sep {
  color: var(--border);
  font-weight: 700;
}

/* ============================================================
   Eyebrow
   ============================================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 18px;
  display: block;
}

/* ============================================================
   Register cards
   ============================================================ */
.register {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 16px;
}

.register + .eyebrow {
  margin-top: 72px;
}

.register-entry {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
}

.register-entry:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(26, 26, 26, 0.09);
}

.entry-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.entry-id {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
}

.entry-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.entry-title a {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
}
.entry-title a:hover { color: var(--ink-muted); text-decoration: none; }

.entry-desc {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.55;
  display: block;
}

/* ============================================================
   Status badges
   ============================================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-accepted { color: #166534; background: #DCFCE7; }
.status-proposed { color: #475569; background: #F1F5F9; }
.status-review   { color: #B45309; background: #FEF3C7; }
.status-badge:not(.status-accepted):not(.status-proposed):not(.status-review) {
  color: var(--ink-muted);
  background: var(--bg);
  border: 1px solid var(--border);
}

/* ============================================================
   Document header
   ============================================================ */
.doc-header {
  padding: 56px 32px 36px;
  margin: 24px 0 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.doc-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.doc-record-id {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.doc-header h1 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.doc-summary {
  font-size: 18px;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.6;
}

/* ============================================================
   Document body
   ============================================================ */
.doc-body {
  max-width: 680px;
}

.doc-body p  { margin: 0 0 18px; }
.doc-body ul,
.doc-body ol { margin: 0 0 18px; padding-left: 24px; }
.doc-body li { margin-bottom: 8px; }

.doc-body h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  margin: 48px 0 18px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.doc-body h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 12px;
}

.doc-body h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 10px;
  line-height: 1.3;
}

.doc-body strong { font-weight: 600; }

.doc-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}
.doc-body a:hover { text-decoration-color: var(--accent-hover); }

.doc-body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.doc-body pre {
  background: #1A1A1A;
  color: #F3EEE4;
  padding: 22px 26px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 24px;
}

.doc-body pre code {
  background: none;
  border: none;
  color: inherit;
  padding: 0;
  font-size: 1em;
}

.doc-body blockquote {
  margin: 0 0 18px;
  padding: 18px 22px;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  color: var(--ink-muted);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
}

/* ============================================================
   List page header
   ============================================================ */
.list-header {
  padding: 56px 0 32px;
  margin-bottom: 0;
  text-align: center;
}

.list-header .eyebrow {
  margin-bottom: 12px;
  color: var(--accent-hover);
}

.list-header h1 {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
}

.list-header .doc-body {
  margin: 18px auto 0;
  color: var(--ink-muted);
}

/* ============================================================
   Engage card
   ============================================================ */
.engage-card {
  margin-top: 72px;
  padding: 48px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.engage-card h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.engage-card p {
  color: var(--ink-muted);
  max-width: 460px;
  margin: 0 auto 24px;
  font-size: 17px;
  line-height: 1.6;
}

.engage-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.engage-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  background: var(--accent);
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 160ms ease-out, transform 160ms ease-out;
}
.engage-actions a:hover {
  background: var(--accent-hover);
  text-decoration: none;
  transform: translateY(-2px);
}

.engage-actions a.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}
.engage-actions a.secondary:hover {
  background: var(--bg);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  margin-top: 80px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-muted);
  text-align: center;
}

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 640px) {
  :root { --nav-h: 56px; }

  .hero { padding: 64px 0 48px; }
  .hero-name { font-size: clamp(44px, 12vw, 56px); }
  .hero-name::after { bottom: 4px; height: 18%; }
  .hero-tagline { font-size: 17px; }
  .hero-links a { padding: 10px 18px; font-size: 13px; }

  .header-nav { gap: 18px; }
  .header-nav a { font-size: 13px; }

  .credibility { flex-direction: column; align-items: stretch; }
  .credibility-row { justify-content: center; border-radius: var(--radius); }

  .register { grid-template-columns: 1fr; }

  .doc-header { padding: 36px 22px 28px; }
  .doc-header h1 { font-size: 30px; }
  .doc-summary { font-size: 16px; }
  .list-header h1 { font-size: 32px; }

  .engage-card { padding: 36px 22px; }
  .engage-card h2 { font-size: 26px; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
