/* 14 Streams — site styles
   Warm paper, pine, and a little gold. Editorial, not “fintech dashboard.” */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/InstrumentSans-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/InstrumentSans-Italic-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #f3efe6;
  --bg-deep: #e8e1d4;
  --paper: #fbf8f2;
  --ink: #152029;
  --ink-soft: #3a474f;
  --muted: #565f66; /* 5.68:1 on --bg, 6.14:1 on --paper (was 4.36:1) */
  --line: #d4cdc0;
  --line-strong: #c4bbab;
  --pine: #1b5c4c;
  --pine-deep: #123f35;
  --pine-soft: #e4efe9;
  --gold: #a6843c;
  --gold-soft: #f3ead4;
  --danger-ink: #6b3a22;
  --danger-bg: #f6ebe3;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(21, 32, 41, 0.04), 0 16px 40px rgba(21, 32, 41, 0.06);
  --header-h: 72px;
  --max: 1120px;
  --narrow: 720px;
  --sans: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--pine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--pine-deep); }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
p.lead { font-size: 1.2rem; color: var(--ink-soft); line-height: 1.55; max-width: 38em; }
.muted { color: var(--muted); }
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 575;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pine);
  margin: 0 0 0.85em;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: -100px;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.8rem;
  z-index: 100;
  border-radius: 6px;
}
.skip-link:focus { top: 0.75rem; }

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-name {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  line-height: 1;
}
.brand-14 {
  font-family: var(--serif);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}
.brand-streams {
  font-size: 0.95rem;
  font-weight: 575;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 1px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.35rem;
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a.btn-primary,
.nav a.btn-primary:hover,
.nav a.btn-primary:focus {
  color: #f6f1e7;
  font-weight: 575;
}
.nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--gold); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  position: relative;
  margin: 0 auto;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-weight: 575;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--pine);
  color: #f6f1e7;
}
.btn-primary:hover { background: var(--pine-deep); color: #f6f1e7; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }

/* Hero */
.hero {
  position: relative;
  padding: 4.5rem 0 4.25rem;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2.5rem;
  align-items: center;
}
.hero h1 { margin-bottom: 0.7em; }
.hero-art {
  position: relative;
  min-height: 280px;
}
.hero-art img, .hero-art svg {
  width: 100%;
  height: auto;
}
.hero-note {
  margin-top: 1.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 36em;
}

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Sections */
section { padding: 4.25rem 0; }
.section-head { margin-bottom: 2rem; max-width: 38em; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.55rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.45em; }
.card p:last-child { margin-bottom: 0; }
.card-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 575;
  color: #7a5f24; /* text-safe gold: 5.68:1 on --paper (was about 3.3:1) */
  margin-bottom: 0.7rem;
}

.list-blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.5rem;
}
.list-block {
  display: flex;
  gap: 0.9rem;
  padding: 1.1rem 0.2rem;
  border-top: 1px solid var(--line);
}
.list-block .num {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--pine);
  min-width: 2rem;
  line-height: 1.2;
}
.list-block h3 { font-size: 1.2rem; margin-bottom: 0.25em; }
.list-block p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* Newsletter */
.newsletter {
  background: var(--pine);
  color: #f3efe6;
  border-radius: 22px;
  padding: clamp(1.8rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}
.newsletter h2, .newsletter p { color: #f3efe6; }
.newsletter p { color: #d5e4dc; }
.newsletter .fine {
  font-size: 0.8rem;
  color: #c5d6cd;
  margin: 0.7rem 0 0;
}

form { display: grid; gap: 0.75rem; }
.field { display: grid; gap: 0.35rem; }
label { font-size: 0.85rem; font-weight: 575; }
.field input, .field textarea, .field select {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--pine);
  outline-offset: 1px;
  border-color: var(--pine);
}
.form-status {
  display: none;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: var(--gold-soft);
  color: var(--ink);
  font-size: 0.95rem;
}
.form-status.is-visible { display: block; }
.newsletter .form-status { background: #244f43; color: #f3efe6; }

/* Insights */
.post-list { display: grid; gap: 1rem; }
.post-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem;
  align-items: start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
.post-card:hover { color: inherit; border-color: var(--line-strong); }
.post-card h3 { margin: 0 0 0.35em; font-size: 1.45rem; }
.post-card p { margin: 0; color: var(--ink-soft); }
.post-meta { font-size: 0.82rem; color: var(--muted); }
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--gold-soft);
  color: #6a4e16;
  border: 1px solid #e2d2a6;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  margin-bottom: 0.55rem;
}
.read-more {
  font-size: 0.9rem;
  font-weight: 575;
  color: var(--pine);
  align-self: center;
  white-space: nowrap;
}

article.post { padding: 3.5rem 0 4.5rem; }
.post-header { margin-bottom: 2rem; }
.post-body { font-size: 1.05rem; max-width: 40em; }
.post-body h2 { font-size: 1.7rem; margin-top: 1.6em; }
.post-body ul { padding-left: 1.15rem; }
.post-body li { margin-bottom: 0.4rem; }
.sample-banner {
  background: var(--gold-soft);
  border: 1px solid #e2d2a6;
  color: #4a3914;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}

/* Pricing */
.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  align-items: stretch;
}
.plan {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.8rem 1.6rem 1.7rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.plan.featured {
  background: var(--ink);
  color: #f3efe6;
  border-color: var(--ink);
}
.plan.featured h2, .plan.featured p, .plan.featured li { color: #f3efe6; }
.plan.featured .muted { color: #b8c0c4; }
.price {
  font-family: var(--serif);
  font-size: 2.6rem;
  letter-spacing: -0.03em;
  margin: 0.2rem 0 0.15rem;
  line-height: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 0.7rem;
}
.price-note { font-size: 0.85rem; margin-bottom: 1.2rem; }
.plan ul {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  flex: 1;
}
.plan li {
  padding: 0.45rem 0 0.45rem 1.15rem;
  position: relative;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}
.plan.featured li { border-top-color: #2c3942; }
.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pine);
}
.plan.featured li::before { background: #d4b36a; }
.placeholder-tag {
  display: inline-block;
  margin-left: 0.35rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 0.45em;
  color: #6a4e16;
  background: var(--gold-soft);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}
.plan.featured .placeholder-tag {
  background: #2a2416;
  color: #e6d19a;
}

/* Legal / about prose */
.prose { max-width: 42em; }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2rem; }
.callout {
  background: var(--danger-bg);
  color: var(--danger-ink);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  font-size: 0.98rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 2.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.65rem; color: var(--ink); text-decoration: none; margin-bottom: 0.7rem; }
.footer-brand:hover { color: var(--ink); }
.site-footer h2 {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.7rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.3rem 0; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.legal-line { margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid var(--line); font-size: 0.82rem; }

/* Contact layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
}

@media (max-width: 880px) {
  .hero-grid,
  .cards,
  .list-blocks,
  .newsletter,
  .plans,
  .footer-grid,
  .contact-grid,
  .post-card { grid-template-columns: 1fr; }
  .hero { padding-top: 2.8rem; }
  .hero-art { order: -1; min-height: 0; }
  .read-more { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: var(--header-h);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.8rem 1.25rem 1.1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }
  .nav.is-open { display: flex; }
  .nav a, .nav .btn { padding: 0.7rem 0.2rem; }
  .nav .btn { justify-content: center; margin-top: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Social links (hidden in the footer until accounts exist) */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.05rem;
  list-style: none;
  margin: 1.05rem 0 0;
  padding: 0;
}
.social-links[hidden] { display: none !important; }
.social-links li { margin: 0; }
.social-links a { font-weight: 575; }

/* Forms */
.btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
.form-status.is-error {
  background: var(--danger-bg);
  color: var(--danger-ink);
}
.newsletter .form-status.is-error {
  background: #5a2e22;
  color: #f6ebe3;
}

/* Contact email */
.contact-email {
  font-size: 1.15rem;
  margin: 0 0 1em;
}
.contact-email a { font-weight: 575; }

/* 404 */
.page-404 {
  padding: 4.5rem 0 5rem;
}
.page-404 .code {
  font-family: var(--serif);
  font-size: clamp(4.2rem, 12vw, 8rem);
  line-height: 0.9;
  color: var(--pine);
  margin: 0 0 0.25em;
  letter-spacing: -0.03em;
}
