/* CAPT + Jess — shared styles for every page.
   Plain CSS, no build step. Page sections are built from the reusable
   blocks below (.section, .card-grid, .card, .feature, .cta-band). */

:root {
  --cream: #f3ecdc;
  --cream-2: #ebe2cd;
  --paper: #fbf8f1;
  --white: #ffffff;
  --ink: #222222;
  --muted: #5e5a52;
  --rule: #d8ceb7;
  --blue: #526779;
  --blue-dark: #34475a;
  --focus: #1f5fa8;

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 1120px;
  --gutter: 20px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 900px) { body { font-size: 18px; } }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue-dark); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

[id] { scroll-margin-top: 84px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 32px; } }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white);
  padding: 10px 16px; border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--white); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── Typography ─────────────────────────────────────────────── */

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; color: var(--ink); }
h1 { font-size: clamp(2.5rem, 7vw, 4.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.005em; }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin: 0 0 14px;
}

.lede { font-size: 1.125em; color: var(--ink); max-width: 38em; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* ── Buttons ────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border-radius: var(--radius);
  background: var(--blue-dark); color: var(--white);
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none; text-align: center;
  border: 2px solid var(--blue-dark);
  transition: background-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn-ghost { background: transparent; color: var(--blue-dark); }
.btn-ghost:hover { background: var(--blue-dark); color: var(--white); border-color: var(--blue-dark); }
.text-link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 600; color: var(--blue-dark);
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; }

/* ── Header + navigation ────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 236, 220, 0.96);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(140%) blur(6px);
}
.site-header .bar {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark {
  font-family: var(--serif); font-size: 1.6rem; line-height: 1;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; min-height: 44px;
}
.wordmark:hover { color: var(--ink); }

.nav-links { display: none; list-style: none; margin: 0; padding: 0; align-items: center; gap: 4px; }
.nav-links a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1rem;
  border-radius: var(--radius);
}
.nav-links a:not(.btn):hover { background: var(--cream-2); }
.nav-links a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.nav-links .btn { margin-left: 8px; min-height: 44px; padding: 10px 18px; font-size: 0.95rem; }

.menu-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; min-width: 44px; padding: 0 14px;
  background: transparent; border: 1px solid var(--rule); border-radius: var(--radius);
  font: 600 0.95rem var(--sans); color: var(--ink); cursor: pointer;
}
.menu-toggle .icon { width: 18px; height: 12px; position: relative; display: inline-block; }
.menu-toggle .icon::before, .menu-toggle .icon::after, .menu-toggle .icon span {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor;
}
.menu-toggle .icon::before { top: 0; }
.menu-toggle .icon span { top: 5px; }
.menu-toggle .icon::after { bottom: 0; }

.mobile-menu { border-top: 1px solid var(--rule); background: var(--cream); }
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { list-style: none; margin: 0; padding: 8px var(--gutter) 20px; }
.mobile-menu li a:not(.btn) {
  display: flex; align-items: center; min-height: 52px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink); text-decoration: none; font-size: 1.125rem; font-weight: 500;
}
.mobile-menu li:last-child { margin-top: 16px; }
.mobile-menu .btn { width: 100%; }

@media (min-width: 760px) {
  .nav-links { display: flex; }
  .menu-toggle, .mobile-menu { display: none !important; }
}

/* ── Sections ───────────────────────────────────────────────── */

.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-alt { background: var(--paper); }
.section-head { max-width: 40em; margin-bottom: 32px; }
.section-head h2 { margin-bottom: 14px; }
@media (min-width: 900px) { .section { padding: 96px 0; } }

/* Hero: photo beside copy on desktop, stacked on mobile. */
.hero { padding: 24px 0 56px; }
.hero .wrap { display: grid; gap: 28px; align-items: center; }
.hero-photo {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--cream-2);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.hero h1 { margin-bottom: 18px; }
.hero .lede { margin-bottom: 0; }
@media (min-width: 900px) {
  .hero { padding: 56px 0 96px; }
  .hero .wrap { grid-template-columns: 1fr 1.05fr; gap: 64px; }
  .hero-photo { aspect-ratio: 4 / 5; }
  .hero-photo img { object-position: 50% 40%; }
}

/* Two-column feature: text + supporting block. */
.feature { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .feature { grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; } }

/* Card grid: video cards, favorites, offers, people, collaborations. */
.card-grid { display: grid; gap: 20px; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
@media (min-width: 640px) { .card-grid.cols-2, .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; flex-direction: column;
}
.card h3 { font-size: 1.5rem; margin-bottom: 6px; }
.card .meta { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue-dark); margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.card .card-media { margin: -24px -24px 20px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; aspect-ratio: 16 / 9; background: var(--cream-2); }
.card .card-media img { width: 100%; height: 100%; object-fit: cover; }
.card .card-action { margin-top: auto; padding-top: 16px; }

/* Reading-list cover + interior page. Stacked on phones so the page text stays readable. */
.product-preview { display: grid; gap: 20px; grid-template-columns: 1fr; justify-items: center; }
.product-preview figure { margin: 0; width: 100%; }
.product-preview figure:first-child { max-width: 260px; }
.product-preview figure:last-child { max-width: 420px; }
.product-preview img { width: 100%; border-radius: 4px; box-shadow: 0 10px 30px rgba(34, 34, 34, 0.18); }
.product-preview figcaption { margin-top: 8px; text-align: center; }
@media (min-width: 640px) {
  .product-preview { grid-template-columns: 0.85fr 1fr; align-items: center; }
  .product-preview figure:first-child, .product-preview figure:last-child { max-width: none; }
}

/* About photo */
.about-photo { margin: 0 0 32px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--cream-2); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
@media (min-width: 900px) { .about-photo { aspect-ratio: 16 / 9; } }

/* Call-to-action band */
.cta-band {
  background: var(--blue-dark); color: var(--cream);
  border-radius: var(--radius); padding: 32px 24px;
}
.cta-band h2, .cta-band h3 { color: var(--white); margin-bottom: 14px; }
.cta-band p { color: var(--cream); }
.cta-band .btn { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.cta-band .btn:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
@media (min-width: 900px) { .cta-band { padding: 48px; } }

/* Platform links */
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 560px; }
.link-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 56px; padding: 12px 18px;
  background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; font-weight: 600;
}
.link-list a span { font-weight: 400; color: var(--muted); }
.link-list a:hover { border-color: var(--blue-dark); }

/* Page header for inner pages */
.page-head { padding: 48px 0 24px; }
.page-head h1 { margin-bottom: 18px; }
@media (min-width: 900px) { .page-head { padding: 80px 0 32px; } }

/* Notices (disclosures, draft banners) */
.notice {
  border-left: 4px solid var(--blue);
  background: var(--paper);
  padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem; color: var(--ink);
}
.notice p:last-child { margin-bottom: 0; }

/* Long-form text (privacy) */
.prose { max-width: 42em; }
.prose h2 { font-size: 1.9rem; margin: 2em 0 0.5em; }
.prose h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; margin: 1.5em 0 0.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }

/* Checklist */
.checklist { margin: 0 0 24px; padding-left: 1.2em; }
.checklist li { margin-bottom: 6px; }

/* ── Reading list ───────────────────────────────────────────── */

.signup-card { background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); padding: 28px 24px; }
.signup-card h2 { font-size: 2rem; margin-bottom: 10px; }
.signup-card .btn { width: 100%; margin: 8px 0 14px; }
@media (min-width: 640px) { .signup-card .btn { width: auto; } }

.toc { margin: 8px 0 0; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
@media (min-width: 700px) { .toc ol { grid-template-columns: repeat(2, 1fr); } }
.toc a {
  display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 8px 14px;
  background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
}
.toc a:hover { border-color: var(--blue-dark); }
.toc .n { font-variant-numeric: tabular-nums; color: var(--blue-dark); font-weight: 600; }

.category { padding: 48px 0 8px; border-top: 1px solid var(--rule); margin-top: 48px; }
.category h2 { margin-bottom: 8px; }
.category .cat-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 8px; }
.category .cat-intro { max-width: 40em; }
.books { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
@media (min-width: 900px) { .books { grid-template-columns: repeat(2, 1fr); } }
.books li {
  display: grid; grid-template-columns: 28px 56px 1fr; gap: 14px; align-items: start;
  background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px;
}
.books .n { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.85rem; padding-top: 4px; }
.books .cover { width: 56px; aspect-ratio: 2 / 3; background: var(--cream-2); border-radius: 2px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.books .cover img { width: 100%; height: 100%; object-fit: cover; }
.books .cover-fallback { font-family: var(--serif); font-size: 1.6rem; color: var(--muted); }
.books .book-title { font-weight: 600; line-height: 1.3; }
.books .book-title a { color: var(--ink); }
.books .author { color: var(--muted); font-size: 0.9rem; margin: 2px 0 6px; }
.books .note { font-size: 0.95rem; margin: 0; }

.closing { margin: 64px 0 0; }

/* ── Footer ─────────────────────────────────────────────────── */

.site-footer { background: var(--ink); color: var(--cream); padding: 48px 0 32px; margin-top: 0; }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--white); }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .wordmark { color: var(--cream); }
.site-footer h2 { font-family: var(--sans); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #c9d3dc; margin-bottom: 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid #44413c; font-size: 0.85rem; color: #c9d3dc; }

/* ── Products ───────────────────────────────────────────────── */

.product-card .cover {
  margin: -24px -24px 20px; padding: 24px;
  background: var(--cream-2); border-radius: var(--radius) var(--radius) 0 0;
  display: flex; justify-content: center;
}
.product-card .cover img { width: 100%; max-width: 220px; aspect-ratio: 640 / 828; object-fit: cover; border-radius: 3px; box-shadow: 0 8px 24px rgba(34, 34, 34, 0.18); }
.badge {
  display: inline-block; align-self: flex-start;
  padding: 4px 10px; margin-bottom: 12px;
  border-radius: 999px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
  background: var(--blue-dark); color: var(--white);
}
.badge.soon { background: transparent; color: var(--blue-dark); border: 1.5px solid var(--blue-dark); }
.product-card .for { font-size: 0.95rem; color: var(--muted); }
.product-card .status { margin-top: auto; padding-top: 16px; font-weight: 600; color: var(--muted); }

/* Discreet link to Brian's professional site. */
.footer-note { margin-top: 12px; }
.footer-note a { display: inline-block; padding: 12px 0; }
