/* Triple Ridge Labs — rugged ridge theme */

:root {
  --night: #121814;
  --pine: #1c2721;
  --pine-2: #243329;
  --moss: #3d5145;
  --sage: #8fa294;
  --granite: #6b6f68;
  --stone: #d9d3c5;
  --bone: #efe9dd;
  --paper: #f8f5ee;
  --ink: #1a1e1b;
  --ink-soft: #4a504b;
  --ochre: #d38b3b;
  --ochre-bright: #e9a352;
  --rust: #a8552a;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
  --shadow: 0 1px 2px rgba(18, 24, 20, 0.06), 0 8px 24px rgba(18, 24, 20, 0.08);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.005em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.6rem); letter-spacing: 0.01em; }

p { margin: 0 0 1em; text-wrap: pretty; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ochre); color: var(--night); padding: 8px 14px;
  border-radius: var(--radius); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--ochre-bright); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--rust);
  margin: 0 0 1.1rem;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.on-dark .eyebrow { color: var(--ochre-bright); }

.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--ink-soft); max-width: 40em; }
.on-dark .lede { color: #c9d1ca; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  border-radius: var(--radius); border: 2px solid transparent; cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ochre); color: var(--night); }
.btn-primary:hover { background: var(--ochre-bright); }
.btn-ghost { border-color: rgba(239, 233, 221, 0.4); color: var(--bone); background: transparent; }
.btn-ghost:hover { border-color: var(--bone); }
.btn-dark { background: var(--pine); color: var(--bone); }
.btn-dark:hover { background: var(--moss); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 1rem; }
.btn .arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.text-link {
  font-weight: 600; color: var(--rust); text-decoration: none;
  border-bottom: 2px solid rgba(168, 85, 42, 0.3);
  transition: border-color 0.18s ease;
}
.text-link:hover { border-color: var(--rust); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 24, 20, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(143, 162, 148, 0.15);
  color: var(--bone);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--bone); }
.brand-mark { width: 40px; height: 24px; flex: none; }
.brand-mark path { fill: none; stroke: var(--ochre); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.brand-mark circle { fill: var(--ochre); }
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem;
  letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
}
.brand-name span { color: var(--sage); font-weight: 500; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  color: #c9d1ca; padding: 6px 0; border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.site-nav a:not(.btn):hover { color: var(--bone); }
.site-nav a[aria-current="page"] { color: var(--bone); border-color: var(--ochre); }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0; border: 0; background: transparent;
  color: var(--bone); cursor: pointer; border-radius: var(--radius);
}
.nav-toggle .bar { display: block; width: 22px; height: 2px; margin: 5px auto; background: currentColor; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--night); border-bottom: 1px solid rgba(143, 162, 148, 0.15);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid rgba(143, 162, 148, 0.12); }
  .site-nav a[aria-current="page"] { border-bottom-color: rgba(143, 162, 148, 0.12); color: var(--ochre-bright); }
  .site-nav .btn { margin-top: 16px; }
  .brand-name { font-size: 1.2rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 55% at 72% 78%, rgba(211, 139, 59, 0.28), transparent 70%),
    linear-gradient(180deg, var(--night) 0%, #17211b 55%, var(--pine) 100%);
  color: var(--bone);
  padding: clamp(72px, 12vw, 140px) 0 0;
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--paper); z-index: 1; }
.hero-inner { position: relative; z-index: 2; padding-bottom: max(150px, 19vw); }
.hero h1 { max-width: 13em; color: var(--paper); }
.hero h1 em { font-style: normal; color: var(--ochre-bright); }
.hero .lede { margin-bottom: 2rem; color: #c9d1ca; }
.hero .eyebrow { color: var(--ochre-bright); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-points {
  display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 2.5rem 0 0; padding: 0; list-style: none;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sage);
}
.hero-points li { display: inline-flex; align-items: center; gap: 10px; }
.hero-points li::before { content: ""; width: 7px; height: 7px; border: 2px solid var(--ochre); transform: rotate(45deg); }

.hero-topo {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("/img/contours-light.svg") right -160px top -60px / 1100px auto no-repeat;
}
@media (max-width: 760px) { .hero-topo { background-size: 760px auto; background-position: right -300px top 0; } }

.hero-ridges { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 1; width: 100%; height: max(150px, 20.9vw); }
.hero-ridges .r-back { fill: var(--pine-2); }
.hero-ridges .r-mid { fill: var(--moss); }
.hero-ridges .r-front { fill: var(--paper); }
.hero-ridges .r-line { fill: none; stroke: var(--ochre); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: 0.9; }
.hero-ridges .r-node { fill: var(--night); stroke: var(--ochre-bright); stroke-width: 2; vector-effect: non-scaling-stroke; }

.page-hero { padding: clamp(64px, 9vw, 110px) 0 0; }
.page-hero .hero-inner { padding-bottom: max(100px, 12.5vw); }
.page-hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); max-width: 15em; }
.page-hero .hero-ridges { height: max(100px, 13.95vw); }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tight { padding: clamp(48px, 6vw, 80px) 0; }
.section-head { max-width: 46em; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { color: var(--ink-soft); font-size: 1.15rem; }

.on-dark { background: var(--pine); color: var(--bone); }
.on-dark h2, .on-dark h3 { color: var(--paper); }
.on-dark .section-head p { color: #c9d1ca; }
.bg-bone { background: var(--bone); }

.contour-bg { position: relative; overflow: hidden; }
.contour-bg > .wrap { position: relative; z-index: 1; }
.contour-bg::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.55;
  background-image: url("/img/contours.svg"); background-size: 900px auto; background-position: right -120px top -80px; background-repeat: no-repeat;
}

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--stone); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--ink-soft); }

.pain-card { border-top: 3px solid var(--rust); }
.pain-card .icon { width: 36px; height: 36px; margin-bottom: 16px; color: var(--rust); }

.icon { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Ridge pillars */
.pillars { counter-reset: pillar; }
.pillar {
  position: relative; padding: 34px 28px 30px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(143, 162, 148, 0.2); border-radius: var(--radius);
}
.pillar-num {
  display: block; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.14em;
  color: var(--ochre-bright); margin-bottom: 18px;
}
.pillar-peak { width: 64px; height: 30px; margin-bottom: 18px; }
.pillar-peak path { fill: none; stroke: var(--sage); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pillar-peak path.hi { stroke: var(--ochre); stroke-width: 2.6; }
.pillar h3 { font-size: 2rem; text-transform: uppercase; letter-spacing: 0.04em; }
.pillar p { color: #c9d1ca; margin-bottom: 0; }

/* Service tiles */
.service-tile { display: flex; flex-direction: column; text-decoration: none; transition: transform 0.18s ease, border-color 0.18s ease; }
.service-tile:hover { transform: translateY(-3px); border-color: var(--ochre); }
.service-tile .icon { width: 40px; height: 40px; color: var(--moss); margin-bottom: 18px; }
.service-tile .more { margin-top: auto; padding-top: 14px; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rust); }

/* Comparison table */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--stone); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.compare th, .compare td { text-align: left; padding: 18px 22px; vertical-align: top; border-bottom: 1px solid var(--stone); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare thead th { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: 0.05em; text-transform: uppercase; background: var(--bone); }
.compare thead th.us { background: var(--pine); color: var(--paper); }
.compare tbody th { font-weight: 600; width: 26%; }
.compare td { color: var(--ink-soft); width: 37%; }
.compare td.us { color: var(--ink); background: rgba(211, 139, 59, 0.07); font-weight: 500; }
@media (max-width: 720px) {
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare thead { display: none; }
  .compare tr { border-bottom: 1px solid var(--stone); padding: 6px 0; }
  .compare tr:last-child { border-bottom: 0; }
  .compare tbody th { border: 0; padding: 14px 18px 4px; width: 100%; font-size: 1.05rem; }
  .compare td { width: 100%; }
  .compare td { border: 0; padding: 4px 18px 4px 18px; }
  .compare td::before { display: block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--granite); margin-bottom: 2px; }
  .compare td.them::before { content: "Subscription software"; }
  .compare td.us::before { content: "Triple Ridge build"; color: var(--rust); }
  .compare td.us { margin: 4px 0 10px; padding-top: 8px; padding-bottom: 10px; }
}

/* CTA band */
.cta-band {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--night), var(--pine) 70%);
  color: var(--bone); border-radius: 10px; padding: clamp(36px, 6vw, 64px);
  display: grid; grid-template-columns: 1.4fr auto; gap: 28px; align-items: center;
}
.cta-band h2 { color: var(--paper); margin-bottom: 0.3em; }
.cta-band p { color: #c9d1ca; margin: 0; max-width: 36em; }
.cta-band .cta-ridge { position: absolute; right: -40px; bottom: -10px; width: 420px; height: 140px; opacity: 0.35; pointer-events: none; }
.cta-band .cta-ridge path { fill: none; stroke: var(--ochre); stroke-width: 2; }
.cta-band > *:not(.cta-ridge) { position: relative; z-index: 1; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- Services page ---------- */
.service-block {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 64px);
  padding: clamp(40px, 6vw, 64px) 0; border-top: 1px solid var(--stone);
}
.service-block:first-child { border-top: 0; padding-top: 0; }
.service-block .tag { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; color: var(--rust); text-transform: uppercase; display: block; margin-bottom: 10px; }
.service-block h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.service-block p { color: var(--ink-soft); }
@media (max-width: 820px) { .service-block { grid-template-columns: 1fr; } }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.35em; width: 16px; height: 10px;
  border-left: 2.5px solid var(--ochre); border-bottom: 2.5px solid var(--ochre); transform: rotate(-45deg) translate(2px, -1px);
}
.on-dark .checklist li { color: #d7ddd8; }

.deploy-grid .card { background: var(--pine-2); border-color: rgba(143, 162, 148, 0.2); box-shadow: none; }
.deploy-grid .card h3 { color: var(--paper); }
.deploy-grid .card p { color: #c9d1ca; }
.deploy-grid .icon { width: 38px; height: 38px; color: var(--ochre-bright); margin-bottom: 16px; }

/* Process */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; position: relative; }
.process::before { content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 2px; background: repeating-linear-gradient(90deg, var(--stone) 0 8px, transparent 8px 14px); }
.process li { position: relative; padding: 0 18px 0 0; }
.process .step-node {
  position: relative; z-index: 1; display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 18px;
  background: var(--paper); border: 2px solid var(--ochre); border-radius: 50%;
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600; color: var(--rust);
}
.process h3 { font-size: 1.5rem; text-transform: uppercase; letter-spacing: 0.04em; }
.process p { color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 960px) {
  .process { grid-template-columns: 1fr; gap: 6px; }
  .process::before { left: 23px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--stone) 0 8px, transparent 8px 14px); }
  .process li { display: grid; grid-template-columns: 48px 1fr; column-gap: 20px; padding: 0 0 18px; }
  .process .step-node { grid-row: span 2; margin: 0; }
  .process h3 { margin-top: 10px; }
}

/* FAQ */
.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--stone); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; letter-spacing: 0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.4rem; color: var(--rust); transition: transform 0.2s ease; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); padding-bottom: 18px; margin: 0; max-width: 46em; }

/* ---------- About page ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 80px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.prose p { color: var(--ink-soft); font-size: 1.1rem; }
.prose p strong { color: var(--ink); }

.name-diagram { background: var(--pine); border-radius: 10px; padding: 32px 28px 26px; color: var(--bone); }
.name-diagram svg { width: 100%; height: auto; margin-bottom: 8px; }
.name-diagram .nd-line { fill: none; stroke: var(--ochre); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.name-diagram .nd-fill { fill: rgba(211, 139, 59, 0.1); }
.name-diagram .nd-node { fill: var(--pine); stroke: var(--ochre-bright); stroke-width: 3; }
.name-diagram .nd-label { fill: var(--paper); font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: 2px; text-anchor: middle; }
.name-diagram .nd-sub { fill: var(--sage); font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; text-anchor: middle; }
.name-diagram p { color: #c9d1ca; margin: 0; font-size: 0.98rem; }

.principle { display: grid; grid-template-columns: 52px 1fr; gap: 6px 18px; padding: 26px 0; border-top: 1px solid var(--stone); }
.principle:first-child { border-top: 0; padding-top: 0; }
.principle .num { font-family: var(--font-mono); font-size: 0.85rem; color: var(--rust); padding-top: 6px; }
.principle h3 { margin-bottom: 0.25em; }
.principle p { grid-column: 2; color: var(--ink-soft); margin: 0; }

.fit-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fit-list li { background: #fff; border: 1px solid var(--stone); border-left: 3px solid var(--moss); border-radius: var(--radius); padding: 18px 20px; font-weight: 500; }
@media (max-width: 640px) { .fit-list { grid-template-columns: 1fr; } }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.form-card { background: #fff; border: 1px solid var(--stone); border-radius: 10px; padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-weight: 600; font-size: 0.98rem; }
.field label .opt { font-weight: 400; color: var(--granite); font-size: 0.88rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--stone); border-radius: var(--radius);
  padding: 12px 14px; min-height: 48px; transition: border-color 0.15s ease, background-color 0.15s ease;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ochre); background: #fff; box-shadow: 0 0 0 3px rgba(211, 139, 59, 0.2); }
.field .hint { font-size: 0.85rem; color: var(--granite); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin: 4px 0 18px; padding: 12px 16px; border-radius: var(--radius); font-weight: 500; display: none; }
.form-status.error { display: block; background: #fbeae2; color: #7a3416; border: 1px solid #ecc1ab; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form-actions .small { font-size: 0.88rem; color: var(--granite); margin: 0; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

.form-success { text-align: left; padding: 8px 0; }
.form-success .check { width: 56px; height: 56px; color: var(--moss); margin-bottom: 16px; }

.next-steps { list-style: none; margin: 0; padding: 0; counter-reset: ns; }
.next-steps li { counter-increment: ns; position: relative; padding: 0 0 26px 52px; }
.next-steps li::before {
  content: "0" counter(ns); position: absolute; left: 0; top: 0; width: 36px; height: 36px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; color: var(--rust);
  border: 2px solid var(--ochre); border-radius: 50%;
}
.next-steps li::after { content: ""; position: absolute; left: 17px; top: 40px; bottom: 4px; width: 2px; background: var(--stone); }
.next-steps li:last-child::after { display: none; }
.next-steps h3 { font-size: 1.3rem; margin-bottom: 0.2em; padding-top: 4px; }
.next-steps p { color: var(--ink-soft); margin: 0; font-size: 1rem; }

.aside-note { margin-top: 10px; padding: 20px 22px; background: var(--bone); border-radius: var(--radius); border-left: 3px solid var(--ochre); }
.aside-note p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Simple pages (thanks / 404) ---------- */
.simple-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 100px 0; }
.simple-page .lede { margin: 0 auto 2rem; }

/* ---------- Savings calculator ---------- */
.calc-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
@media (max-width: 900px) { .calc-grid { grid-template-columns: 1fr; } }
.calc-form { position: sticky; top: 92px; }
@media (max-width: 900px) { .calc-form { position: static; } }

.seg { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.seg legend { font-weight: 600; font-size: 0.98rem; margin-bottom: 8px; padding: 0; }
.seg-options { display: grid; grid-template-columns: 1fr 1fr; background: var(--paper); border: 1.5px solid var(--stone); border-radius: var(--radius); padding: 4px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 10px 8px; border-radius: 4px; font-weight: 600; color: var(--ink-soft); transition: background-color 0.15s ease, color 0.15s ease; }
.seg input:checked + span { background: var(--pine); color: var(--paper); }
.seg input:focus-visible + span { outline: 2px solid var(--ochre-bright); outline-offset: 2px; }

.input-affix { display: flex; align-items: stretch; border: 1.5px solid var(--stone); border-radius: var(--radius); background: var(--paper); overflow: hidden; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.input-affix:focus-within { border-color: var(--ochre); background: #fff; box-shadow: 0 0 0 3px rgba(211, 139, 59, 0.2); }
.input-affix span { display: grid; place-items: center; padding: 0 12px; color: var(--granite); font-weight: 600; background: var(--bone); }
.field .input-affix input { border: 0; border-radius: 0; box-shadow: none; background: transparent; min-width: 0; }
.field .input-affix input:focus { box-shadow: none; background: transparent; }

.field input.range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: var(--stone); padding: 0; min-height: 0; margin: 14px 0 6px; border: 0; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ochre); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.3); cursor: pointer; }
.range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--ochre); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.3); cursor: pointer; }
.field .range:focus { box-shadow: none; }
.field label output { color: var(--rust); }

.calc-results { background: #fff; border: 1px solid var(--stone); border-radius: 10px; padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }
.hero-number { font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 7vw, 4.6rem); line-height: 1; margin: 0 0 8px; color: var(--ink); font-variant-numeric: tabular-nums; }
.hero-caption { color: var(--ink-soft); font-size: 1.1rem; margin-bottom: 24px; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 28px; }
.stat-row div { background: var(--paper); border-radius: var(--radius); padding: 14px 16px; }
.stat-row dt { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--granite); margin-bottom: 4px; }
.stat-row dd { margin: 0; font-weight: 600; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .stat-row { gap: 8px; } .stat-row div { padding: 12px 10px; } .stat-row dd { font-size: 1rem; } }
@media (max-width: 340px) { .stat-row { grid-template-columns: 1fr; } }

.calc-chart { margin: 0 0 12px; position: relative; }
.calc-chart figcaption { font-weight: 600; margin-bottom: 8px; }
.chart-wrap svg { width: 100%; height: auto; overflow: visible; }
.chart-wrap .grid { stroke: var(--stone); stroke-width: 1; stroke-dasharray: 2 4; }
.chart-wrap .axis { stroke: var(--granite); stroke-width: 1; }
.chart-wrap .tick { font-family: var(--font-mono); font-size: 11px; fill: var(--granite); }
.chart-wrap .value { font-family: var(--font-body); font-weight: 600; font-size: 13px; fill: var(--ink); }
.chart-wrap .bar { fill: var(--rust); opacity: 0.55; transition: opacity 0.15s ease; }
.chart-wrap .bar.last, .chart-wrap .bar.hover { opacity: 1; }
.chart-wrap .hit { fill: transparent; cursor: default; outline: none; }
.chart-tip { position: absolute; z-index: 2; pointer-events: none; background: var(--night); color: var(--bone); border-radius: var(--radius); padding: 8px 12px; font-size: 0.85rem; line-height: 1.45; box-shadow: var(--shadow); white-space: nowrap; display: flex; flex-direction: column; }
.chart-tip[hidden] { display: none; }
.chart-tip strong { color: var(--ochre-bright); }

.table-view { margin: 0 0 24px; font-size: 0.95rem; }
.table-view summary { cursor: pointer; color: var(--rust); font-weight: 600; padding: 4px 0; }
.table-view table { width: 100%; border-collapse: collapse; margin-top: 10px; font-variant-numeric: tabular-nums; }
.table-view th, .table-view td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--stone); }
.table-view th { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--granite); font-weight: 500; }

.budget-note { background: var(--pine); color: var(--bone); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.budget-note h3 { color: var(--paper); font-size: 1.6rem; }
.budget-note p { color: #c9d1ca; }
.fine-print { font-size: 0.85rem; color: var(--granite); margin: 0; }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; }
.legal .effective { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--granite); }
.legal h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin-top: 1.6em; }
.legal h3 { font-size: 1.3rem; margin-top: 1.2em; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 0.6em; }
.legal strong { color: var(--ink); }

.cf-turnstile { margin: 0 0 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: #aeb8b0; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(143, 162, 148, 0.15); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.footer-grid p { font-size: 0.98rem; max-width: 26em; margin-top: 14px; }
.footer-grid h4 { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; color: #d7ddd8; }
.footer-grid a:hover { color: var(--ochre-bright); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; font-size: 0.88rem; }
.footer-bottom .mono { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--granite); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
