:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-soft: #efede7;
  --ink: #11141a;
  --muted: #4d5663;
  --muted-soft: #768091;
  --line: rgba(17, 20, 26, 0.12);
  --line-strong: rgba(17, 20, 26, 0.24);
  --bg-soft: rgba(17, 20, 26, 0.035);
  --accent: #11141a;
  --max: 76rem;
  --content: 58rem;
  --gutter: clamp(1.2rem, 3vw, 2.4rem);
  --section-space: clamp(4rem, 8vw, 7rem);
  --font-display: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-text);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

p {
  margin: 0;
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(var(--max), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
}

.content-shell {
  width: min(var(--content), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
}

.full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 244, 239, 0.88);
  backdrop-filter: blur(16px);
}

.nav {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.brand:hover {
  color: var(--ink);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.4rem;
  align-items: center;
}

.nav-links a {
  position: relative;
  padding-bottom: 0.2rem;
  font-size: 0.92rem;
  color: var(--muted);
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.12rem;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-main {
  min-height: calc(100vh - 9rem);
}

.hero-band,
.page-hero {
  position: relative;
  overflow: clip;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 20, 26, 0.028), rgba(17, 20, 26, 0) 55%), var(--bg);
}

.hero-band::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 20%, rgba(17, 20, 26, 0.055), transparent 26%);
  pointer-events: none;
}

.hero-band::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 62%;
  width: 1px;
  background: linear-gradient(180deg, rgba(17, 20, 26, 0), rgba(17, 20, 26, 0.08) 18%, rgba(17, 20, 26, 0.08) 82%, rgba(17, 20, 26, 0));
  pointer-events: none;
}

.hero-stage {
  min-height: calc(100vh - 4.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.82fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  padding: clamp(4rem, 7vw, 6.5rem) 0;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
  padding: clamp(3.25rem, 6vw, 5rem) 0 clamp(2.75rem, 5vw, 4rem);
}

.page-hero-grid--solo {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.page-hero-grid--solo .page-hero-copy {
  max-width: 44rem;
}

.hero-copy,
.page-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 38rem;
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.hero-title,
.page-title,
.section-head h2,
.feature-body h3,
.capability-row dt,
.channel-title,
.manifesto-quote {
  font-family: var(--font-display);
  color: var(--ink);
}

.hero-title {
  margin: 0;
  max-width: 17ch;
  font-size: clamp(2.6rem, 5.6vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.page-title {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.75rem, 5vw, 4.75rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.hero-deck,
.page-intro {
  margin-top: 1.3rem;
  max-width: 31rem;
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--muted);
}

.hero-copy > * {
  opacity: 0;
  transform: translateY(18px);
  animation: hero-rise 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-copy > :nth-child(1) {
  animation-delay: 0.04s;
}

.hero-copy > :nth-child(2) {
  animation-delay: 0.12s;
}

.hero-copy > :nth-child(3) {
  animation-delay: 0.2s;
}

.hero-copy > :nth-child(4) {
  animation-delay: 0.28s;
}

.hero-visual,
.page-hero-visual {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-self: end;
}

.portrait-stage {
  position: relative;
  width: min(100%, 23rem);
  margin-left: auto;
}

.portrait-frame {
  margin: 0;
}

.hero-portrait {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(17, 20, 26, 0.1);
  background: var(--surface-soft);
}

.social-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.35rem;
  margin-top: 1.7rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.social-inline a,
.footer-links a,
.feature-link,
.text-link {
  transition: color 0.25s ease, transform 0.25s ease;
}

.social-inline a {
  position: relative;
  padding-right: 1rem;
  color: var(--ink);
  font-size: 0.95rem;
}

.social-inline a::after,
.feature-link::after,
.text-link::after {
  content: "↗";
  position: absolute;
  right: 0;
  top: -0.03em;
  font-size: 0.78em;
  color: var(--accent);
  transition: transform 0.25s ease;
}

.social-inline a:hover,
.feature-link:hover,
.text-link:hover {
  color: var(--accent);
  transform: translateX(2px);
}

.social-inline a:hover::after,
.feature-link:hover::after,
.text-link:hover::after {
  transform: translate(2px, -2px);
}

.section {
  padding: var(--section-space) 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.section-head {
  max-width: 22rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.section-head p {
  margin-top: 1rem;
  color: var(--muted);
}

.prose p,
.manifesto p,
.fine-print,
.closing-note {
  color: var(--muted);
}

.prose p + p,
.manifesto p + p {
  margin-top: 1rem;
}

.feature-stack,
.capability-list,
.topic-list,
.channel-list {
  border-top: 1px solid var(--line);
}

.feature-row,
.capability-row,
.topic-item,
.contact-row {
  display: grid;
  gap: 1.4rem;
  align-items: start;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.feature-row,
.topic-item,
.contact-row {
  grid-template-columns: minmax(8rem, 0.55fr) minmax(0, 1fr);
}

.capability-row {
  grid-template-columns: minmax(0, 0.68fr) minmax(0, 1fr);
}

.feature-meta,
.topic-label,
.channel-name {
  padding-top: 0.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.feature-body h3 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.feature-body p,
.topic-body p,
.contact-body p {
  margin-top: 0.65rem;
  max-width: 40rem;
  color: var(--muted);
}

.feature-link,
.text-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-top: 0.95rem;
  padding-right: 1rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.section-note {
  margin-top: 1rem;
  max-width: 38rem;
  color: var(--muted);
}

.feed-stack {
  border-top: 1px solid var(--line);
}

.brief-body {
  border-top: 1px solid var(--line);
  padding-top: 0.25rem;
  max-width: 46rem;
}

.brief-body h2 {
  margin: 2.6rem 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1.05;
  letter-spacing: -0.05em;
  color: var(--ink);
  scroll-margin-top: 5rem;
}

.brief-body h3 {
  margin: 1.6rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brief-body p {
  margin: 0.8rem 0;
  color: var(--muted);
}

.brief-body strong {
  color: var(--ink);
  font-weight: 650;
}

.brief-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.brief-body blockquote {
  margin: 1.2rem 0;
  padding: 0.9rem 1.2rem;
  border-left: 2px solid var(--line-strong);
  background: var(--bg-soft);
  color: var(--muted);
}

.brief-body blockquote p {
  margin: 0.3rem 0;
}

.brief-body ul,
.brief-body ol {
  margin: 0.8rem 0;
  padding-left: 1.4rem;
  color: var(--muted);
}

.brief-body li {
  margin: 0.35rem 0;
}

.brief-body li::marker {
  color: var(--muted-soft);
}

.brief-body hr {
  margin: 2.4rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.brief-body code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  padding: 0.12em 0.35em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
}

.brief-body table {
  margin: 1.2rem 0;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

/* Appendix tables are wide (6-7 cols); never clip them silently on phones —
   make them scroll horizontally instead. */
.brief-body table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.brief-body th,
.brief-body td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  color: var(--muted);
}

.brief-body th {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.brief-body tr:last-child td {
  border-bottom: 0;
}

.feed-placeholder {
  padding: 1.35rem 0;
  color: var(--muted-soft);
}

.brief-item p {
  margin: 1.35rem 0;
  color: var(--muted);
}

.capability-row dt {
  font-size: 1.34rem;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.capability-row dd {
  margin: 0;
  color: var(--muted);
}

.manifesto {
  padding-top: 0.2rem;
}

.manifesto-quote {
  margin: 0 0 1rem;
  max-width: 12ch;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.topic-body strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.32rem;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.contact-row {
  color: inherit;
  transition: transform 0.25s ease, color 0.25s ease;
}

.contact-row:hover {
  text-decoration: none;
  transform: translateX(4px);
}

.channel-title {
  display: block;
  font-size: 1.55rem;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.channel-handle {
  display: inline-flex;
  margin-top: 0.9rem;
  color: var(--accent);
  font-size: 0.95rem;
}

.fine-print {
  margin-top: 1.4rem;
  font-size: 0.92rem;
}

.closing-note {
  margin-top: 1.5rem;
  max-width: 40rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.2rem;
}

.footer-shell {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
}

.footer-shell p {
  margin: 0;
  color: var(--muted-soft);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.error-shell,
.page-hero-shell {
  padding: clamp(4rem, 10vw, 8rem) 0;
}

.error-shell .page-title {
  max-width: 8ch;
}

.error-shell .page-intro {
  max-width: 28rem;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition-delay: var(--reveal-delay, 0ms);
}

@keyframes hero-rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .hero-band::after {
    display: none;
  }

  .hero-stage,
  .page-hero-grid,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: auto;
  }

  .hero-visual,
  .page-hero-visual {
    justify-content: flex-start;
  }

  .portrait-stage {
    width: min(100%, 19rem);
    margin-left: 0;
  }

  .section-head {
    max-width: 32rem;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .nav {
    padding: 0.95rem 0 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    gap: 0.25rem 1.25rem;
  }

  .nav-links a {
    padding: 0.55rem 0;
    font-size: 0.98rem;
  }

  .hero-stage {
    padding: 3.2rem 0 3.5rem;
  }

  .page-hero-grid {
    padding: 3rem 0 3rem;
  }

  .hero-title {
    font-size: clamp(2.6rem, 15vw, 4.15rem);
  }

  .page-title {
    font-size: clamp(2.35rem, 13vw, 3.55rem);
  }

  .feature-row,
  .topic-item,
  .capability-row,
  .contact-row {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .feature-meta,
  .topic-label,
  .channel-name {
    padding-top: 0;
  }

  .social-inline {
    gap: 0.75rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-copy > *,
  .hero-visual,
  .page-hero-visual,
  .js [data-reveal],
  .js [data-reveal].is-visible,
  .nav-links a,
  .nav-links a::after,
  .social-inline a,
  .social-inline a::after,
  .feature-link,
  .feature-link::after,
  .text-link,
  .text-link::after,
  .contact-row,
  .footer-links a {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
