/* Kathalyst, Ledger design. Plain CSS, no build step. */

:root {
  --bg: #f3eee2;
  --ink: #16130e;
  --muted: #655e4f;
  --line: #cfc6ad;
  --mint: #71eea8;
  --card: #faf7ee;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --pad: clamp(20px, 5vw, 72px);
  --bp: 900px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
a:hover { opacity: .7; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 20;
  background: var(--ink); color: var(--bg); padding: 10px 16px; text-decoration: none;
}
.skip:focus { left: 8px; }

.wrap { max-width: 1440px; margin: 0 auto; padding-inline: var(--pad); }

/* ---------- Shared type ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: .1em;
  color: var(--muted); margin-bottom: 22px; text-transform: uppercase;
}
.mark {
  background: var(--mint); padding: 0 .12em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.h2 {
  font-family: var(--serif); font-weight: 600; letter-spacing: -.03em; line-height: 1.1;
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
}
.lede {
  font-family: var(--serif); line-height: 1.5;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
}

/* ---------- Masthead ---------- */
.masthead { background: var(--bg); }
.meta {
  display: flex; justify-content: space-between; gap: 16px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  padding: 16px 0 14px; border-bottom: 1px solid var(--ink);
}
.brandrow { display: flex; justify-content: center; padding: 26px 0 22px; }
.brand {
  display: inline-flex; align-items: center; gap: 16px; text-decoration: none;
  font-family: var(--serif); font-weight: 600; letter-spacing: -.03em; line-height: 1;
  font-size: clamp(2rem, 3.4vw, 3rem);
}
.brand img { width: clamp(42px, 4vw, 56px); height: auto; aspect-ratio: 1; }
.menu-btn {
  display: none; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font: 500 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
}
.nav {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0 56px;
  border-top: 3px double var(--ink); border-bottom: 1px solid var(--ink);
}
.nav a {
  display: inline-flex; align-items: center; min-height: 48px;
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500;
  text-decoration: none; text-underline-offset: 6px;
}
.nav a[aria-current="page"] { text-decoration: underline; }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 14px 28px; background: var(--ink); color: var(--bg);
  font-size: 14px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500;
  text-decoration: none; text-align: center;
}
.link-cta {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  min-height: 44px; font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); column-gap: 32px;
  padding-block: clamp(36px, 5vw, 72px) clamp(44px, 6vw, 80px);
}
.hero h1, .hero-product h1 {
  font-family: var(--serif); font-weight: 600; line-height: .98; letter-spacing: -.04em;
  overflow-wrap: break-word;
}
.hero h1 { font-size: clamp(2.5rem, 7.2vw, 6.5rem); }
.hero aside {
  border-left: 1px solid var(--ink); padding-left: 32px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 24px; padding-bottom: 6px;
}
.hero-product {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); column-gap: 32px;
  padding-block: clamp(32px, 4.5vw, 64px) clamp(40px, 5vw, 64px);
}
.hero-product h1 { font-size: clamp(2.3rem, 6.4vw, 5.75rem); }
.hero-product aside {
  border-left: 1px solid var(--ink); padding-left: 28px;
  display: flex; align-items: flex-end;
}

/* ---------- Home: three columns ---------- */
.trio {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 3px double var(--ink); border-bottom: 1px solid var(--ink);
  padding-block: clamp(36px, 4.5vw, 56px);
}
.trio > div { padding-inline: 32px; border-left: 1px solid var(--ink); }
.trio > div:first-child { padding-left: 0; border-left: 0; }
.trio > div:last-child { padding-right: 0; }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.trio h3 {
  font-family: var(--serif); font-weight: 600; letter-spacing: -.03em; line-height: 1.1;
  font-size: clamp(1.8rem, 3vw, 2.5rem); margin: 14px 0;
}
.trio p { line-height: 1.7; }

/* ---------- Home: quote ---------- */
.quote { padding-block: clamp(56px, 8vw, 110px); text-align: center; }
.quote blockquote {
  max-width: 1100px; margin-inline: auto; font-family: var(--serif); font-style: italic;
  line-height: 1.12; letter-spacing: -.03em; font-size: clamp(1.8rem, 4vw, 3.6rem);
}

/* ---------- Home: value list ---------- */
.values-section { padding-bottom: clamp(48px, 6vw, 80px); }
.values-section .h2 { margin-bottom: 30px; }
.values { border-bottom: 1px solid var(--ink); }
.values li {
  display: grid; grid-template-columns: 70px 260px minmax(0, 1fr); align-items: baseline;
  padding: 26px 0; border-top: 1px solid var(--ink);
}
.values .num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.values .term { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; font-size: clamp(1.4rem, 2vw, 1.75rem); line-height: 1.2; }
.values .desc { line-height: 1.6; }

/* ---------- Call to action band ---------- */
.cta { margin-block: clamp(24px, 4vw, 40px) clamp(40px, 6vw, 72px); }
.cta-box {
  background: var(--mint); padding: clamp(32px, 5vw, 64px);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 26px;
}
.cta-box h2 {
  max-width: 900px; font-family: var(--serif); font-weight: 600; letter-spacing: -.03em;
  line-height: 1.05; font-size: clamp(1.9rem, 4.2vw, 3.75rem);
}
.cta-note { font-size: 15px; }
.cta-note a { font-weight: 600; }

/* ---------- Product: phases ---------- */
.phases {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 56px;
  border-top: 3px double var(--ink); padding-block: 44px clamp(40px, 5vw, 56px);
  scroll-margin-top: 16px;
}
.phases h2 {
  font-family: var(--serif); font-weight: 600; letter-spacing: -.03em; line-height: 1.05;
  font-size: clamp(2.2rem, 4vw, 3.25rem); margin: 12px 0 18px;
}
.phases .intro { font-size: 17px; line-height: 1.7; margin-bottom: 22px; }
.phases .intro::first-letter {
  float: left; font-family: var(--serif); font-weight: 600; font-size: 74px;
  line-height: .8; padding: 8px 10px 0 0;
}
.checks li { padding: 12px 0; border-top: 1px solid var(--line); line-height: 1.5; }
.doc { background: var(--card); border: 1px solid var(--ink); padding: clamp(18px, 2.4vw, 26px); }
.tag {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  background: var(--mint); padding: 4px 10px; margin-bottom: 16px; text-transform: uppercase;
}
.doc p { font-family: var(--serif); font-style: italic; line-height: 1.4; font-size: clamp(1.2rem, 2vw, 1.625rem); }
.then { margin-top: 26px; font-size: 17px; line-height: 1.7; }
.then b { font-family: var(--serif); font-size: 22px; }

/* ---------- Product: code figure ---------- */
.figure-wrap { border-top: 1px solid var(--ink); padding-block: 44px clamp(40px, 5vw, 56px); }
.code-card { border: 1px solid var(--ink); background: var(--card); }
.panes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pane { min-width: 0; }
.pane + .pane { border-left: 1px solid var(--ink); }
.pane-head {
  padding: 10px 20px; border-bottom: 1px solid var(--ink);
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--muted);
}
.pane pre {
  margin: 0; padding: 14px 0; overflow-x: auto;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.75;
}
.pane pre code { display: block; min-width: max-content; font: inherit; }
.pane pre span { display: block; padding: 0 20px; white-space: pre; }
.pane pre .hl { background: rgba(113, 238, 168, .55); }
.trace {
  padding: 10px 20px; border-top: 1px solid var(--ink); background: var(--mint);
  font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere;
}
figcaption { margin-top: 10px; font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--muted); }

/* ---------- Product: conversion paths ---------- */
.paths { padding-block: 24px clamp(36px, 5vw, 48px); }
.paths .h2 { margin-bottom: 24px; }
.path-list { border-bottom: 1px solid var(--ink); }
.path-list li {
  display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr) auto; gap: 8px 24px;
  align-items: baseline; padding: 20px 0; border-top: 1px solid var(--ink);
}
.path-name { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; }
.path-desc { color: var(--muted); }
.badge { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; padding: 4px 10px; justify-self: end; }
.badge.ga { background: var(--mint); color: var(--ink); }

/* ---------- Product: steps ---------- */
.steps { padding-block: 36px clamp(24px, 4vw, 40px); }
.steps ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.steps li { border-top: 3px double var(--ink); padding-top: 18px; }
.steps .n { font-family: var(--serif); font-style: italic; font-size: 56px; color: var(--muted); line-height: 1; }
.steps h3 { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; margin: 12px 0 8px; line-height: 1.2; }
.steps p { font-size: 15px; line-height: 1.6; }

/* ---------- Footer ---------- */
.footer { border-top: 3px double var(--ink); padding-block: 40px 56px; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer .brand { font-size: 1.75rem; gap: 11px; }
.footer .brand img { width: 40px; }
.footer p { margin-top: 12px; max-width: 420px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.footer-meta { font-family: var(--mono); font-size: 13px; line-height: 2; color: var(--muted); text-align: right; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 900px) {
  .meta { display: none; }
  .masthead { border-bottom: 1px solid var(--ink); }
  .brandrow { justify-content: space-between; align-items: center; padding: 14px 0; }
  .menu-btn { display: inline-flex; }
  .nav { flex-direction: column; flex-wrap: nowrap; gap: 0; border-bottom: 0; }
  .nav a { border-top: 1px solid var(--line); }
  .nav a:first-child { border-top: 0; }
  .js .nav { display: none; }
  .js .nav.open { display: flex; }

  .hero, .hero-product { grid-template-columns: minmax(0, 1fr); }
  .hero aside, .hero-product aside {
    border-left: 0; border-top: 1px solid var(--ink); padding: 24px 0 0; margin-top: 32px;
  }

  .trio { grid-template-columns: minmax(0, 1fr); padding-block: 8px; }
  .trio > div, .trio > div:first-child, .trio > div:last-child {
    padding: 28px 0; border-left: 0; border-top: 1px solid var(--ink);
  }
  .trio > div:first-child { border-top: 0; }

  .values li { grid-template-columns: 48px minmax(0, 1fr); row-gap: 8px; padding: 22px 0; }
  .values .desc { grid-column: 2; }

  .phases { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }

  .steps ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-meta { text-align: left; }
}

@media (max-width: 800px) {
  .panes { grid-template-columns: minmax(0, 1fr); }
  .pane + .pane { border-left: 0; border-top: 1px solid var(--ink); }
  .pane-head, .pane pre span { padding-inline: 16px; }
}

@media (max-width: 600px) {
  .path-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .path-desc { grid-column: 1 / -1; grid-row: 2; }
  .steps ol { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .values li { grid-template-columns: minmax(0, 1fr); }
  .values .desc { grid-column: 1; }
  .cta-box .btn { width: 100%; }
  .brand { gap: 12px; }
}

@media print {
  .menu-btn, .skip { display: none; }
  .js .nav { display: flex; }
}
