/* === Reset === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === Variables === */
:root {
  --bg: #f7f4ef;
  --bg-raised: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f0ece5;
  --border: #e8e3db;
  --border-strong: #c9c3b8;
  --text: #1a1714;
  --text-muted: #5e5a55;
  --text-dim: #928e88;
  --accent: #0d6b35;
  --accent-warm: #8b6914;
  --accent-dim: rgba(13, 107, 53, 0.08);
  --accent-border: rgba(13, 107, 53, 0.25);
  --bg-dark: #0d0b09;
  --bg-dark-warm: #0a0700;
  --max-width: 1200px;
  --content-width: 1360px;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', Menlo, Courier, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
}

/* === Base === */
html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  cursor: default;
}

main {
  flex: 1;
}

/* === Typography === */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.125rem); }
h3 { font-size: 1.125rem; font-weight: 500; }

p {
  max-width: 65ch;
  font-weight: 400;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
  cursor: pointer;
}

a:hover {
  text-decoration: underline;
}

/* === Layout === */
.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* === Skip Link === */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  transition: top 0.15s var(--ease-out);
}

.skip-link:focus {
  top: 0;
}

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

/* === Focus Styles === */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* === Header / Nav === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 239, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  user-select: none;
  -webkit-user-select: none;
}

.site-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  cursor: default;
}

.wordmark {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.12em;
  flex-shrink: 0;
  text-transform: uppercase;
  transition: color 0.2s var(--ease-out), letter-spacing 0.3s var(--ease-out);
}

.wordmark:hover {
  color: var(--accent);
  letter-spacing: 0.16em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  position: relative;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.3s var(--ease-out), left 0.3s var(--ease-out);
}

.nav-links a:hover::after {
  width: 100%;
  left: 0;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-links a[aria-current="page"]::after {
  width: 100%;
  left: 0;
}

.nav-links .nav-support {
  color: var(--accent);
}

.nav-links .nav-support::after {
  background: var(--accent);
}

.nav-links .nav-support:hover {
  color: var(--accent);
  opacity: 0.75;
}

/* === Hero Page Header Visibility === */
/* On hero pages (homepage), hide standard header on desktop — hero nav takes over */
.hero-page .site-header {
  display: none;
}

@media (max-width: 680px) {
  /* On mobile, always show standard header with hamburger — hero nav hidden via page CSS */
  .hero-page .site-header {
    display: block;
  }
}

/* === Mobile Nav Hamburger === */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--text);
  flex-shrink: 0;
}

.nav-toggle svg {
  display: block;
  width: 22px;
  height: 22px;
}

@media (max-width: 680px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    z-index: 101;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease-out), padding 0.3s var(--ease-out);
  }

  .nav-links.nav-open {
    max-height: 300px;
    padding: 0.5rem 0;
  }

  .nav-links li {
    border-top: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 1rem 2.5rem;
  }

  .nav-links a::after {
    display: none;
  }
}

/* === Footer === */
.site-footer {
  border-top: none;
  padding: 4rem 2.5rem 3.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  background: var(--bg-raised);
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--border) 15%,
    var(--border-strong) 50%,
    var(--border) 85%,
    transparent
  );
  animation: footerLineGrow 1.2s var(--ease-out) forwards;
}

@keyframes footerLineGrow {
  from { width: 0; }
  to { width: min(100%, var(--max-width)); }
}

.site-footer p + p {
  margin-top: 0.625rem;
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.2s var(--ease-out);
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-legal-links {
  margin-top: 0.75rem !important;
  font-size: 0.75rem;
}

.footer-legal-links a {
  color: var(--text-dim);
  transition: color 0.2s var(--ease-out);
}

.footer-legal-links a:hover {
  color: var(--text-muted);
}

.footer-legal {
  margin-top: 1.25rem !important;
  color: var(--text-dim);
  font-size: 0.75rem;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* === Section === */
.section {
  padding: 6rem 2.5rem;
  max-width: var(--content-width);
  margin: 0 auto;
}

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

/* === Label === */
.label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: block;
}

/* === Status badges === */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25em 0.75em;
  border-radius: 2px;
  font-weight: 600;
}

.badge-live {
  background: rgba(13, 107, 53, 0.08);
  color: var(--accent);
  border: 1px solid rgba(13, 107, 53, 0.2);
}

.badge-upcoming {
  background: rgba(139, 105, 20, 0.08);
  color: var(--accent-warm);
  border: 1px solid rgba(139, 105, 20, 0.2);
}

.badge-closed {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

/* === Cards === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.card:hover {
  transform: translateY(-2px);
}

.card:active {
  transform: translateY(0);
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 3px;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: var(--font-body);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.25s var(--ease-out);
  cursor: pointer;
  border: none;
  line-height: 1;
}

.btn:hover {
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

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

.btn-primary:hover {
  background: #2a2520;
  color: var(--bg-raised);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(26, 23, 20, 0.15);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--text);
  background: rgba(26, 23, 20, 0.02);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
  background: rgba(26, 23, 20, 0.04);
}

/* === Page Hero (inner pages) === */
.page-hero {
  padding: 8rem 2.5rem 5rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.page-hero-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-top: 1rem;
}

.page-hero .lead {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 56ch;
  margin-top: 1.75rem;
  line-height: 1.85;
}

.page-hero .meta {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: 0.75rem;
}

/* === Full-width accent sections === */
.section-wide {
  padding: 6rem 2.5rem;
  max-width: none;
  background: var(--bg-subtle);
}

.section-wide-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* === Responsive === */
@media (max-width: 768px) {
  .section {
    padding: 4rem 1.75rem;
  }

  .page-hero {
    padding: 5rem 1.75rem 3.5rem;
  }

  .section-wide {
    padding: 4rem 1.75rem;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 1.75rem;
  }

  .section {
    padding: 3.5rem 1.25rem;
  }

  .page-hero {
    padding: 4rem 1.25rem 2.5rem;
  }

  .section-wide {
    padding: 3.5rem 1.25rem;
  }
}

/* === Shared body text === */
.body-text {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.8;
  margin-top: 1rem;
}

.body-text.dim {
  color: var(--text-dim);
  font-size: 0.8125rem;
}

/* === Shared section headings === */
.section h2,
.section-wide-inner h2 {
  margin: 0.75rem 0 0.5rem;
}


/* ══════════════════════════════════════
   DARK SECTIONS — homepage manifesto, etc.
   ══════════════════════════════════════ */

.section-dark {
  background: var(--bg-dark);
  color: #e8e3db;
  padding: 7rem 2.5rem;
  max-width: none;
  position: relative;
}

.section-dark .section-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.section-dark h2,
.section-dark h3 {
  color: #f0ece5;
}

.section-dark p {
  color: #a09a92;
}

.section-dark .label {
  color: #5a5550;
}

.section-dark .accent-text {
  color: #4aba76;
}

@media (max-width: 768px) {
  .section-dark {
    padding: 5rem 1.75rem;
  }
}

@media (max-width: 480px) {
  .section-dark {
    padding: 4rem 1.25rem;
  }
}

/* ══════════════════════════════════════
   HOMEPAGE COMPONENTS — stats, etc.
   ══════════════════════════════════════ */

.stats-row {
  display: flex;
  gap: 4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
}

.stat-value {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
}

.stat-value.accent {
  color: var(--accent);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

@media (max-width: 480px) {
  .stats-row {
    gap: 2.5rem;
  }
}

/* ══════════════════════════════════════
   FOOTER ELEMENTS
   ══════════════════════════════════════ */

.footer-mark {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--text-dim);
  opacity: 0.2;
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
  user-select: none;
}

.footer-whisper {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0.35;
  margin-top: 2rem !important;
}

/* ══════════════════════════════════════
   LINK UNDERLINES — body text
   ══════════════════════════════════════ */

.body-text a,
.brand-story a,
.privacy-list a {
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s var(--ease-out), color 0.2s var(--ease-out);
}

.body-text a:hover,
.brand-story a:hover,
.privacy-list a:hover {
  text-decoration: none;
  background-size: 100% 2px;
}

/* ══════════════════════════════════════
   PAGE HERO ENTRANCE — inner pages
   ══════════════════════════════════════ */

.page-hero .label,
.page-hero h1,
.page-hero .lead,
.page-hero .lead-note,
.page-hero .meta,
.page-hero .hero-details {
  opacity: 0;
  transform: translateY(16px);
  animation: heroEntrance 0.8s var(--ease-out) forwards;
}

.page-hero .label { animation-delay: 0s; }
.page-hero h1 { animation-delay: 0.08s; }
.page-hero .lead { animation-delay: 0.16s; animation-duration: 1s; }
.page-hero .lead-note { animation-delay: 0.22s; }
.page-hero .meta { animation-delay: 0.16s; }
.page-hero .hero-details { animation-delay: 0.24s; }

@keyframes heroEntrance {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-hero h1::after {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  background: var(--border-strong);
  margin-top: 1.25rem;
  animation: lineExtend 0.6s var(--ease-out) 0.4s forwards;
}

@keyframes lineExtend {
  to { width: 60px; }
}

/* ══════════════════════════════════════
   PRINT
   ══════════════════════════════════════ */

@media print {
  .site-header,
  .site-footer,
  .nav-toggle,
  .btn { display: none; }
  .section-dark { background: #fff; color: #000; }
  .section-dark h2 { color: #000; }
  .section-dark p { color: #333; }
}
