/* ============================================================
   styles.css — The Climate Clerk
   Shared by: index.html, risk-tool.html
   ============================================================ */

:root {
  --ink: #0e2841;
  --paper: #f4f2ee;
  --paper2: #eceae4;
  --rule: #c0bdb5;
  --rule-light: #d8d5ce;
  --accent: #982536;
  --accent-light: #b83040;
  --accent-pale: #f5eaec;
  --red: #982536;
  --gold: #58789f;
  --text: #0e2841;
  --text-mid: #3a4f63;
  --text-light: #6a7f92;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

/* Noise texture overlay */
body::after {
  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='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 100;
  opacity: 0.5;
}

/* ── MASTHEAD ── */
.masthead {
  border-bottom: 3px double var(--ink);
  padding: 0 48px;
}

.masthead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--rule);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-light);
}

.masthead-title {
  text-align: center;
  padding: 28px 0 20px;
}

.masthead-title h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(42px, 7vw, 96px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--ink);
}

.masthead-title h1 em {
  font-style: italic;
  color: var(--accent);
}

.masthead-tagline {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 14px;
}

.masthead-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--rule);
}

.masthead-nav a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mid);
  text-decoration: none;
  padding: 6px 20px;
  border-right: 1px solid var(--rule);
  transition: color 0.2s;
}

.masthead-nav a:first-child { border-left: 1px solid var(--rule); }
.masthead-nav a:hover { color: var(--accent); }

/* ── FOOTER ── */
footer {
  background: var(--ink);
  color: #5a7090;
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

footer a {
  color: var(--accent-light);
  text-decoration: none;
}

/* ── ANIMATIONS ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ── */
/* ── TABLET (900px) ── */
@media (max-width: 900px) {
  .masthead { padding: 0 20px; }
  .masthead-nav { flex-wrap: wrap; }
  .hero-band { grid-template-columns: 1fr; gap: 40px; padding: 48px 24px; }
  .hero-right { border-left: none; border-top: 1px solid #1a3550; padding-left: 0; padding-top: 40px; display: flex; gap: 32px; }
  .hero-stat { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
  .section-rule, .tools-section { padding-left: 24px; padding-right: 24px; }
  .tools-grid { grid-template-columns: 1fr; }
  .tool-card { border-right: none; border-bottom: 1px solid var(--rule); }
  .philosophy-section { grid-template-columns: 1fr; gap: 40px; padding: 48px 24px; }
  .philosophy-aside { position: static; }
  .about-strip { grid-template-columns: 1fr; padding: 48px 24px; }
  footer { flex-direction: column; gap: 12px; text-align: center; padding: 24px; }
}

/* ── MOBILE (600px) ── */
@media (max-width: 600px) {
  /* Masthead */
  .masthead { padding: 0 16px; }
  .masthead-top { font-size: 9px; padding: 12px 0 10px; }
  .masthead-title { padding: 20px 0 14px; }
  .masthead-title h1 { font-size: clamp(32px, 10vw, 52px); }
  .masthead-tagline { font-size: 9px; letter-spacing: 0.15em; margin-top: 10px; }
  .masthead-nav a { font-size: 9px; padding: 8px 14px; }

  /* Hero */
  .hero-band { padding: 36px 16px; gap: 32px; }
  .hero-headline { font-size: clamp(22px, 6vw, 32px); }
  .hero-body { font-size: 14px; }
  .hero-kicker { font-size: 9px; }
  .hero-stat-num { font-size: 36px; }
  .hero-stat-label { font-size: 9px; }
  .hero-right { flex-direction: column; gap: 20px; }

  /* Tools */
  .section-rule { padding: 24px 16px 0; }
  .tools-section { padding: 0 16px 48px; }
  .tool-number { font-size: 48px; }
  .tool-name { font-size: 18px; }
  .tool-desc { font-size: 13px; }

  /* Philosophy */
  .philosophy-section { padding: 36px 16px; }
  .pull-quote { font-size: 22px; }
  .philosophy-body h2 { font-size: 26px; }
  .philosophy-body p { font-size: 14px; }
  .step-content p { font-size: 13px; }

  /* About */
  .about-strip { padding: 36px 16px; }
  .about-text h2 { font-size: 24px; }
  .about-text p { font-size: 13px; }
  .about-card { padding: 24px; }
  .about-card-name { font-size: 18px; }

  /* Footer */
  footer { padding: 20px 16px; font-size: 9px; gap: 10px; }
}
