/* ============================================================
   WithoutFire — withoutfire.com
   Editorial / typographic. No external dependencies.
   ============================================================ */

/* --- Design tokens ---------------------------------------- */
:root {
  --paper:      #fbfaf6;
  --paper-alt:  #f3f0e8;
  --ink:        #17191c;
  --ink-soft:   #3a3f46;
  --muted:      #6b7078;
  --rule:       #e0dbcf;
  --rule-soft:  #ebe7dc;
  --accent:     #9e3b2e;
  --accent-dk:  #7d2d22;
  --accent-wash:#f6ece7;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           "Hoefler Text", Georgia, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
           Arial, sans-serif;

  --wrap: 68rem;
  --header-h: 4.5rem;

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0:  clamp(1.02rem, 0.98rem + 0.2vw, 1.14rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.44rem);
  --step-2:  clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
  --step-3:  clamp(2rem, 1.6rem + 2vw, 3.2rem);
  --step-4:  clamp(2.9rem, 2rem + 4.4vw, 6rem);
}

/* --- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 {
  margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.12;
  font-variant-ligatures: common-ligatures contextual;
  font-feature-settings: "liga" 1, "clig" 1, "kern" 1;
}
p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover { color: var(--accent-dk); text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 0.7rem 1.1rem;
  text-decoration: none; font-size: var(--step--1);
}
.skip-link:focus { left: 0.75rem; top: 0.75rem; }

/* --- Header / nav ------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.bar {
  width: min(var(--wrap), 100% - 2.5rem);
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.wordmark {
  display: flex; align-items: baseline; gap: 0.6rem;
  text-decoration: none; color: var(--ink); padding: 0.4rem 0;
}
.wordmark-name {
  font-family: var(--serif); font-size: 1.32rem; font-weight: 600;
  letter-spacing: -0.015em;
}
.wordmark-sub {
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.wordmark:hover .wordmark-name { color: var(--accent); }

.nav ul {
  list-style: none; display: flex; gap: 1.55rem; margin: 0; padding: 0;
}
.nav a {
  position: relative;
  font-size: 0.86rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none; padding: 0.35rem 0;
  display: inline-block;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.22s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a.is-current::after { transform: scaleX(1); }
.nav a.is-current { color: var(--accent); }

.nav-toggle {
  display: none; align-items: center; gap: 0.55rem;
  background: none; border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.45rem 0.85rem; cursor: pointer;
  font-family: inherit; font-size: 0.76rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft);
}
.nav-toggle-bars { display: grid; gap: 3px; width: 15px; }
.nav-toggle-bars i {
  display: block; height: 1.5px; background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }

.scroll-progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 0;
  background: var(--accent);
}

/* --- Hero --------------------------------------------------- */
.hero {
  padding: clamp(3.5rem, 9vw, 8rem) 0 clamp(3rem, 7vw, 6rem);
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(60rem 30rem at 82% -10%, var(--accent-wash), transparent 62%),
    var(--paper);
}
.hero-kicker {
  font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.6rem;
}
.hero-title {
  font-size: var(--step-4); letter-spacing: -0.03em; margin-bottom: 1.5rem;
}
.hero-lede {
  font-family: var(--serif); font-size: var(--step-2); line-height: 1.35;
  max-width: 30ch; color: var(--ink-soft); margin-bottom: 1.6rem;
}
.hero-lede strong { color: var(--ink); font-weight: 600; }
.hero-aside {
  max-width: 46ch; color: var(--muted); font-size: var(--step--1);
  border-left: 2px solid var(--accent); padding-left: 1rem; font-style: italic;
  margin-bottom: 2.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-block; text-decoration: none;
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1.6rem; border-radius: 999px;
  font-size: 0.86rem; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--ink);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* --- Sections ----------------------------------------------- */
.section {
  padding: clamp(3.25rem, 7vw, 6rem) 0;
  scroll-margin-top: var(--header-h);
  border-bottom: 1px solid var(--rule-soft);
}
.section-alt { background: var(--paper-alt); border-bottom-color: var(--rule); }

.eyebrow {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: 0.73rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.6rem;
}
.eyebrow .num {
  font-family: var(--serif); font-size: 0.95rem; letter-spacing: 0;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.eyebrow::after {
  content: ""; flex: 1; height: 1px; background: var(--rule);
}
.section-title {
  font-size: var(--step-3); letter-spacing: -0.025em; margin-bottom: 2.25rem;
}

.cols {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.cols:has(> .col-lead:only-child) { grid-template-columns: minmax(0, 1fr); }
.col-lead { max-width: 62ch; }
.lead {
  font-family: var(--serif); font-size: var(--step-1); line-height: 1.5;
  color: var(--ink);
}
.lead-centred {
  max-width: 52ch; margin: 2.75rem auto 2rem; text-align: center;
}

/* Facts list */
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.facts li { padding: 0.85rem 0; border-bottom: 1px solid var(--rule); display: grid; gap: 0.15rem; }
.facts-k {
  font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted);
}
.facts-v { font-family: var(--serif); font-size: 1.02rem; line-height: 1.35; }

/* Cards */
.subgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: clamp(1.5rem, 3.5vw, 2.5rem); margin-top: 3rem;
}
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.section:not(.section-alt) .card { background: #fff; }
.card-title {
  font-size: var(--step-1); margin-bottom: 0.75rem; letter-spacing: -0.01em;
}
.feature-text .card-title { margin-top: 2rem; }
.feature-text .card-title:first-child { margin-top: 0; }
.note {
  font-size: var(--step--1); color: var(--muted); font-style: italic;
  border-left: 2px solid var(--rule); padding-left: 0.9rem;
}

/* Feature rows (text + image) */
.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4.5vw, 3.5rem);
  align-items: center;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.feature-reverse .feature-figure { order: -1; }
.feature-text { max-width: 56ch; }

figure { margin: 0; }
.feature-figure img, .figure-wide img {
  border: 1px solid var(--rule);
  box-shadow: 0 1px 2px rgba(23,25,28,0.05), 0 12px 28px -14px rgba(23,25,28,0.35);
}
figcaption {
  margin-top: 0.7rem; font-size: 0.78rem; color: var(--muted);
  letter-spacing: 0.02em;
}
.figure-wide { margin-top: clamp(2rem, 4vw, 3rem); }

/* Quotes */
.quotes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.25rem; margin-top: 1rem;
}
.quotes blockquote {
  margin: 0; padding: 1.4rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  font-family: var(--serif); font-size: 1.02rem; line-height: 1.5;
  color: var(--ink-soft);
  position: relative;
}
.quotes blockquote::before {
  content: "”"; position: absolute; top: -0.35rem; right: 0.7rem;
  font-family: var(--serif); font-size: 3.2rem; color: var(--rule); line-height: 1;
}

/* Side blocks */
.col-side { position: sticky; top: calc(var(--header-h) + 1.5rem); }
@media (max-width: 60rem) { .col-side { position: static; } }
.side-block {
  border-top: 3px solid var(--ink); padding-top: 1.1rem; margin-bottom: 2rem;
  font-size: var(--step--1); color: var(--ink-soft);
}
.side-block:last-child { margin-bottom: 0; }
.side-title {
  font-size: 1.05rem; margin-bottom: 0.6rem;
}

/* Contact */
.section-contact { background: var(--ink); color: var(--paper); border-bottom: none; }
.section-contact .eyebrow { color: rgba(251,250,246,0.55); }
.section-contact .eyebrow::after { background: rgba(251,250,246,0.2); }
.section-contact .eyebrow .num { color: #d98a78; }
.section-contact .section-title { color: var(--paper); }
.section-contact a { color: #eab6a7; text-decoration-color: rgba(234,182,167,0.4); }
.section-contact a:hover { color: #fff; }
.contact-line {
  font-family: var(--serif); font-size: var(--step-2); line-height: 1.45;
  max-width: 26ch;
}
.contact-email {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72em; letter-spacing: -0.01em;
  color: var(--paper);
  border-bottom: 1px dashed rgba(251,250,246,0.35);
  word-break: break-word;
}

/* Footer */
.site-footer {
  background: #101215; color: rgba(251,250,246,0.62);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
  font-size: var(--step--1);
  border-top: 1px solid rgba(251,250,246,0.1);
}
.footer-title {
  font-size: 0.73rem; letter-spacing: 0.2em; text-transform: uppercase;
  font-family: var(--sans); font-weight: 600;
  color: rgba(251,250,246,0.45); margin-bottom: 0.9rem;
}
.site-footer p { max-width: 62ch; }
.footer-meta {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  margin-top: 1.75rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(251,250,246,0.12);
  color: rgba(251,250,246,0.45); max-width: none;
}
.to-top { color: rgba(251,250,246,0.7); text-decoration: none; }
.to-top:hover { color: #fff; }

/* --- Responsive --------------------------------------------- */
@media (max-width: 60rem) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature-reverse .feature-figure { order: 0; }
}

@media (max-width: 46rem) {
  :root { --header-h: 3.9rem; }
  .wordmark { flex-direction: column; gap: 0; }
  .wordmark-sub { font-size: 0.62rem; }

  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows 0.28s ease;
  }
  .nav > ul { overflow: hidden; flex-direction: column; gap: 0; padding: 0 1.25rem; }
  .nav.is-open {
    grid-template-rows: 1fr;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 16px 30px -20px rgba(23,25,28,0.5);
  }
  .nav a {
    display: block; padding: 0.95rem 0; font-size: 0.95rem;
    border-bottom: 1px solid var(--rule-soft); letter-spacing: 0.04em;
  }
  .nav li:last-child a { border-bottom: none; }
  .nav a::after { display: none; }

  .hero-aside { font-size: 0.9rem; }
  .quotes blockquote { padding: 1.2rem 1.25rem; }
}

/* --- Print --------------------------------------------------- */
@media print {
  .site-header, .hero-actions, .to-top { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section, .section-alt, .section-contact, .site-footer {
    background: #fff !important; color: #000 !important;
    border-color: #ccc; page-break-inside: avoid;
  }
  .section-contact .section-title, .section-contact a, .contact-email { color: #000 !important; }
  a { color: #000; }
}
