/* Self hosted fonts (no third party requests) */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/instrument-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/instrument-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/instrument-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/instrument-sans-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/instrument-sans-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
}

/* ================= Keanan · kea brand =================
   Carbon at rest, bone for light, olive for labels.
   Underwing orange appears only where something moves. */
:root {
  --carbon: #0C0F0C;
  --carbon-2: #161A16;
  --bone: #F4F3EE;
  --bone-2: #ECEBE4;
  --olive: #7E8C6A;
  --underwing: #FF7A2F;
  --ash: #77776F;
  --smoke: #55554E;
  --hair: rgba(12, 15, 12, 0.12);
  --hair-light: rgba(255, 255, 255, 0.08);
  --sans: "Instrument Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --brand-accent: #FF7A2F;
  --brand-name: "Keanan";
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  overflow-x: clip;
  font-family: var(--sans);
  color: var(--carbon);
  background: var(--bone);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; }
::selection { background: var(--underwing); color: var(--carbon); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; }

h1, h2, h3, .wordmark, .price strong {
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
h1 { font-size: clamp(2.5rem, 5.4vw, 4.1rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); margin: 12px 0 22px; }
h3 { font-size: 1.14rem; letter-spacing: -0.02em; }

.uw { position: relative; white-space: nowrap; }
.uw::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.06em;
  height: 0.14em; background: var(--underwing);
  transform: scaleX(0); transform-origin: left;
  animation: uw-sweep 0.7s cubic-bezier(0.7, 0, 0.2, 1) 0.9s forwards;
  z-index: -1;
}
@keyframes uw-sweep { to { transform: scaleX(1); } }

.mono-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--olive);
}
.mono-label.small { font-size: 0.66rem; display: block; margin-bottom: 10px; }
.mono-label.on-carbon { color: var(--olive); }

/* ================= buttons ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem; letter-spacing: -0.01em;
  text-decoration: none; border: 0; cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}
.btn:focus-visible { outline: 3px solid var(--underwing); outline-offset: 2px; }
.btn-solid { background: var(--carbon); color: var(--bone); }
.btn-solid:hover { background: var(--underwing); color: var(--carbon); transform: translateY(-1px); }
.btn-line { background: transparent; color: var(--carbon); box-shadow: inset 0 0 0 1.5px var(--hair); }
.btn-line:hover { box-shadow: inset 0 0 0 1.5px var(--underwing); color: var(--carbon); }
.btn-line-light { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 1.5px rgba(244,243,238,0.3); }
.btn-line-light:hover { box-shadow: inset 0 0 0 1.5px var(--underwing); }
.btn-underwing { background: var(--underwing); color: var(--carbon); }
.btn-underwing:hover { background: var(--bone); transform: translateY(-1px); }
.btn-lg { padding: 17px 36px; font-size: 1.02rem; }

/* ================= nav ================= */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(244, 243, 238, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hair);
}
.nav-inner { display: flex; align-items: center; gap: 34px; height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; }
.brand-mark .kea-body { fill: var(--carbon); transition: fill 0.25s ease; }
.brand-mark .kea-eye { fill: var(--bone); }
.brand:hover .kea-body { fill: var(--underwing); }
.wordmark { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.045em; color: var(--carbon); }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a {
  text-decoration: none; font-size: 0.93rem; font-weight: 500; color: var(--smoke);
  position: relative; transition: color 0.18s ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -4px;
  height: 2px; background: var(--underwing); transition: right 0.25s ease;
}
.nav-links a:hover { color: var(--carbon); }
.nav-links a:hover::after { right: 0; }
.nav-cta { padding: 11px 22px; }

/* ================= hero ================= */
.hero { padding: 92px 0 76px; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 60px; align-items: center;
}
.hero-copy h1 { margin: 16px 0 22px; }
.hero-sub { font-size: 1.13rem; color: var(--smoke); max-width: 34rem; text-wrap: pretty; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }

.brand-switch { margin-top: 46px; }
.brand-switch-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--hair);
  background: #fff; font: 600 0.86rem var(--sans); letter-spacing: -0.01em; color: var(--carbon);
  cursor: pointer; transition: border-color 0.18s ease, transform 0.18s ease;
}
.chip:hover { border-color: var(--underwing); transform: translateY(-1px); }
.chip.is-active { border-color: var(--carbon); }
.chip:focus-visible { outline: 3px solid var(--underwing); outline-offset: 2px; }
.chip-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ================= product mock ================= */
.hero-visual { position: relative; }
.mock {
  background: var(--carbon-2);
  border: 1px solid var(--hair-light);
  border-radius: 16px; overflow: hidden;
  font-size: 0.74rem; color: var(--bone);
  box-shadow: 0 40px 80px -32px rgba(12, 15, 12, 0.55);
}
.mock-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 16px; border-bottom: 1px solid var(--hair-light);
}
.mock-brand { display: flex; align-items: center; gap: 9px; }
.mock-kea { width: 22px; height: 22px; }
.mock-name { font-weight: 600; letter-spacing: -0.03em; font-size: 0.9rem; }
.mock-tabs { display: flex; gap: 16px; color: #9A9A90; }
.mock-tabs .is-on { color: var(--bone); }
.mock-actions { display: flex; align-items: center; gap: 10px; }
.mock-kbd { font-family: var(--mono); font-size: 0.72rem; color: var(--ash); }
.mock-run {
  background: var(--brand-accent); color: var(--carbon);
  font-weight: 600; padding: 7px 13px; border-radius: 7px;
  transition: background 0.35s ease;
}
.mock-body { padding: 16px; }
.mock-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.mock-stat {
  background: rgba(244, 243, 238, 0.05); border: 1px solid var(--hair-light);
  border-radius: 10px; padding: 11px 12px;
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.mock-stat-label {
  font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.12em; color: var(--ash);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mock-stat-value { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.03em; }
.uw-live { color: var(--brand-accent); transition: color 0.35s ease; }
.mock-chart {
  background: rgba(244, 243, 238, 0.05); border: 1px solid var(--hair-light);
  border-radius: 10px; padding: 13px 13px 9px; margin-top: 9px;
}
.mock-bars { display: flex; align-items: flex-end; gap: 8px; height: 58px; }
.mock-bars span {
  flex: 1; height: var(--h); border-radius: 3px 3px 1px 1px;
  background: rgba(244, 243, 238, 0.28);
  transition: background 0.3s ease;
}
.mock-bars span:last-child { background: var(--brand-accent); }
.mock:hover .mock-bars span { background: var(--brand-accent); }
.mock-chart-label { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.12em; color: var(--ash); display: block; margin-top: 7px; }
.mock-rows { margin-top: 9px; }
.mock-row {
  display: flex; align-items: center; gap: 9px; padding: 8px 3px;
  border-top: 1px solid var(--hair-light); color: #C9C8C0;
  white-space: nowrap; overflow: hidden;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(244,243,238,0.25); flex: none; }
.dot.live { background: var(--brand-accent); box-shadow: 0 0 0 0 rgba(255,122,47,0.5); animation: pulse 2.4s ease infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,122,47,0.45); }
  70% { box-shadow: 0 0 0 8px rgba(255,122,47,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,122,47,0); }
}
.mock-time { margin-left: auto; font-family: var(--mono); font-size: 0.62rem; color: var(--ash); }
.mock-caption { text-align: center; margin-top: 18px; font-size: 0.9rem; color: var(--ash); }
.mock-caption em { font-style: normal; font-weight: 600; color: var(--carbon); }

/* ================= marquee ================= */
.marquee {
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  overflow: hidden; padding: 15px 0; background: var(--bone);
}
.marquee-track {
  display: flex; align-items: center; gap: 28px; width: max-content;
  animation: marquee 36s linear infinite;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.18em; color: var(--ash);
}
.marquee-track i {
  width: 8px; height: 8px; flex: none;
  background: var(--olive); border-radius: 50%; opacity: 0.5;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee:hover .marquee-track i { background: var(--underwing); opacity: 1; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ================= sections ================= */
.section { padding: 100px 0; }
.section-bone { background: #FBFAF7; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.section h2 { max-width: 46rem; }

.modules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 46px; }
.module {
  background: #fff; border: 1px solid var(--hair); border-radius: 14px;
  padding: 26px 24px; position: relative; overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.module::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--underwing); transform: scaleY(0); transform-origin: top;
  transition: transform 0.3s ease;
}
.module:hover, .module:focus-visible { transform: translateY(-4px); border-color: rgba(12,15,12,0.22); outline: none; }
.module:hover::before, .module:focus-visible::before { transform: scaleY(1); }
.module-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.module-index { font-family: var(--mono); font-size: 0.7rem; color: var(--olive); letter-spacing: 0.08em; }
.module:hover .module-index { color: var(--underwing); }
.module p { color: var(--smoke); font-size: 0.94rem; text-wrap: pretty; }
.module-dark { background: var(--carbon); border-color: var(--carbon); }
.module-dark h3 { color: var(--bone); }
.module-dark p { color: #9A9A90; }
.module-code {
  margin-top: 16px; font-family: var(--mono); font-size: 0.82rem;
  color: var(--bone) !important; display: flex; align-items: center; gap: 12px;
}
.toggle { width: 34px; height: 19px; border-radius: 999px; background: var(--underwing); position: relative; display: inline-block; }
.toggle-knob { position: absolute; right: 2.5px; top: 2.5px; width: 14px; height: 14px; border-radius: 50%; background: var(--carbon); }

/* ================= steps ================= */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 46px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  font: 600 1rem var(--sans); color: var(--bone); background: var(--carbon);
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.25s ease, color 0.25s ease;
}
.step:hover .step-num { background: var(--underwing); color: var(--carbon); }
.step h3 { margin-bottom: 7px; }
.step p { color: var(--smoke); font-size: 0.94rem; text-wrap: pretty; }

/* ================= self host ================= */
.section-carbon { background: var(--carbon); }
.section-carbon h2.on-carbon { color: var(--bone); }
.selfhost-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 58px; align-items: center; }
.selfhost-sub { color: #9A9A90; margin-top: 6px; max-width: 32rem; text-wrap: pretty; }
.selfhost-points { list-style: none; margin-top: 24px; display: flex; flex-direction: column; gap: 11px; }
.selfhost-points li { color: #C9C8C0; font-size: 0.95rem; padding-left: 26px; position: relative; }
.selfhost-points li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 11px; height: 11px;
  border-radius: 3px; background: var(--olive); transition: background 0.25s ease;
}
.selfhost-points li:hover::before { background: var(--underwing); }
.selfhost-points code { font-family: var(--mono); font-size: 0.85em; background: rgba(244,243,238,0.1); padding: 2px 7px; border-radius: 6px; }

.terminal {
  background: #090C09; border: 1px solid var(--hair-light); border-radius: 14px;
  overflow: hidden; box-shadow: 0 36px 72px -28px rgba(0,0,0,0.6);
}
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--hair-light); }
.terminal-bar span { width: 11px; height: 11px; border-radius: 50%; background: rgba(244,243,238,0.12); }
.terminal-bar em { margin-left: auto; font: 400 0.72rem var(--mono); color: var(--ash); }
.terminal pre { padding: 20px; overflow-x: auto; font: 400 0.8rem/1.8 var(--mono); color: #C9C8C0; }
.t-comment { color: var(--ash); }
.t-prompt { color: var(--underwing); }
.t-out { color: var(--olive); }
.t-accent { color: var(--underwing); }
.t-cursor {
  display: inline-block; width: 8px; height: 1em; margin-left: 4px;
  background: var(--underwing); vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ================= pricing ================= */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 46px; align-items: stretch; }
.price-card {
  background: #fff; border: 1px solid var(--hair); border-radius: 16px;
  padding: 30px 26px; display: flex; flex-direction: column; position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.price-card:hover, .price-card:focus-visible { transform: translateY(-4px); border-color: rgba(12,15,12,0.25); outline: none; }
.price-card.is-featured { border: 2px solid var(--carbon); }
.price-card.is-featured:hover { border-color: var(--underwing); }
.price-tag {
  position: absolute; top: -12px; left: 26px;
  background: var(--carbon); color: var(--bone);
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em;
  padding: 5px 12px; border-radius: 999px;
}
.price { margin: 14px 0 8px; display: flex; align-items: baseline; gap: 10px; }
.price strong { font-size: 2.2rem; }
.price span { color: var(--ash); font-size: 0.88rem; }
.price-blurb { color: var(--smoke); font-size: 0.92rem; min-height: 3.2em; text-wrap: pretty; }
.price-card ul { list-style: none; margin: 18px 0 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.price-card li { font-size: 0.92rem; padding-left: 24px; position: relative; }
.price-card li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 10px; height: 10px;
  border-radius: 3px; background: var(--olive);
}
.price-card:hover li::before { background: var(--underwing); transition: background 0.4s ease; }

/* ================= FAQ ================= */
.faq-list { margin-top: 36px; display: flex; flex-direction: column; gap: 10px; }
.faq-list details { background: #fff; border: 1px solid var(--hair); border-radius: 12px; padding: 0 20px; transition: border-color 0.2s ease; }
.faq-list details:hover { border-color: rgba(12,15,12,0.25); }
.faq-list details[open] { border-color: var(--carbon); }
.faq-list summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; letter-spacing: -0.015em; padding: 18px 0; font-size: 1rem; gap: 16px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; font: 500 1.4rem var(--sans); color: var(--olive);
  transition: transform 0.22s ease, color 0.22s ease; flex: none;
}
.faq-list details:hover summary::after { color: var(--underwing); }
.faq-list details[open] summary::after { transform: rotate(45deg); color: var(--underwing); }
.faq-list details p { padding: 0 0 18px; color: var(--smoke); font-size: 0.95rem; max-width: 42em; text-wrap: pretty; }

/* ================= CTA ================= */
.cta { background: var(--carbon); overflow: hidden; }
.cta-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 24px 0; }
.cta h2 { color: var(--bone); margin: 0; }
.cta-kea { position: relative; width: 96px; height: 96px; }
.cta-bird { position: absolute; inset: 0; width: 96px; height: 96px; }
.cta-wing {
  position: absolute; left: -46px; top: 26px; width: 110px; height: 64px;
  fill: var(--underwing); opacity: 0;
  transform: rotate(-8deg) translateX(12px) scale(0.9);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.6, 0, 0.2, 1);
}
.cta-inner:hover .cta-wing { opacity: 1; transform: rotate(-8deg) translateX(0) scale(1); }

/* ================= footer ================= */
.footer { background: var(--carbon); color: #9A9A90; padding: 84px 0 22px; border-top: 1px solid var(--hair-light); position: relative; overflow: hidden; }
.footer .wordmark { color: var(--bone); }
.footer .kea-body { fill: var(--bone); }
.footer .brand:hover .kea-body { fill: var(--underwing); }
.footer-inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 48px; }
.footer-brand p { margin-top: 14px; font-size: 0.92rem; max-width: 22rem; }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; }
.footer-cols h4 { color: var(--olive); font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em; font-weight: 500; margin-bottom: 14px; }
.footer-cols a { display: block; text-decoration: none; font-size: 0.93rem; padding: 5px 0; color: #9A9A90; transition: color 0.18s ease, padding-left 0.18s ease; }
.footer-cols a:hover { color: var(--underwing); padding-left: 5px; }
.footer-legal {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  border-top: 1px solid var(--hair-light); padding-top: 24px;
  font-size: 0.82rem; color: var(--ash);
  position: relative;
}
.footer-tag { line-height: 1.6; }
.footer-status {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 22px;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: #9A9A90; text-decoration: none;
  border: 1px solid var(--hair-light); border-radius: 999px; padding: 9px 16px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer-status:hover { color: var(--bone); border-color: var(--underwing); }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #5FBF77; flex-shrink: 0;
  animation: pulse 2.4s ease-out infinite;
}
.footer-mail { margin-top: 24px; display: flex; flex-direction: column; }
.footer-mail a {
  color: #9A9A90; text-decoration: none; font-size: 0.9rem; padding: 3px 0; width: fit-content;
  transition: color 0.18s ease, padding-left 0.18s ease;
}
.footer-mail a:hover { color: var(--underwing); padding-left: 5px; }
.footer-word {
  font-size: clamp(5.5rem, 19vw, 18rem); font-weight: 700; letter-spacing: -0.055em; line-height: 0.74;
  color: rgba(244,243,238,0.045); text-align: center; user-select: none; pointer-events: none;
  margin: 54px 0 -0.13em; white-space: nowrap;
  transition: color 0.5s ease;
}
.footer:hover .footer-word { color: rgba(244,243,238,0.075); }
.footer-mini { display: flex; gap: 18px; }
.footer-mini a { color: var(--ash); text-decoration: none; transition: color 0.18s ease; }
.footer-mini a:hover { color: var(--underwing); }
.footer-legal .mono-label { margin: 0; }

/* ================= reveal ================= */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.d1 { transition-delay: 0.08s; } .d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; } .d4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .uw::after { animation: none; transform: scaleX(1); }
  .marquee-track { animation: none; }
  .dot.live, .t-cursor { animation: none; }
  .btn, .module, .price-card, .step-num, .chip { transition: none; }
}

/* ================= responsive ================= */
@media (max-width: 980px) {
  .hero-grid, .selfhost-grid { grid-template-columns: minmax(0, 1fr); gap: 46px; }
  .modules-grid, .pricing-grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .section { padding: 66px 0; }
  .hero { padding: 58px 0 50px; }
  .modules-grid, .pricing-grid, .steps { grid-template-columns: minmax(0, 1fr); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .price-card.is-featured { order: -1; }
  .mock-tabs { display: none; }
}

/* ================= Subpages (legal, company) ================= */
.subpage .nav { position: sticky; top: 0; }
.page { padding: 96px 0 130px; }
.page-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.04em;
  line-height: 1.04;
  margin: 14px 0 10px;
}
.page-updated { color: var(--ink-soft, #5a5f58); font-size: 0.92rem; margin-bottom: 40px; }
.page-updated a { color: inherit; }
.prose { max-width: 720px; }
.prose .lead { font-size: 1.14rem; line-height: 1.65; color: var(--carbon); margin-bottom: 8px; }
.prose h2 {
  font-size: 1.32rem;
  letter-spacing: -0.02em;
  margin: 44px 0 12px;
  padding-top: 28px;
  border-top: 1px solid var(--hair);
}
.prose h3 { font-size: 1.02rem; letter-spacing: -0.01em; margin: 26px 0 8px; }
.prose p, .prose li { line-height: 1.7; color: #3a3f38; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--carbon); text-decoration: underline; text-decoration-color: var(--olive); text-underline-offset: 3px; transition: text-decoration-color 0.15s ease; }
.prose a:hover { text-decoration-color: var(--underwing); }
.prose strong { color: var(--carbon); }
.prose table { width: 100%; border-collapse: collapse; margin: 18px 0 22px; font-size: 0.95rem; }
.prose th {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive);
  padding: 0 14px 10px 0;
  border-bottom: 1.5px solid var(--carbon);
}
.prose td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--hair); vertical-align: top; line-height: 1.55; }
.log-entry { margin-bottom: 56px; }
.log-entry h2 { border-top: 0; padding-top: 0; margin-top: 6px; }
.notfound { padding: 140px 0 160px; }
.notfound-copy { max-width: 460px; line-height: 1.7; color: #3a3f38; margin: 0 0 30px; }
.notfound-actions { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .page { padding: 64px 0 90px; }
  .prose table { display: block; overflow-x: auto; }
}
