/* ==========================================================
   Time Anchor — site styles
   Editorial / journalism aesthetic
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,700;9..144,900&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --ink:        #0a0a0a;
  --ink-soft:   #1f2937;
  --paper:      #f7f5f0;
  --paper-warm: #efebe2;
  --rule:       #1f2937;
  --muted:      #6b7280;
  --muted-soft: #9ca3af;
  --accent:     #d4471c;   /* deep editorial red-orange */
  --accent-soft:#fde6dc;
  --green:      #16a34a;
  --yellow:     #ca8a04;
  --orange:     #ea580c;
  --red:        #dc2626;
  --gray:       #6b7280;

  --serif:    'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:     'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(circle at 20% 0%, rgba(212, 71, 28, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(212, 71, 28, 0.03) 0%, transparent 50%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle grain texture overlay — adds editorial paper feel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================
   NAV
   ========================================================== */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.logo-mark::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  background: var(--green);
  border-radius: 50%;
  border: 2px solid var(--paper);
}
.logo-mark svg { width: 18px; height: 18px; }
.logo-text {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  position: relative;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -22px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

/* ==========================================================
   CONTAINER & TYPOGRAPHY
   ========================================================== */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}
.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(48px, 7vw, 92px); }
h2 { font-size: clamp(32px, 4.5vw, 52px); }
h3 { font-size: clamp(22px, 3vw, 30px); }
h4 { font-size: 18px; font-family: var(--sans); font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; }

p { color: var(--ink-soft); }

/* Footer */
footer {
  border-top: 1px solid var(--rule);
  margin-top: 120px;
  padding: 48px 0 32px;
  background: var(--ink);
  color: var(--paper-warm);
  position: relative;
  z-index: 2;
}
footer .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}
footer .col h4 {
  color: var(--paper-warm);
  font-size: 12px;
  margin-bottom: 14px;
  opacity: 0.6;
}
footer .col a {
  display: block;
  color: var(--paper-warm);
  text-decoration: none;
  font-size: 14px;
  padding: 4px 0;
  opacity: 0.85;
}
footer .col a:hover { opacity: 1; color: white; }
footer .copy {
  width: 100%;
  text-align: center;
  font-size: 12px;
  opacity: 0.5;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 32px;
  font-family: var(--mono);
}

/* Capsule badge (reused throughout) */
.capsule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  background: white;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  vertical-align: middle;
}
.capsule .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.capsule .sep {
  color: var(--muted-soft);
  font-weight: 400;
  margin: 0 2px;
}
.capsule.green .dot { background: var(--green); }
.capsule.yellow .dot { background: var(--yellow); }
.capsule.orange .dot { background: var(--orange); }
.capsule.red .dot { background: var(--red); }
.capsule.gray .dot { background: var(--gray); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Mobile */
@media (max-width: 768px) {
  .nav-links { gap: 18px; font-size: 13px; }
  .nav-inner { padding: 14px 20px; }
  .container, .container-narrow { padding: 0 20px; }
  h1 { font-size: 44px; }
  h2 { font-size: 30px; }
  footer .container { flex-direction: column; }
}
