/* ============================================================
   SIGNAL — Site styles (shared across all marketing pages)
   ============================================================ */

/* Page-to-page fade transition (paired with transition.js) */
@keyframes signal-fade-in { from { opacity: 0; } to { opacity: 1; } }
html.signal-fade-in { animation: signal-fade-in 280ms ease both; }
html.signal-fade-out { transition: opacity 280ms ease; opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  html.signal-fade-in { animation: none; }
  html.signal-fade-out { transition: none; opacity: 1; }
}


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 320ms ease, color 320ms ease;
}
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--bg); }

/* ============ MARK ============ */
.mark { display: flex; align-items: center; gap: 12px; }
.mark-glyph {
  width: 26px; height: 26px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 14px; font-style: italic; font-weight: 400;
}
.mark-text {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* ============ THEME TOGGLE ============ */
.theme-toggle {
  width: 26px; height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 200ms ease;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 13px; height: 13px; }
[data-theme="cream"] .theme-toggle .icon-sun { display: none; }
[data-theme="ink"]   .theme-toggle .icon-moon { display: none; }

/* ============ TOP NAV (every page except home, which has fixed hero) ============ */
.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
}
.topnav .right { display: flex; align-items: center; gap: 28px; }
.topnav-links {
  display: flex;
  gap: 32px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.topnav-links a { transition: color 200ms ease; }
.topnav-links a:hover, .topnav-links a.active { color: var(--ink); }
.topnav-links a.active { position: relative; }
.topnav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--ink);
}

/* ============ PAGE WRAPPER ============ */
.page {
  padding: 120px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.page:last-of-type { border-bottom: 0; }
.page.compact { padding-top: 100px; padding-bottom: 100px; }
.page-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

/* ============ PAGE HEAD (two-column meta + title) ============ */
.page-head {
  display: grid;
  grid-template-columns: var(--meta-col) 1fr;
  gap: var(--meta-gap);
  align-items: end;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 80px;
}
.meta-block { padding-top: 8px; }
.index {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}
.index::before { content: "— "; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; max-width: 200px; }

h2.page-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 5.4vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.022em;
  color: var(--ink);
  text-wrap: balance;
  max-width: 14ch;
  margin: 0;
}
h2.page-title em { font-style: italic; font-weight: 300; }
.page-meta {
  margin-top: 24px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 48ch;
}

/* ============ PROSE ============ */
.prose { max-width: 60ch; }
.prose p {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 1.2em 0;
  text-wrap: pretty;
}
.prose p:last-child { margin-bottom: 0; }
.prose p.lede {
  font-size: 24px;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: 1.4em;
}

/* ============ STEPS ============ */
ol.steps { list-style: none; }
ol.steps > li {
  display: grid;
  grid-template-columns: 60px 1fr;
  column-gap: 32px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
ol.steps > li:last-child { border-bottom: 1px solid var(--line); }
ol.steps .num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  color: var(--ink-muted);
  padding-top: 8px;
}
ol.steps h3 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 12px 0;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
ol.steps p {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  text-wrap: pretty;
  max-width: 56ch;
}

/* ============ WORK / TOC LIST ============ */
ol.work { list-style: none; }
ol.work > li {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  column-gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(22px, 2.6vw, 32px);
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.25;
}
ol.work > li:first-child { border-top: 1px solid var(--line); }
ol.work .num {
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  color: var(--ink-muted);
}
ol.work .title { text-wrap: pretty; }
ol.work .leader {
  border-bottom: 1px dotted var(--line);
  align-self: end;
  height: 1px;
  margin-bottom: 14px;
}
ol.work .tag-pill {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tag-ink);
  font-weight: 500;
  white-space: nowrap;
  align-self: center;
}

/* ============ PRICING ============ */
dl.pricing { margin: 0; }
dl.pricing .row {
  display: grid;
  grid-template-columns: 220px 1fr;
  column-gap: 48px;
  align-items: baseline;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
dl.pricing .row:last-child { border-bottom: 1px solid var(--line); }
dl.pricing dt {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  font-style: italic;
}
dl.pricing dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
  max-width: 52ch;
}

/* ============ CONTACT ============ */
.contact-prose { max-width: 50ch; margin-bottom: 64px; }
.contact-prose p {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  text-wrap: pretty;
}
a.email {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 300;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1;
  display: inline-block;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  transition: border-color 200ms ease;
}
a.email:hover { border-bottom-color: var(--ink); }

/* ============ FOOTER ============ */
footer.site {
  background: var(--bg-deep);
  color: var(--ink-muted);
  padding: 32px var(--gutter);
  border-top: 1px solid var(--line);
}
footer.site .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--content-max);
  margin: 0 auto;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  :root { --gutter: 28px; --meta-col: 140px; --meta-gap: 40px; }
  .page { padding: 80px var(--gutter); }
  .page-head { padding-bottom: 36px; margin-bottom: 56px; }
}
@media (max-width: 720px) {
  :root { --gutter: 22px; }
  .topnav { padding: 18px 22px; flex-wrap: wrap; gap: 14px; }
  .topnav-links { gap: 16px; font-size: 10px; }
  .page { padding: 64px 22px; }
  .page-head {
    grid-template-columns: 1fr;
    row-gap: 24px;
    align-items: start;
  }
  h2.page-title { font-size: 34px; max-width: 100%; }
  .tags { max-width: 100%; }
  .prose p.lede { font-size: 20px; }
  ol.steps > li { grid-template-columns: 40px 1fr; column-gap: 16px; padding: 26px 0; }
  ol.steps h3 { font-size: 22px; }
  ol.work > li { grid-template-columns: 40px 1fr; column-gap: 16px; font-size: 20px; padding: 18px 0; }
  ol.work .leader { display: none; }
  ol.work .tag-pill { grid-column: 2 / 3; justify-self: start; margin-top: 6px; }
  dl.pricing .row { grid-template-columns: 1fr; row-gap: 10px; padding: 26px 0; }
  dl.pricing dt { font-size: 24px; }
  a.email { font-size: 30px; }
  .contact-prose p { font-size: 19px; }
  footer.site .row { flex-direction: column; gap: 8px; }
}
