/* Alternative Funding, 2nd edition — book page
   Colors match the published cover: navy (11,28,46) and emerald (31,179,120).
   Fonts are self-hosted subsets of the book faces. */

@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/Montserrat-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/Montserrat-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/Montserrat-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif Pro";
  src: url("assets/fonts/SourceSerifPro-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif Pro";
  src: url("assets/fonts/SourceSerifPro-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif Pro";
  src: url("assets/fonts/SourceSerifPro-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif Pro";
  src: url("assets/fonts/SourceSerifPro-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0b1c2e;
  --navy-hi: #10263c;
  --ink: #1c2430;
  --muted: #4a5560;
  --line: #d8d2c8;
  --cream: #f6f3ee;
  --paper: #fffcf8;
  --emerald: #1fb378;
  --emerald-dim: #0f6e4a;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(11, 28, 46, 0.18);
  --max: 1120px;
  --serif: "Source Serif Pro", "Georgia", "Times New Roman", serif;
  --sans: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--emerald-dim); text-underline-offset: 0.15em; }
a:hover { color: var(--navy); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

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

/* Header */
.site-header {
  background: var(--navy);
  color: var(--white);
  border-bottom: 4px solid var(--emerald);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
  padding-block: 0.75rem;
}
.wordmark {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}
.wordmark span { color: var(--emerald); }
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav a {
  color: rgba(255,255,255,0.86);
  text-decoration: none;
}
.nav a:hover { color: var(--emerald); }

/* Hero */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 3.25rem 0 4rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(200px, 320px) 1fr;
  gap: 3.25rem;
  align-items: center;
}
.cover {
  margin: 0;
  justify-self: center;
}
.cover img {
  width: 100%;
  max-width: 320px;
  border-radius: 2px;
  box-shadow: var(--shadow);
}
.kicker {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--emerald);
  margin: 0 0 0.85rem;
}
.hero h1 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(2.1rem, 5vw, 3.35rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
}
.hero h1 .funding { color: var(--emerald); display: block; }
.subtitle {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.88);
  margin: 1rem 0 0.35rem;
  max-width: 34rem;
}
.byline {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin: 0 0 1.5rem;
}
.lede {
  font-size: 1.12rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
  max-width: 38rem;
  margin: 0 0 1rem;
}
.lede + .lede { margin-top: 0.85rem; }

.buy-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.75rem;
  max-width: 40rem;
}
.buy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  background: var(--white);
  color: var(--navy);
  text-decoration: none;
  padding: 0.85rem 1rem 0.95rem;
  border-radius: 2px;
  font-family: var(--sans);
  border: 2px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.buy:hover { transform: translateY(-2px); color: var(--navy); border-color: var(--emerald); }
.buy .format {
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--emerald-dim);
}
.buy .price {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.buy .cta {
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* Sections */
.section { padding: 4rem 0; }
.section h2 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 1.25rem;
}
.section h2::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 3px;
  background: var(--emerald);
  margin-top: 0.65rem;
}
.section p { margin: 0 0 1rem; max-width: 42rem; }
.section.alt { background: var(--paper); }
.section.navy {
  background: var(--navy);
  color: var(--white);
}
.section.navy h2 { color: var(--white); }
.section.navy p, .section.navy li { color: rgba(255,255,255,0.9); }

/* Idea */
.idea p.lead {
  font-size: 1.28rem;
  line-height: 1.5;
  color: var(--navy);
  max-width: 40rem;
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}
.facts li {
  background: var(--paper);
  border-top: 3px solid var(--emerald);
  padding: 1.1rem 1.15rem 1.2rem;
}
.facts strong {
  display: block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.facts span {
  font-size: 1rem;
  color: var(--muted);
}

/* Chapters */
.chapters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  border-top: 1px solid var(--line);
}
.chapters li {
  padding: 1.15rem 1.25rem 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.chapters li:nth-child(even) { padding-left: 1.5rem; padding-right: 0; }
.chapters .num {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--emerald-dim);
  display: block;
  margin-bottom: 0.2rem;
}
.chapters h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--navy);
  margin: 0 0 0.35rem;
  line-height: 1.3;
}
.chapters p { margin: 0; font-size: 1rem; color: var(--muted); max-width: none; }
.also {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--muted);
  max-width: 46rem;
}

/* About + APC split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
}

/* Form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3rem;
  align-items: start;
}
.contact-copy p { max-width: 32rem; }
.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
}
.contact-list li { margin: 0 0 0.55rem; }
.contact-list a { color: var(--navy); text-decoration: none; border-bottom: 2px solid var(--emerald); }
.contact-list a:hover { color: var(--emerald-dim); }

.form {
  background: var(--paper);
  padding: 1.5rem 1.5rem 1.65rem;
  border-top: 3px solid var(--emerald);
}
.form h3 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 1rem;
}
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.field { margin-bottom: 0.85rem; }
.field label {
  display: block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.3rem;
}
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid #c9c3ba;
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
}
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--navy);
  color: var(--white);
  border: 0;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  border-radius: 2px;
}
.btn:hover { background: var(--navy-hi); }
.form-note {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
  max-width: none;
}
.form-status[hidden] { display: none; }
.form-status {
  margin: 0.85rem 0 0;
  font-size: 0.95rem;
  color: var(--emerald-dim);
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: 2rem 0;
  font-size: 0.92rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.site-footer a { color: var(--white); }
.site-footer p { margin: 0; max-width: 40rem; }

.thanks-body {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 4rem 1.25rem;
  text-align: center;
}
.thanks-body h1 {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--navy);
}

@media (max-width: 800px) {
  .hero-grid, .facts, .chapters, .split, .contact-grid, .buy-row, .row-2 {
    grid-template-columns: 1fr;
  }
  .chapters li:nth-child(even) { padding-left: 0; }
  .hero { padding: 2.25rem 0 2.75rem; }
  .hero-grid { gap: 1.75rem; }
  .cover img { max-width: 240px; margin-inline: auto; }
  .section { padding: 2.75rem 0; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 0.5rem; padding-block: 0.9rem; }
  .nav { gap: 0.45rem 0.95rem; font-size: 0.65rem; letter-spacing: 0.06em; }
  .wrap { width: min(var(--max), calc(100% - 1.75rem)); }
}
