@import url("./style-palette.css");

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11", "kern";
}

html,
body {
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

body.is-loading { opacity: 0; }
body {
  opacity: 1;
  transition:
    opacity 0.5s var(--ease),
    background-color 0.25s var(--ease),
    color 0.25s var(--ease);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
  width: 100%;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent-soft); color: var(--text); }

/* ───────── Section utility ─────────
   Sections are content-sized. All vertical rhythm comes from padding-top.
   No padding-bottom: the next section's padding-top creates the gap. */
.section-full {
  padding-top: 128px;
  padding-bottom: 0;
  text-align: center;
}

.section-full.hero {
  padding-top: calc(var(--header-h) + 8px);
  text-align: left;
}

/* Last main section gets bottom breathing room before the footer */
main > section:last-child {
  padding-bottom: 80px;
}

/* Center the inline flex eyebrow and constrain headings */
.section-full > .container > .eyebrow,
.section-full .container > .section-heading {
  margin-left: auto;
  margin-right: auto;
}

.section-full .section-heading {
  max-width: 920px;
}

/* Center body paragraphs and lists by giving them auto horizontal margins */
.section-full .container > p,
.section-full .container > .outputs-list,
.section-full .container > .stage-grid,
.section-full .container > .four-col,
.section-full .container > .failure-grid,
.section-full .container > .wordmark-grid,
.section-full .container > .cta-row {
  margin-left: auto;
  margin-right: auto;
}

/* Center the CTA row's buttons within a centered section */
.section-full:not(.hero) .cta-row {
  justify-content: center;
}

/* Card-style items keep left-aligned text for readability */
.stage-card,
.failure-item,
.pillar {
  text-align: left;
}

/* Outputs: cell-style 2-col grid, all left-aligned to match failure-modes */
.output-item { text-align: left; }
.output-title { text-align: left; }
.output-desc { text-align: left; margin-left: 0; margin-right: 0; }

/* ───────── Header ───────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: var(--header-bg-scrolled);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
}

.brand {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  transition: letter-spacing 0.4s var(--ease), color 0.25s var(--ease);
}

.brand:hover {
  letter-spacing: 0.18em;
  color: var(--text);
}

.site-nav { display: flex; align-items: center; gap: 36px; flex: 0 0 auto; }

.site-nav > a:not(.btn) {
  font-size: 15px;
  color: var(--text-2);
  position: relative;
  transition: color 0.2s var(--ease);
}

.site-nav > a:not(.btn):hover,
.site-nav > a:not(.btn):focus-visible { color: var(--text); }

.site-nav > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -6px;
  height: 1px;
  background: var(--text);
  transition: right 0.35s var(--ease-out);
}
.site-nav > a:not(.btn):hover::after,
.site-nav > a:not(.btn):focus-visible::after { right: 0; }

a:focus-visible:not(.btn) {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  contain: paint;
  transition:
    background 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.25s var(--ease),
    transform 0.25s var(--ease-out);
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.theme-toggle-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  color: currentColor;
  display: block;
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease-out);
}

.theme-toggle-icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle-icon-sun {
  opacity: 0;
  transform: rotate(-45deg) scale(0.7);
}

.theme-toggle::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.55);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease-out);
}

.theme-toggle[data-theme-mode="system"]::after {
  opacity: 1;
  transform: scale(1);
}

html[data-resolved-theme="dark"] .theme-toggle-icon-moon {
  opacity: 0;
  transform: rotate(45deg) scale(0.7);
}

html[data-resolved-theme="dark"] .theme-toggle-icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* ───────── Buttons & links ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--btn);
  color: var(--color-action-text);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
  padding: 15px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--btn);
  cursor: pointer;
  line-height: 1;
  position: relative;
  overflow: hidden;
  transition:
    background 0.25s var(--ease),
    transform 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease),
    color 0.25s var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, var(--button-sheen) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease-out);
  pointer-events: none;
}

.btn:hover {
  background: var(--btn-hover);
  transform: translateY(-1px);
  box-shadow: var(--button-shadow);
}

.btn:hover::before { transform: translateX(100%); }

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-sm { padding: 11px 18px; font-size: 14px; }

.btn-arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
  font-weight: 400;
}
.btn:hover .btn-arrow { transform: translateX(4px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  padding-bottom: 2px;
  position: relative;
}

.link-arrow::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 0.35s var(--ease-out);
}
.link-arrow:hover::after,
.link-arrow:focus-visible::after { right: 0; }
.link-arrow span {
  transition: transform 0.3s var(--ease-out);
  display: inline-block;
}
.link-arrow:hover span,
.link-arrow:focus-visible span { transform: translateX(4px); }

/* ───────── Hero ───────── */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.78fr);
  gap: 88px;
  align-items: center;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 28px;
  color: var(--text);
}

.hero-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.05em;
}

.hero-title .line-inner {
  display: block;
  will-change: transform;
}

.accent-italic {
  font-style: italic;
  color: var(--accent);
  position: relative;
  font-weight: 500;
  display: inline-block;
  transform-origin: 50% 70%;
  will-change: transform;
}

.accent-italic::after {
  content: "";
  position: absolute;
  left: 3%;
  right: 3%;
  bottom: 0.08em;
  height: 1px;
  background: var(--accent);
  opacity: var(--underline-opacity, 0.4);
  border-radius: 1px;
}

.hero-body {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 540px;
  margin: 0 0 28px;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.hero-microcopy {
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.5;
  letter-spacing: 0.005em;
}

/* ───────── Hero stages panel ───────── */
.hero-stages {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 36px;
  transition: border-color 0.3s var(--ease);
}

.panel-title {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin: 0 0 22px;
}

.hero-stages-row {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  position: relative;
  color: var(--text);
}

.hero-stages-row + .hero-stages-row {
  border-top: 1px solid var(--border-soft);
}

.hero-stages-label {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--text);
  position: relative;
  display: inline-block;
  transition: color 0.3s var(--ease);
}

.hero-stages-label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
  transition: width 0.45s var(--ease-out);
}

.hero-stages-row:hover .hero-stages-label::after { width: 56px; }

.hero-stages-meta {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.hero-stages-arrow {
  color: var(--accent);
  font-size: 15px;
  transition: transform 0.3s var(--ease-out);
  display: inline-block;
}

.hero-stages-row:hover .hero-stages-arrow,
.hero-stages-row:focus-visible .hero-stages-arrow {
  transform: translateX(4px);
}

/* ───────── Shared section components ───────── */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin: 0 0 32px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.55;
  display: inline-block;
}

.section-heading {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 40px;
  max-width: 920px;
}

.stages .section-heading { margin-bottom: 28px; }

/* ───────── Mental model (Four decisions) ───────── */
.four-col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
}

.pillar {
  padding: 44px 32px 12px 0;
  border-right: 1px solid var(--border-soft);
  position: relative;
}
.pillar:last-child { border-right: none; padding-right: 0; }
.pillar:not(:first-child) { padding-left: 32px; }

.pillar-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 34px;
  line-height: 1.1;
  margin: 0 0 18px;
  color: var(--text);
  letter-spacing: -0.008em;
  position: relative;
  transition: color 0.3s var(--ease);
}

.pillar-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
  transition: width 0.45s var(--ease-out);
}

.pillar:hover .pillar-title::after { width: 56px; }

.pillar-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.pillar-title .line-inner {
  display: block;
  will-change: transform;
}

.pillar-question {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0;
  max-width: 28ch;
}

/* ───────── Stage cards (services) ───────── */
.stage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 26px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease);
  will-change: transform;
}

.stage-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.stage-label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 14px;
}

.stage-situation {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0 0 14px;
  max-width: 42ch;
}

.stage-service {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.005em;
  color: var(--text);
  margin: 0 0 8px;
}

.stage-outcome {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0 0 18px;
  max-width: 44ch;
  flex-grow: 1;
}

.stage-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  align-self: flex-start;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.stage-card:hover .stage-cta { border-bottom-color: var(--accent); }

.stage-cta-arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
}

.stage-card:hover .stage-cta-arrow { transform: translateX(4px); }

/* ───────── Outputs (deliverable cells) ───────── */
.outputs-list {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--border);
  max-width: 1080px;
}

.output-item {
  padding: 20px 24px 20px 0;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  position: relative;
  will-change: transform;
}

.output-item:nth-child(2n) {
  border-right: none;
  padding-right: 0;
  padding-left: 24px;
}

.output-item:nth-last-child(-n+2) {
  border-bottom: none;
}

.output-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--text);
  margin: 0 0 8px;
  position: relative;
  display: inline-block;
  transition: color 0.3s var(--ease);
}

.output-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
  transition: width 0.45s var(--ease-out);
}

.output-item:hover .output-title::after { width: 56px; }

.output-desc {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0;
  max-width: 40ch;
}

/* ───────── Failure modes ───────── */
.failure-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
}

.failure-item {
  padding: 40px 32px 40px 0;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  position: relative;
}

.failure-item:nth-child(3n) {
  border-right: none;
  padding-right: 0;
}

.failure-item:not(:nth-child(3n+1)) {
  padding-left: 32px;
}

.failure-item:nth-last-child(-n+3) { border-bottom: none; }

.failure-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0 0 14px;
  color: var(--text);
  position: relative;
  display: inline-block;
}

.failure-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
  transition: width 0.45s var(--ease-out);
}

.failure-item:hover .failure-title::after { width: 56px; }

.failure-body {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
  max-width: 38ch;
}

/* ───────── Final CTA ───────── */
.final-cta-inner {
  max-width: 760px;
}

.cta-body {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-2);
  margin: 0 0 22px;
  max-width: 60ch;
}

.final-cta .cta-row { margin-top: 28px; }

/* ───────── About page ───────── */
.section-full.about-section {
  /* About fits in one viewport: 100vh - header(85) - footer(~85) */
  min-height: calc(100vh - var(--header-h) - 88px);
  padding-top: 0;
  padding-bottom: 16px;
}

.about-section .section-heading { margin-bottom: 24px; margin-top: 16px; }
.about-section .eyebrow { margin-top: 32px; margin-bottom: 24px; }

.wordmark-grid {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 14px 22px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 16px;
  margin: 0 auto 32px;
  max-width: 980px;
}

.wordmark {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(15px, 1.3vw, 18px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
}

.wordmark-sep {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  user-select: none;
}

.about-summary {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 720px;
  margin: 0 auto 14px;
}

.about-summary:last-of-type {
  margin-bottom: 28px;
}

/* ───────── Footer ───────── */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 28px 0;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  text-align: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--footer-inset-rule);
}

.copyright {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 1.4;
}

.footer-nav { display: flex; gap: 28px; font-size: 14px; align-items: center; justify-content: center; line-height: 1.4; flex-wrap: wrap; }
.footer-nav a {
  color: var(--text-2);
  transition: color 0.2s var(--ease);
  position: relative;
}
.footer-nav a:hover { color: var(--text); }

/* ───────── Reduced motion ───────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn-arrow, .link-arrow span, .pillar::before, .stage-card, .stage-cta-arrow, .theme-toggle, .theme-toggle-icon {
    transition: none !important;
  }
  body { transition: none; }
}

/* ───────── Responsive ───────── */
@media (max-width: 1100px) {
  .hero-grid { gap: 56px; }
  .hero-title { font-size: clamp(46px, 6.5vw, 72px); margin-bottom: 32px; }
  .section-heading { font-size: clamp(30px, 4vw, 48px); margin-bottom: 48px; }
}

@media (max-width: 900px) {
  .four-col { grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--border); }
  .pillar { padding: 36px 24px 24px 0; border-right: none; border-bottom: 1px solid var(--border-soft); }
  .pillar:nth-child(odd) { border-right: 1px solid var(--border-soft); }
  .pillar:nth-child(even) { padding-left: 24px; }
  .pillar:nth-last-child(-n+2) { border-bottom: none; }

  .stage-grid { grid-template-columns: 1fr; gap: 20px; }
  .outputs-list { column-gap: 32px; }

  .failure-grid { grid-template-columns: repeat(2, 1fr); }
  .failure-item { padding: 32px 24px 32px 0; }
  .failure-item:nth-child(3n) { border-right: 1px solid var(--border-soft); padding-right: 24px; }
  .failure-item:nth-child(3n+1) { padding-left: 0; }
  .failure-item:not(:nth-child(3n+1)) { padding-left: 0; }
  .failure-item:nth-child(2n) { border-right: none; padding-right: 0; padding-left: 24px; }
  .failure-item:nth-child(2n+1) { border-right: 1px solid var(--border-soft); }
  .failure-item:nth-last-child(-n+3) { border-bottom: 1px solid var(--border-soft); }
  .failure-item:nth-last-child(-n+2) { border-bottom: none; }
}

@media (max-width: 760px) {
  .section-full {
    padding-top: 96px;
  }
  .section-full.hero {
    padding-top: calc(var(--header-h) + 24px);
  }
  main > section:last-child {
    padding-bottom: 56px;
  }

  .outputs-list { grid-template-columns: 1fr; }
  .output-item,
  .output-item:nth-child(2n) {
    padding: 24px 0 !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-soft) !important;
  }
  .output-item:last-child { border-bottom: none !important; }

  .wordmark-grid { gap: 12px 18px; padding: 24px 16px; }
  .wordmark { font-size: 13px; letter-spacing: 0.16em; }
  .about-summary { font-size: 17px; }

  .header-inner { height: var(--header-h); gap: 12px; }
  .site-nav { gap: 18px; }
  .site-nav > a:not(.btn) { font-size: 13px; padding-bottom: 2px; }
  .site-nav > a:not(.btn)::after { display: none; }
  .brand { font-size: 11px; letter-spacing: 0.12em; }
  .theme-toggle { width: 38px; height: 38px; }

  .hero-grid { grid-template-columns: 1fr; gap: 40px; align-items: start; }
  .hero-title { font-size: clamp(38px, 10vw, 56px); line-height: 1.05; margin-bottom: 24px; }
  .hero-body { font-size: 17px; margin-bottom: 28px; }
  .cta-row { flex-direction: column; align-items: stretch; gap: 14px; }
  .btn { width: 100%; justify-content: center; }
  .link-arrow { justify-content: flex-start; }
  .hero-microcopy { margin-top: 24px; }

  .hero-stages { padding: 22px 22px; }
  .hero-stages-row { grid-template-columns: 1fr auto; gap: 8px; padding: 16px 0; }
  .hero-stages-row::before { display: none; }
  .hero-stages-meta { grid-column: 1 / -1; }
  .hero-stages-label { font-size: 18px; }

  .section-heading { font-size: clamp(28px, 7vw, 36px); margin-bottom: 36px; }

  .problem-item {
    font-size: 20px;
    padding: 18px 0 18px 24px;
  }
  .problem-item::before {
    width: 16px;
    --problem-rule: 16px;
  }

  .four-col { grid-template-columns: 1fr; }
  .pillar { padding: 24px 0 !important; border-right: none !important; border-bottom: 1px solid var(--border-soft) !important; }
  .pillar:last-child { border-bottom: none !important; }
  .pillar-title { font-size: 26px; }

  .stage-card { padding: 28px 24px; }
  .stage-service { font-size: 22px; }

  .failure-grid { grid-template-columns: 1fr; }
  .failure-item,
  .failure-item:nth-child(3n),
  .failure-item:nth-child(3n+1),
  .failure-item:nth-child(2n),
  .failure-item:nth-child(2n+1) {
    padding: 24px 0 !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-soft) !important;
  }
  .failure-item:last-child { border-bottom: none !important; }

  .credibility-body { font-size: 16px; margin-bottom: 28px; }

  .footer-nav { flex-wrap: wrap; gap: 20px; justify-content: center; }
}

@media (max-width: 620px) {
  .site-nav > a:not(.btn) { display: none; }
}

@media (max-width: 420px) {
  .site-nav .btn-sm { display: none; }
  .brand { max-width: calc(100vw - 96px); }
}

@media (max-width: 400px) {
  .site-nav { gap: 10px; }
  .brand { font-size: 10px; letter-spacing: 0.08em; }
  .theme-toggle { width: 36px; height: 36px; }
}
