/* ============================================================================
   RIDGEHOLD - v5 "porcelain & ink" design system
   Light instrument system: hairlines, exact type, one deep-teal accent.
   Vanilla CSS. No framework, no CDN, no external hosts.
   Tokens follow DESIGN-SYSTEM-V5.md - edit there first, then here.
   ========================================================================== */

/* ------------------------------- fonts ---------------------------------- */
@font-face {
  font-family: 'Instrument Sans';
  src: url('/assets/fonts/instrument-sans-vf-latin-wght.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/assets/fonts/ibm-plex-mono-v20-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/assets/fonts/ibm-plex-mono-v20-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/assets/fonts/ibm-plex-mono-v20-latin-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------- tokens --------------------------------- */
:root {
  --porcelain: #F6F4EF;
  --paper: #FFFFFF;
  --ink: #14161A;
  --ink-2: #33373E;
  --muted: #5F646C;
  --hair: #E2DED6;
  --hair-ink: #2B2F35;
  --accent: #0D5B5E;
  --accent-ink: #0A4A4D;
  --sand: #EFE7D8;

  --font-sans: 'Instrument Sans', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --wrap: 1180px;
  --pad: 24px;
  --header-h: 60px;

  --r-1: 4px;
  --r-2: 8px;

  --shadow: 0 1px 2px rgba(20, 22, 26, .05), 0 12px 32px -18px rgba(20, 22, 26, .18);

  --t-fast: 160ms;
  --t-mid: 320ms;
  --t-enter: 480ms;
  --ease: cubic-bezier(.22, .61, .36, 1);

  --sec-pad: clamp(72px, 9vw, 124px);
}
@media (min-width: 768px) {
  :root { --pad: 40px; --header-h: 68px; }
}

/* ------------------------------- reset ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  background: var(--porcelain);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.band-dark :focus-visible { outline-color: #7FD3D4; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--porcelain);
  padding: 10px 16px; border-radius: var(--r-1);
  font-size: .9rem; text-decoration: none;
  transition: top var(--t-fast) var(--ease);
}
.skip:focus { top: 12px; }

/* ---------------------------- typography -------------------------------- */
h1, .h1 {
  font-size: clamp(2.25rem, 4.6vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -.024em;
}
.hero-title {
  font-size: clamp(2.75rem, 6.2vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -.028em;
  font-weight: 600;
}
h2, .sec-title {
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -.02em;
}
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -.01em; }
.lede {
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 62ch;
}
.lede + .lede { margin-top: 1.1em; }
.prose p { max-width: 68ch; }
.prose p + p { margin-top: 1.1em; }
.note { font-size: .9rem; line-height: 1.55; color: var(--muted); }
.mono, .lab, .idx {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.dim { color: var(--muted); }

.text-link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(13, 91, 94, .55);
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.text-link:hover { border-bottom-color: var(--accent); color: var(--accent-ink); }
.lede a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(13, 91, 94, .38); }
.lede a:hover { border-bottom-color: var(--accent); }

/* ------------------------------ layout ---------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.sec { padding-block: var(--sec-pad); }
.sec-tight { padding-block: clamp(48px, 6vw, 80px); }

.sec-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.sec-head .idx { color: var(--accent); white-space: nowrap; }
.sec-head .hr { flex: 1; height: 1px; background: var(--hair); }
.sec-head .lab { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band-dark .sec-head .hr { background: var(--hair-ink); }
.band-dark .sec-head .lab { color: #A8ADB4; }

.sec-title { max-width: 22ch; }
.sec-intro { margin-top: 20px; }
.sec-more { margin-top: 28px; }

.split {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 7fr 5fr; align-items: start; }
  .split-even { grid-template-columns: 1fr 1fr; }
  .split-flip { grid-template-columns: 5fr 7fr; }
}

/* ------------------------------ buttons --------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--r-1);
  border: 1px solid transparent;
  font-size: .98rem;
  font-weight: 500;
  letter-spacing: -.005em;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: 90ms; }
/* Press feedback lands on pointer-down and is continuous through the
   press, which is what makes a control feel direct rather than dead. */
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-ink); }
.btn-line { background: transparent; color: var(--ink); border-color: rgba(20, 22, 26, .28); }
.btn-line:hover { border-color: var(--ink); background: rgba(20, 22, 26, .04); }
.band-dark .btn-line { color: var(--porcelain); border-color: rgba(246, 244, 239, .34); }
.band-dark .btn-line:hover { border-color: var(--porcelain); background: rgba(246, 244, 239, .07); }
.btn .arr { font-family: var(--font-mono); font-size: .9em; transition: transform var(--t-fast) var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ------------------------------ header ---------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(246, 244, 239, .92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--hair);
  background: rgba(246, 244, 239, .66);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 18px 40px -34px rgba(20, 22, 26, .45);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.06rem;
  letter-spacing: -.02em;
}
.brand svg { width: 22px; height: 22px; flex: none; }
.brand .brand-sub {
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 10px;
  margin-left: 2px;
  border-left: 1px solid var(--hair);
}
@media (max-width: 479px) { .brand .brand-sub { display: none; } }

.main-nav ul { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  display: inline-block;
  padding: 8px 12px;
  font-size: .95rem;
  text-decoration: none;
  color: var(--ink-2);
  border-radius: var(--r-1);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.main-nav a:hover { color: var(--ink); background: rgba(20, 22, 26, .05); }
.main-nav a[aria-current='page'] { color: var(--ink); font-weight: 500; }
.main-nav .nav-cta {
  margin-left: 8px;
  background: var(--accent);
  color: #fff;
  padding: 9px 16px;
  font-weight: 500;
}
.main-nav .nav-cta:hover { background: var(--accent-ink); color: #fff; }

.menu-btn {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid rgba(20, 22, 26, .26);
  border-radius: var(--r-1);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
@media (max-width: 919px) {
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--porcelain);
    border-bottom: 1px solid var(--hair);
    padding: 8px var(--pad) 24px;
    display: none;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav li { border-bottom: 1px solid var(--hair); }
  .main-nav li:last-child { border-bottom: 0; padding-top: 16px; }
  .main-nav a { padding: 14px 2px; font-size: 1.05rem; }
  .main-nav .nav-cta { margin-left: 0; text-align: center; justify-content: center; }
  .menu-btn { display: inline-flex; }
}
@media (min-width: 920px) {
  .main-nav { display: block !important; }
}

/* ------------------------------- hero ----------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(40px, 4.6vw, 64px) clamp(56px, 7vw, 88px);
  border-bottom: 1px solid var(--hair);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 5vw, 56px);
  align-items: center;
}
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: 6.4fr 5.6fr; gap: 56px; }
}
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-2);
  font-weight: 500;
  margin-bottom: 30px;
}
.hero-kicker::after { content: ''; flex: 1; height: 1px; background: var(--hair); max-width: 90px; }
.hero-title { max-width: 15ch; }
.hero-title .accent-word { color: var(--accent); }
.hero-sub {
  margin-top: 24px;
  font-size: clamp(1.0625rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 46ch;
}
.hero-cta { margin-top: 32px; }

.hero-spec {
  margin-top: clamp(36px, 4.5vw, 52px);
  border-top: 1px solid var(--hair);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 700px) { .hero-spec { grid-template-columns: repeat(4, 1fr); } }
.hero-spec li:nth-child(-n+2) { border-bottom: 0; }
.hero-spec li {
  padding: 18px 20px 6px 0;
  border-right: 1px solid var(--hair);
  font-size: .9rem;
  line-height: 1.5;
  color: var(--muted);
}
.hero-spec li:last-child { border-right: 0; }
.hero-spec li:nth-child(2n) { padding-left: 20px; }
@media (min-width: 700px) {
  .hero-spec li { padding-left: 20px; padding-bottom: 0; }
  .hero-spec li:first-child { padding-left: 0; }
}
.hero-spec .k {
  display: block;
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 4px;
}

/* ---------------------------- ridge plate -------------------------------- */
.plate { position: relative; }
.plate svg { width: 100%; height: auto; }
.plate-frame {
  border: 1px solid var(--hair);
  background: var(--paper);
  border-radius: var(--r-2);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.plate-legend {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  flex-wrap: wrap;
}
.plate-legend li { display: flex; align-items: center; gap: 8px; }
.plate-legend li + li::before { content: '→'; color: var(--accent); }
@media (min-width: 980px) { .plate-legend { display: none; } }
@media (max-width: 767px) { .plate-label { display: none; } }

/* --------------------------- dark band ---------------------------------- */
.band-dark {
  background: var(--ink);
  color: var(--porcelain);
}
.band-dark h2, .band-dark h3 { color: var(--porcelain); }
.band-dark .lede, .band-dark .dim { color: #A8ADB4; }
.band-dark .sec-head .idx { color: #5FBFC0; }
.band-dark .demo h3 { color: var(--ink); }

/* ------------------------ product demonstration ------------------------- */
.demo {
  margin-top: clamp(36px, 5vw, 56px);
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--hair);
  border-radius: var(--r-2);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.demo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hair);
  background: var(--porcelain);
}
.demo-bar .demo-name {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.demo-bar .demo-flag {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}
.demo-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-bottom: 1px solid var(--hair);
}
@media (min-width: 760px) { .demo-steps { grid-template-columns: repeat(4, 1fr); } }
.demo-steps button {
  appearance: none;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
@media (min-width: 760px) { .demo-steps button { border-bottom: 0; } }
.demo-steps button:nth-child(2n) { border-right: 0; }
@media (min-width: 760px) {
  .demo-steps button:nth-child(2n) { border-right: 1px solid var(--hair); }
  .demo-steps button:last-child { border-right: 0; }
}
.demo-steps button:hover { background: rgba(13, 91, 94, .06); }
.demo-steps .st-n {
  display: block;
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .14em;
  color: var(--muted);
  margin-bottom: 3px;
}
.demo-steps .st-t { font-size: .95rem; font-weight: 500; }
.demo-steps button[aria-selected='true'] {
  background: rgba(13, 91, 94, .08);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.demo-steps button[aria-selected='true'] .st-n { color: var(--accent); }

.demo-body { padding: clamp(20px, 3vw, 32px); }
.js .demo-panel { display: none; }
.js .demo-panel.is-active { display: block; animation: demoIn var(--t-mid) var(--ease); }
@keyframes demoIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.demo-grid {
  display: grid;
  gap: clamp(20px, 3vw, 36px);
  grid-template-columns: 1fr;
}
@media (min-width: 860px) { .demo-grid { grid-template-columns: 1fr 1fr; } }
.demo-col h3 {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.mail {
  border: 1px solid var(--hair);
  border-radius: var(--r-1);
  background: var(--porcelain);
  overflow: hidden;
}
.mail-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--hair);
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.mail-body {
  padding: 14px;
  font-size: .95rem;
  line-height: 1.6;
  white-space: pre-line;
}
.quote-doc {
  border: 1px solid var(--hair);
  border-radius: var(--r-1);
  background: var(--paper);
  overflow: hidden;
}
.quote-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hair);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
}
.quote-head .status { color: var(--accent); font-weight: 600; }
.quote-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.quote-table th, .quote-table td {
  text-align: left;
  padding: 9px 14px;
  border-bottom: 1px solid var(--hair);
}
.quote-table th {
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.quote-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.quote-table tr.total td { font-weight: 600; border-bottom: 0; }
.quote-foot {
  padding: 11px 14px;
  background: var(--porcelain);
  border-top: 1px solid var(--hair);
  font-size: .85rem;
  color: var(--muted);
}
.fields { border: 1px solid var(--hair); border-radius: var(--r-1); background: var(--paper); }
.fields div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hair);
  font-size: .93rem;
}
.fields div:last-child { border-bottom: 0; }
.fields .f-k {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  align-self: center;
}
.fields .f-v { font-weight: 500; text-align: right; }
.review-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(13, 91, 94, .3);
  border-radius: var(--r-1);
  background: rgba(13, 91, 94, .05);
}
.review-note .rn-mark {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
}
.review-note p { font-size: .93rem; line-height: 1.55; }
.review-note strong { font-weight: 600; }
.demo-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
}
.demo-foot .note { max-width: 62ch; }

/* ------------------------- solution rows -------------------------------- */
.rows { border-top: 1px solid var(--hair); }
.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 40px;
  padding: clamp(28px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--hair);
}
@media (min-width: 900px) {
  .row { grid-template-columns: 64px 4.6fr 5.4fr; }
}
.row-idx {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--accent);
  padding-top: 6px;
}
.row-title { font-size: clamp(1.3rem, 2vw, 1.6rem); letter-spacing: -.015em; }
.row-problem {
  margin-top: 10px;
  color: var(--muted);
  font-size: .98rem;
  max-width: 40ch;
}
.row-detail { display: grid; gap: 16px; align-content: start; }
.row-line { display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: baseline; }
.row-line .rl-k {
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.row-line .rl-v { font-size: .96rem; line-height: 1.55; }
.row-out {
  margin-top: 4px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--r-1);
  font-family: var(--font-mono);
  font-size: .8rem;
  line-height: 1.6;
  color: var(--ink-2);
  white-space: pre-line;
}
.row-cta { margin-top: 6px; }

/* --------------------------- flow / steps ------------------------------- */
.flow {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--hair);
}
@media (min-width: 620px) { .flow { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .flow { grid-template-columns: repeat(4, 1fr); } }
.flow-step {
  padding: 24px 24px 28px 0;
  border-bottom: 1px solid var(--hair);
}
@media (min-width: 620px) {
  .flow-step { border-right: 1px solid var(--hair); padding-left: 24px; }
  .flow-step:nth-child(2n+1) { padding-left: 0; }
  .flow-step:nth-child(2n) { border-right: 0; }
}
@media (min-width: 1000px) {
  .flow-step { padding-left: 24px; border-bottom: 0; }
  .flow-step:first-child { padding-left: 0; }
  .flow-step:nth-child(2n) { border-right: 1px solid var(--hair); }
  .flow-step:last-child { border-right: 0; }
}
.flow-step .fs-n {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}
.flow-step h3 { font-size: 1.06rem; margin-bottom: 8px; }
.flow-step p { font-size: .94rem; color: var(--muted); line-height: 1.6; }

/* -------------------------- principles list ----------------------------- */
.principles { border-top: 1px solid var(--hair); }
.principle {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 40px;
  padding: clamp(22px, 3vw, 30px) 0;
  border-bottom: 1px solid var(--hair);
}
@media (min-width: 860px) {
  .principle { grid-template-columns: 56px 4.4fr 6fr; align-items: baseline; }
}
.principle .p-n {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--accent);
}
.principle h3 { font-size: 1.15rem; }
.principle p { color: var(--muted); font-size: .98rem; line-height: 1.6; max-width: 62ch; }

/* ------------------------------ offers ---------------------------------- */
.offers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 880px) { .offers { grid-template-columns: 1fr 1fr; gap: 28px; } }
.offer {
  background: var(--sand);
  border: 1px solid #E0D5C0;
  border-radius: var(--r-2);
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
}
.offer.alt { background: var(--paper); border-color: var(--hair); }
.offer .o-tier {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.offer .o-name { margin-top: 14px; font-size: 1.45rem; letter-spacing: -.015em; }
.offer .o-price {
  margin-top: 6px;
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.offer .o-price span { font-size: 1rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.offer .o-desc { margin-top: 12px; color: var(--ink-2); font-size: .98rem; max-width: 44ch; }
.offer ul { margin-top: 20px; border-top: 1px solid rgba(20, 22, 26, .12); }
.offer li {
  padding: 11px 0;
  border-bottom: 1px solid rgba(20, 22, 26, .12);
  font-size: .95rem;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  line-height: 1.5;
}
.offer li::before {
  content: '·';
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .85rem;
}
.offer .o-cta { margin-top: auto; padding-top: 24px; }
.offer .btn { width: 100%; }
.offer .o-fine { margin-top: 12px; font-size: .85rem; color: var(--muted); }

/* compare table */
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: .96rem;
}
.compare caption { text-align: left; padding-bottom: 14px; color: var(--muted); font-size: .9rem; }
.compare th, .compare td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
}
.compare thead th {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--porcelain);
  border-bottom: 2px solid var(--ink);
}
.compare tbody th { font-weight: 500; width: 34%; color: var(--ink-2); }
.compare td { color: var(--ink-2); }
.compare .yes { color: var(--accent); font-weight: 500; }
.table-scroll { overflow-x: auto; }

/* --------------------------- journal entries ---------------------------- */
.entries { border-top: 1px solid var(--hair); }
.entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 40px;
  padding: clamp(24px, 3.4vw, 36px) 0;
  border-bottom: 1px solid var(--hair);
}
@media (min-width: 880px) { .entry { grid-template-columns: 190px 1fr; } }
.entry .e-meta {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 5px;
}
.entry h3 { font-size: 1.2rem; }
.entry p { margin-top: 10px; color: var(--muted); font-size: .98rem; line-height: 1.6; max-width: 64ch; }
.entry p a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(13, 91, 94, .38); }
.entry p a:hover { border-bottom-color: var(--accent); }

/* ------------------------------ page hero ------------------------------- */
.page-hero {
  padding-block: clamp(44px, 5vw, 72px) clamp(36px, 4vw, 56px);
  border-bottom: 1px solid var(--hair);
}
.page-hero .kicker { margin-bottom: 24px; color: var(--muted); display: block; }
.page-hero h1 { max-width: 18ch; }
.page-hero .lede { margin-top: 22px; }

/* ------------------------------- cta band ------------------------------- */
.cta-band {
  border-top: 1px solid var(--hair);
  padding-block: clamp(64px, 8vw, 108px);
}
.cta-band .cta-inner {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  align-items: end;
}
@media (min-width: 880px) { .cta-band .cta-inner { grid-template-columns: 1.4fr 1fr; } }
.cta-band h2 { max-width: 16ch; }

/* ------------------------------- panels --------------------------------- */
.panel {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--r-2);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 30px);
}
.panel-tint { background: var(--sand); border-color: #E0D5C0; box-shadow: none; }

/* ------------------------------ contact --------------------------------- */
.form { display: grid; gap: 20px; max-width: 640px; }
.field { display: grid; gap: 8px; }
.field label {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.field input, .field textarea {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--r-1);
  padding: 12px 14px;
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 91, 94, .14);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: .9rem; color: var(--muted); }

/* ------------------------------- footer --------------------------------- */
.site-footer {
  border-top: 1px solid var(--hair);
  padding-block: clamp(48px, 6vw, 72px) 32px;
  background: var(--porcelain);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 900px) { .foot-grid { grid-template-columns: 1.2fr 1fr; gap: 64px; } }
.foot-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.02rem; }
.foot-brand svg { width: 20px; height: 20px; }
.foot-left h3 { margin-top: 22px; font-size: 1.05rem; }
.foot-left p { margin-top: 8px; color: var(--muted); font-size: .94rem; max-width: 44ch; }
.nl-form { display: flex; gap: 10px; margin-top: 18px; max-width: 420px; flex-wrap: wrap; }
.nl-form input {
  flex: 1 1 200px;
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--r-1);
  padding: 11px 14px;
  font-size: .95rem;
}
.nl-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13, 91, 94, .14); }
.nl-form .btn { flex: 0 0 auto; min-height: 44px; }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.foot-links { display: grid; gap: 10px; align-content: start; }
.foot-links .cap {
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.foot-links a {
  font-size: .95rem;
  text-decoration: none;
  color: var(--ink-2);
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.foot-links a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.foot-base {
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 20px;
  border-top: 1px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--muted);
}
.foot-base .mono { font-size: .68rem; }

/* ------------------------------ 404 ------------------------------------- */
.lost .big-num {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 14vw, 9rem);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--accent);
}
.lost .glitch-note {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 26px;
}

/* ------------------------------ motion ---------------------------------- */
[data-reveal] {
  opacity: 1;
  transform: none;
}
.js [data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--t-enter) var(--ease), transform var(--t-enter) var(--ease);
  transition-delay: var(--rd, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ------------------------------ helpers --------------------------------- */
.stack-24 > * + * { margin-top: 24px; }
.stack-16 > * + * { margin-top: 16px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: clamp(32px, 4vw, 48px); }
.hr { height: 1px; background: var(--hair); border: 0; margin: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- dark-band variants of shared patterns ---- */
.band-dark .flow, .band-dark .flow-step,
.band-dark .principles, .band-dark .principle,
.band-dark .entries, .band-dark .entry,
.band-dark .rows, .band-dark .row { border-color: var(--hair-ink); }
.band-dark .flow-step p, .band-dark .principle p,
.band-dark .entry p, .band-dark .row-problem,
.band-dark .row-line .rl-v { color: #A8ADB4; }
.band-dark .fs-n, .band-dark .p-n, .band-dark .row-idx,
.band-dark .entry .e-meta, .band-dark .row-line .rl-k { color: #5FBFC0; }
.band-dark .row-out { background: #1B1E23; border-color: var(--hair-ink); color: #C9CDD2; }
.band-dark .text-link { color: #7FD3D4; border-bottom-color: rgba(127, 211, 212, .4); }
.band-dark .text-link:hover { color: #A5E3E4; border-bottom-color: #A5E3E4; }
.band-dark .lede a { color: #7FD3D4; border-bottom-color: rgba(127, 211, 212, .4); }
.band-dark .btn-solid { background: #16787C; }
.band-dark .btn-solid:hover { background: #1A888C; }
.band-dark .hr { background: var(--hair-ink); }

/* ---- quote / statement block ---- */
.statement {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.28;
  letter-spacing: -.018em;
  font-weight: 500;
  max-width: 26ch;
}
.aside-note {
  border-left: 2px solid var(--accent);
  padding-left: 18px;
  font-size: .95rem;
  color: var(--muted);
  max-width: 46ch;
}
.band-dark .aside-note { border-left-color: #5FBFC0; color: #A8ADB4; }

/* ---- faq (question rows reuse .principle) ---- */
.qa .principle h3 { font-size: 1.1rem; }

/* comparison table stacks below 640px (labels ride in from data-label) */
@media (max-width: 640px) {
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; }
  .compare caption { padding-bottom: 10px; }
  .compare tr { border-bottom: 1px solid var(--hair); padding: 16px 0; }
  .compare tr:last-child { border-bottom: 0; }
  .compare tbody th {
    width: auto; padding: 0 0 10px; font-weight: 600; color: var(--ink);
    font-size: 1rem; border-bottom: 0;
  }
  .compare td {
    padding: 5px 0; border-bottom: 0; display: flex; gap: 12px;
    align-items: baseline; font-size: .95rem;
  }
  .compare td::before {
    content: attr(data-label);
    flex: 0 0 108px;
    font-family: var(--font-mono);
    font-size: .64rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
  }
}

/* contact page specifics */
@media (max-width: 640px) {
  #contact-form .btn-row .btn { width: 100%; }
}
@media (min-width: 900px) {
  .contact-aside { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ---- narrow-mobile density fixes (fields stack, footer goes single column) ---- */
@media (max-width: 560px) {
  .fields div { display: block; padding: 12px 14px; }
  .fields .f-k { display: block; margin-bottom: 3px; }
  .fields .f-v { display: block; text-align: left; font-weight: 500; }
  .foot-cols { grid-template-columns: 1fr; gap: 28px; }
  .nl-form { flex-direction: column; align-items: stretch; max-width: none; }
  .nl-form input { flex: 1 1 auto; }
  .nl-form .btn { width: 100%; }
}

/* ================= GLASS LAYER (v5.1) =================
   Restrained glassmorphism: frosted nav, glass Ridge Plate over
   contour underlay, glass panels in the dark band, glass spec rail.
   All blur rules guarded by @supports; solid surfaces remain the
   fallback. No motion added - glass is static, reduced-motion safe. */

/* ---- contour underlay + glass card for the Ridge Plate ---- */
.plate { position: relative; }
.plate::before {
  content: '';
  position: absolute;
  inset: -7% -6% -9% -7%;
  background:
    repeating-radial-gradient(circle at 57% 43%,
      transparent 0 30px,
      rgba(20, 22, 26, .30) 30px 31.5px);
  border-radius: calc(var(--r-2) + 10px);
  opacity: .9;
  z-index: 0;
  pointer-events: none;
}
.plate::after {
  content: '';
  position: absolute;
  inset: -7% -6% -9% -7%;
  background: radial-gradient(60% 55% at 57% 43%, rgba(13, 91, 94, .22), transparent 70%);
  border-radius: calc(var(--r-2) + 10px);
  z-index: 0;
  pointer-events: none;
}
.plate-frame { position: relative; z-index: 1; }
@supports ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .plate-frame {
    background: rgba(255, 255, 255, .44);
    -webkit-backdrop-filter: saturate(160%) blur(6px);
    backdrop-filter: saturate(160%) blur(6px);
    border-color: rgba(20, 22, 26, .10);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .95),
      inset 0 0 0 1px rgba(255, 255, 255, .35),
      0 34px 70px -40px rgba(20, 22, 26, .38);
  }
}

/* ---- glass spec rail (hero facts) ---- */
.hero-spec { position: relative; }
@supports ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .hero-spec {
    background: rgba(255, 255, 255, .52);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    backdrop-filter: saturate(160%) blur(16px);
    border: 1px solid rgba(20, 22, 26, .10);
    border-top: 1px solid rgba(20, 22, 26, .10);
    border-radius: var(--r-2);
    padding: 6px 14px 4px;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .85),
      0 28px 56px -44px rgba(20, 22, 26, .45);
  }
}

/* ---- dark band: hairline field for glass to live over ---- */
.band-dark { position: relative; }
.band-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(95, 191, 192, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 191, 192, .075) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(75% 85% at 50% 55%, #000 30%, transparent 100%);
  mask-image: radial-gradient(75% 85% at 50% 55%, #000 30%, transparent 100%);
  pointer-events: none;
}
.band-dark > * { position: relative; z-index: 1; }

/* ---- glass product demonstration ---- */
@supports ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .demo {
    background: rgba(243, 241, 235, .84);
    -webkit-backdrop-filter: saturate(150%) blur(18px);
    backdrop-filter: saturate(150%) blur(18px);
    border-color: rgba(246, 244, 239, .45);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .8),
      0 44px 90px -50px rgba(0, 0, 0, .65);
  }
  .demo-bar {
    background: rgba(255, 255, 255, .42);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom-color: rgba(20, 22, 26, .10);
  }
}

/* --------------------------- user preferences ---------------------------- */
/* Two preference signals the site did not answer. Reduced motion was already
   handled; these are the other two Apple calls out alongside it. */

/* Frostier, less see-through chrome when transparency is unwelcome. */
@media (prefers-reduced-transparency: reduce) {
  .site-header,
  .site-header.scrolled {
    background: var(--porcelain);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: var(--hair);
  }
  .plate-frame {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Near-solid surfaces and a defined border when more contrast is wanted. */
@media (prefers-contrast: more) {
  .site-header,
  .site-header.scrolled {
    background: var(--porcelain);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: var(--ink);
  }
  .plate-frame { background: #fff; border-color: var(--ink); }
  .btn-line { border-color: var(--ink); }
  .btn-solid { background: var(--accent-ink); }
}
