/* ==========================================================================
   RafterSignal — Design Tokens
   ========================================================================== */

:root,
[data-theme='light'] {
  /* Surfaces — warm oatmeal, like sanded lumber */
  --color-bg: #f6f1e8;
  --color-surface: #fbf8f1;
  --color-surface-2: #ffffff;
  --color-surface-offset: #efe6d3;
  --color-surface-offset-2: #e6dac0;
  --color-divider: #e1d5b8;
  --color-border: #d7c8a5;

  /* Text — charcoal ink */
  --color-text: #241f18;
  --color-text-muted: #6c6151;
  --color-text-faint: #a89b80;
  --color-text-inverse: #fbf8f1;

  /* Primary accent — signal flare / terracotta */
  --color-primary: #b0492a;
  --color-primary-hover: #8d3a20;
  --color-primary-active: #6f2d18;
  --color-primary-highlight: #ecd2c1;

  /* Success — verified / trusted (forest) */
  --color-success: #3d6b46;
  --color-success-hover: #2c5034;
  --color-success-active: #1f3a26;
  --color-success-highlight: #d7e2d4;

  /* Warning */
  --color-warning: #a1791e;
  --color-warning-hover: #7d5f16;
  --color-warning-active: #59440f;
  --color-warning-highlight: #e6dcc0;

  /* Error / negative-feedback */
  --color-error: #9c3a3a;
  --color-error-hover: #7a2c2c;
  --color-error-active: #571f1f;
  --color-error-highlight: #e3cfcb;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px oklch(0.25 0.03 40 / 0.08);
  --shadow-md: 0 6px 16px oklch(0.25 0.03 40 / 0.1);
  --shadow-lg: 0 16px 40px oklch(0.25 0.03 40 / 0.16);

  --content-narrow: 640px;
  --content-default: 980px;
  --content-wide: 1240px;
  --content-full: 100%;

  --font-display: 'Cabinet Grotesk', 'Georgia', sans-serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;
}

[data-theme='dark'] {
  --color-bg: #1a1712;
  --color-surface: #211d16;
  --color-surface-2: #27221a;
  --color-surface-offset: #2c261c;
  --color-surface-offset-2: #342c20;
  --color-divider: #3a3122;
  --color-border: #453a28;

  --color-text: #ece4d4;
  --color-text-muted: #ad9f85;
  --color-text-faint: #766c58;
  --color-text-inverse: #241f18;

  --color-primary: #dd8158;
  --color-primary-hover: #e59b78;
  --color-primary-active: #ecb499;
  --color-primary-highlight: #4a3324;

  --color-success: #7bab84;
  --color-success-hover: #93bd9b;
  --color-success-active: #aecfb3;
  --color-success-highlight: #2c3d2d;

  --color-warning: #cca24f;
  --color-warning-highlight: #3d331d;
  --color-error: #cb7373;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 16px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #1a1712;
    --color-surface: #211d16;
    --color-surface-2: #27221a;
    --color-surface-offset: #2c261c;
    --color-surface-offset-2: #342c20;
    --color-divider: #3a3122;
    --color-border: #453a28;
    --color-text: #ece4d4;
    --color-text-muted: #ad9f85;
    --color-text-faint: #766c58;
    --color-text-inverse: #241f18;
    --color-primary: #dd8158;
    --color-primary-hover: #e59b78;
    --color-primary-active: #ecb499;
    --color-primary-highlight: #4a3324;
    --color-success: #7bab84;
    --color-success-highlight: #2c3d2d;
    --color-warning: #cca24f;
    --color-warning-highlight: #3d331d;
    --color-error: #cb7373;
  }
}

:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.wrap {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 4vw, var(--space-10));
}
.wrap--narrow {
  max-width: var(--content-default);
}

section {
  position: relative;
}

.section-pad {
  padding-block: clamp(var(--space-16), 9vw, var(--space-32));
}
.section-pad--tight {
  padding-block: clamp(var(--space-12), 6vw, var(--space-20));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  flex-shrink: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid oklch(from var(--color-border) l c h / 0.6);
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.header--hidden {
  transform: translateY(-100%);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
}
.brand svg {
  width: 30px;
  height: 30px;
  color: var(--color-primary);
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav-links {
  display: flex;
  gap: var(--space-6);
}
.nav-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
}
.nav-links a:hover {
  color: var(--color-text);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.mobile-nav {
  border-top: 1px solid var(--color-divider);
  background: var(--color-bg);
}
.mobile-nav a {
  font-size: var(--text-base);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  min-height: 44px;
  line-height: 1;
}
.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
}
.btn--primary:active {
  background: var(--color-primary-active);
}
.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn--ghost:hover {
  background: var(--color-surface-offset);
  border-color: var(--color-text-faint);
}
.btn--block {
  width: 100%;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding-block: clamp(var(--space-20), 10vw, var(--space-32)) clamp(var(--space-16), 8vw, var(--space-24));
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  opacity: 0.42;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, var(--color-bg) 0%, var(--color-bg) 28%, transparent 62%, var(--color-bg) 96%),
    linear-gradient(to bottom, transparent 55%, var(--color-bg) 100%);
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(var(--space-10), 6vw, var(--space-16));
  align-items: center;
}
@media (max-width: 900px) {
  .hero-bg img {
    opacity: 0.28;
    object-position: center 30%;
  }
  .hero-bg::after {
    background:
      linear-gradient(to bottom, transparent 30%, var(--color-bg) 78%);
  }
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-block: var(--space-5) var(--space-5);
  color: var(--color-text);
}
.hero-copy h1 em {
  font-style: normal;
  color: var(--color-primary);
}
.hero-copy p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-bottom: var(--space-8);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}
.hero-cta-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
}
.hero-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}
.hero-badge svg {
  width: 14px;
  height: 14px;
  color: var(--color-success);
  flex-shrink: 0;
}

.hero-art {
  position: relative;
}
.signal-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: clamp(var(--space-6), 3vw, var(--space-8));
}
.signal-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}
.signal-card-head span:first-child {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 650;
}
.pulse-dot {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-success);
  font-weight: 600;
}
.pulse-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--color-success);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 oklch(from var(--color-success) l c h / 0.4);
  }
  50% {
    opacity: 0.7;
    box-shadow: 0 0 0 4px oklch(from var(--color-success) l c h / 0);
  }
}
.metric-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-block: var(--space-3);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-sm);
}
.metric-row:first-of-type {
  border-top: none;
}
.metric-row span:first-child {
  color: var(--color-text-muted);
}
.metric-row strong {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.metric-row strong.up {
  color: var(--color-success);
}
.signal-card-foot {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 550;
}

/* ==========================================================================
   Signal loop
   ========================================================================== */

.loop-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
  gap: var(--space-10);
  align-items: end;
  margin-bottom: clamp(var(--space-10), 5vw, var(--space-16));
}
.loop-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-top: var(--space-3);
}
.loop-header p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

.loop-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
}
.loop-step {
  padding: clamp(var(--space-6), 3vw, var(--space-8));
  border-left: 1px solid var(--color-divider);
}
.loop-step:first-child {
  border-left: none;
}
.loop-step-num {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  font-weight: 650;
  margin-bottom: var(--space-4);
}
.loop-step h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 650;
  margin-bottom: var(--space-3);
}
.loop-step p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ==========================================================================
   Services — asymmetric narrative layout
   ========================================================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-5);
}
.service-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 3vw, var(--space-8));
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.service-card--lead {
  grid-column: span 4;
  background: var(--color-surface-2);
}
.service-card--sub {
  grid-column: span 2;
}
.service-card--half {
  grid-column: span 3;
}
.service-card--full {
  grid-column: span 6;
}
.service-card--row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.service-card--row p {
  margin: 0;
  max-width: 46ch;
}
.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.service-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.service-icon svg {
  width: 17px;
  height: 17px;
}
.service-num {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 650;
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 650;
}
.service-card--lead h3 {
  font-size: var(--text-xl);
}
.service-card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ==========================================================================
   Pricing
   ========================================================================== */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  align-items: stretch;
}
.price-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-8), 4vw, var(--space-10));
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
}
.price-card--featured {
  background: var(--color-surface-2);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}
.price-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}
.price-card-top h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 650;
}
.price-tag {
  font-size: var(--text-xs);
  font-weight: 650;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-primary-highlight);
  color: var(--color-primary-hover);
}
.price-amount {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}
.price-amount .num {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 650;
  letter-spacing: -0.02em;
}
.price-amount .per {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.price-note {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  margin-bottom: var(--space-6);
}
.price-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  flex: 1;
}
.price-features li {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
  align-items: flex-start;
}
.price-features svg {
  width: 16px;
  height: 16px;
  color: var(--color-success);
  flex-shrink: 0;
  margin-top: 3px;
}
.pricing-foot {
  text-align: center;
  margin-top: var(--space-8);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.pricing-foot strong {
  color: var(--color-text);
}
.pricing-foot--muted {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  opacity: 0.8;
}

/* ==========================================================================
   Report example
   ========================================================================== */

.report-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}
.report-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.report-card-head {
  padding: var(--space-6);
  border-bottom: 1px solid var(--color-divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.report-card-head span:first-child {
  font-family: var(--font-display);
  font-weight: 650;
}
.report-card-head span:last-child {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.report-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.report-stat {
  padding: var(--space-6);
  border-right: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}
.report-stat:last-child {
  border-right: none;
}
.report-stat span {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.report-stat strong {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 650;
}
.report-quote {
  padding: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: italic;
  border-top: 1px solid var(--color-divider);
}

.report-copy .eyebrow {
  margin-bottom: var(--space-3);
}
.report-copy h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-5);
}
.report-copy p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* ==========================================================================
   Case studies
   ========================================================================== */

.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-10);
}
.case-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.case-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.case-tag {
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-warning);
  background: var(--color-warning-highlight);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.65rem;
  white-space: nowrap;
}
.case-trade {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  white-space: nowrap;
}
.case-trade svg {
  width: 15px;
  height: 15px;
  color: var(--color-primary);
  flex-shrink: 0;
}
.case-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
  line-height: 1.3;
}
.case-copy {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.case-copy strong {
  color: var(--color-text);
}
.case-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
}
.case-stat span {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-1);
}
.case-stat strong {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 650;
}
.case-stat strong.up {
  color: var(--color-success);
}

/* ==========================================================================
   Integrity section
   ========================================================================== */

.integrity {
  background: var(--color-surface-offset);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}
.integrity-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(var(--space-10), 5vw, var(--space-16));
  align-items: center;
}
.integrity-copy h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-5);
}
.integrity-copy p {
  color: var(--color-text-muted);
}
.integrity-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  align-content: start;
  align-items: start;
}
.integrity-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}
.integrity-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-success);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ==========================================================================
   Contact / lead form
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(var(--space-10), 5vw, var(--space-16));
  align-items: start;
}
.contact-copy h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-5);
}
.contact-copy p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}
.contact-fact {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding-block: var(--space-4);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-sm);
}
.contact-fact:first-of-type {
  border-top: none;
}
.contact-fact svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-fact strong {
  display: block;
  margin-bottom: var(--space-1);
}
.contact-fact span {
  color: var(--color-text-muted);
}

.lead-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.field {
  margin-bottom: var(--space-5);
}
.field label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-size: var(--text-sm);
  min-height: 44px;
}
.field textarea {
  min-height: 96px;
  resize: vertical;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}
.form-status {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  display: none;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
}
.form-status.is-success {
  display: flex;
  background: var(--color-success-highlight);
  color: var(--color-success-active);
}
.form-status.is-error {
  display: flex;
  background: var(--color-error-highlight);
  color: var(--color-error-active);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  border-top: 1px solid var(--color-divider);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-10);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.footer-brand svg {
  width: 22px;
  height: 22px;
  color: var(--color-primary);
}
.footer-brand span {
  font-family: var(--font-display);
  font-weight: 650;
}
.footer-links {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--color-text);
}
.footer-meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-legal {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-bottom: var(--space-8);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-legal a {
  color: var(--color-text-faint);
  text-decoration: none;
}
.footer-legal a:hover {
  color: var(--color-text-muted);
}

/* ==========================================================================
   Legal pages
   ========================================================================== */

.legal-hero {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24)) var(--space-8);
}
.legal-hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-block: var(--space-4) var(--space-2);
}
.legal-updated {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
}
.legal-content {
  padding-bottom: clamp(var(--space-16), 8vw, var(--space-24));
}
.legal-content .wrap--narrow {
  max-width: 68ch;
}
.legal-content h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 650;
  margin-block: var(--space-10) var(--space-3);
}
.legal-content h2:first-of-type {
  margin-top: var(--space-4);
}
.legal-content p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.legal-content ul {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.legal-content li {
  list-style: disc;
}
.legal-content a {
  color: var(--color-primary);
}
.legal-content strong {
  color: var(--color-text);
}
.legal-note {
  margin-top: var(--space-10);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
  font-size: var(--text-sm);
}
.legal-note p {
  margin-bottom: 0;
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .hero-grid,
  .loop-header,
  .report-panel,
  .integrity-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .loop-header {
    align-items: start;
  }
  .loop-steps {
    grid-template-columns: 1fr;
  }
  .loop-step {
    border-left: none;
    border-top: 1px solid var(--color-divider);
  }
  .loop-step:first-child {
    border-top: none;
  }
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
  .service-card--lead,
  .service-card--half,
  .service-card--full {
    grid-column: span 2;
  }
  .service-card--row {
    flex-direction: column;
    align-items: flex-start;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .cases-grid {
    grid-template-columns: 1fr;
  }
  .report-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .integrity-list {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .header-actions .btn--primary {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
}

@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  .service-card--lead,
  .service-card--half,
  .service-card--full {
    grid-column: span 1;
  }
  .report-stats {
    grid-template-columns: 1fr;
  }
  .report-stat {
    border-right: none;
  }
  .hero-badges {
    flex-direction: column;
    gap: var(--space-2);
  }
  .case-card-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-5) var(--space-6);
}
.faq-item + .faq-item {
  margin-top: 0;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  font-family: var(--font-display);
  font-weight: 650;
  font-size: var(--text-lg);
  color: var(--color-text);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}
.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}
.faq-item p {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   MOBILE STICKY CTA
   ========================================================================== */

.mobile-sticky-cta {
  display: none;
}

@media (max-width: 640px) {
  .mobile-sticky-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: var(--space-4);
    right: var(--space-4);
    bottom: var(--space-4);
    z-index: 40;
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-full);
    background: var(--color-primary);
    color: var(--color-text-inverse);
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow-md);
  }
  .footer-inner {
    padding-bottom: calc(var(--space-10) + 4.5rem);
  }
}
