/* ═══════════════════════════════════════════════════════
   RULEBOOK — Central Stylesheet
   Shared across all pages: index, about, blog, etc.
   Page-specific styles live in each HTML <style> block.
   ═══════════════════════════════════════════════════════ */

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

/* ── DESIGN TOKENS ── */
:root {
  /* Surfaces */
  --bg:        #FAF8F4;
  --surface:   #FFFFFF;
  --surface2:  #F3F0EA;
  --surface3:  #EAE6DC;

  /* Borders */
  --border:    rgba(30,24,14,0.10);
  --border2:   rgba(30,24,14,0.06);

  /* Text */
  --ink:       #1A1810;
  --ink2:      #3C3830;
  --muted:     #8C8680;

  /* Brand Gold */
  --gold:      #A07820;
  --gold-light:#C9A84C;
  --gold-dim:  #C9A84C;
  --gold-glow: rgba(160,120,32,0.10);
  --gold-bg:   rgba(160,120,32,0.06);

  /* Accents */
  --green:     #1D9952;
  --green-bg:  rgba(29,153,82,0.08);
  --red:       #D03030;

  /* Typography */
  --mono:  'IBM Plex Mono', monospace;
  --serif: 'DM Serif Display', serif;
  --sans:  'Instrument Sans', sans-serif;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink2);
  font-family: var(--sans);
  overflow-x: hidden;
  cursor: default;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Paper grain texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

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

/* ── NAVIGATION ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  border-bottom: 1px solid var(--border);
  background: rgba(250,248,244,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: 0.01em;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo span { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
}

.nav-cta {
  font-family: var(--mono);
  font-size: 12px;
  padding: 10px 22px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  transition: background 0.2s, transform 0.1s, color 0.2s;
  text-decoration: none;
  display: inline-block;
  flex-shrink: 0;
}
.nav-cta:hover { background: var(--gold); color: var(--surface); transform: translateY(-1px); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px 4px;
  background: none;
  border: none;
  align-items: flex-end;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: all 0.3s;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav Drawer */
.nav-mobile {
  display: none;
  position: fixed;
  top: 65px; left: 0; right: 0;
  background: rgba(250,248,244,0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 190;
  padding: 0 24px 32px;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.nav-mobile.open {
  display: flex;
  opacity: 1;
  pointer-events: all;
}
.nav-mobile a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.nav-mobile a:hover { color: var(--ink); }
.nav-mobile .nav-cta-mobile {
  margin-top: 20px;
  width: 100%;
  text-align: center;
  border: none;
  border-bottom: none;
  padding: 14px;
  font-size: 13px;
}

/* ── BUTTONS ── */
.btn-primary {
  font-family: var(--mono);
  font-size: 13px;
  padding: 14px 32px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
  display: inline-block;
}
.btn-primary:hover { background: var(--gold); transform: translateY(-2px); }

.btn-ghost {
  font-family: var(--mono);
  font-size: 13px;
  padding: 14px 28px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s, border-color 0.2s, transform 0.15s;
  text-decoration: none;
  display: inline-block;
}
.btn-ghost:hover { color: var(--ink); border-color: rgba(30,24,14,0.3); transform: translateY(-1px); }

/* ── SECTION COMMONS ── */
section { padding: 100px 48px; }

.section-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-heading {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 20px;
}

.section-sub {
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 560px;
}

/* Breadcrumb */
.breadcrumb {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 48px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--border); }

/* ── TICKER ── */
.ticker {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 13px 0;
  background: var(--surface2);
}
.ticker-track {
  display: flex;
  animation: ticker-scroll 30s linear infinite;
  white-space: nowrap;
}
.ticker-item {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 40px;
  white-space: nowrap;
}
.ticker-item span { color: var(--gold); }

/* ── FOOTER TOP ── */
.footer-top {
  border-top: 1px solid var(--border);
  background: var(--surface2);
  padding: 64px 48px 48px;
}
.footer-top-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
}
.footer-brand {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 14px;
}
.footer-brand span { color: var(--gold); }
.footer-brand-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: 24px;
}
.footer-social { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-social a {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 7px 14px;
  transition: color 0.2s, border-color 0.2s;
  background: var(--surface);
}
.footer-social a:hover { color: var(--ink); border-color: rgba(30,24,14,0.25); }

.footer-col-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.footer-col-links { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col-links a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col-links a:hover { color: var(--ink); }

/* ── FOOTER BOTTOM ── */
footer.footer-bottom {
  border-top: 1px solid var(--border);
  background: var(--surface3);
  padding: 24px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-logo { font-family: var(--serif); font-size: 18px; color: var(--muted); }
.footer-copy { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.05em; }
.footer-legal { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-legal a {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.footer-legal a:hover { color: var(--ink); }

/* ── KEYFRAMES ── */
@keyframes floatUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ════════════════════════════════════════
   RESPONSIVE — SHARED COMPONENTS
   ════════════════════════════════════════ */

@media (max-width: 1024px) {
  nav { padding: 18px 28px; }
  section { padding: 80px 28px; }
  .footer-top { padding: 56px 28px 40px; }
  footer.footer-bottom { padding: 24px 28px; }
  .footer-top-inner { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand-col { grid-column: 1 / -1; }
  .footer-brand-desc { max-width: 100%; }
}

@media (max-width: 768px) {
  nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .nav-cta  { display: none; }
  .nav-hamburger { display: flex; }

  section { padding: 64px 20px; }

  .section-heading { font-size: clamp(28px, 7vw, 40px); }

  .footer-top { padding: 48px 20px 36px; }
  .footer-top-inner { grid-template-columns: 1fr; gap: 36px; }
  .footer-brand-col { grid-column: auto; }

  footer.footer-bottom {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer-legal { gap: 16px; }
}

@media (max-width: 480px) {
  nav { padding: 14px 16px; }
  section { padding: 52px 16px; }
  .footer-top { padding: 40px 16px 28px; }
  footer.footer-bottom { padding: 16px; }
}
