/* =============================================================
   OpenReminders — Portal Styles
   Aesthetic: Construction Editorial
   Warm paper + deep ink + hazard orange.
   Fraunces serif display, Inter body, JetBrains Mono labels.
   Anti-defaults: no dark mode, no glass, no purple gradients.
   ============================================================= */

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

:root {
  /* Ink — core + expanded tonal scale */
  --ink:         #0B1F3A;
  --ink-92:      #122A46;
  --ink-80:      #1A2F4C;
  --ink-60:      #40526C;
  --ink-40:      #7A8699;
  --ink-20:      #B4BCC9;
  --ink-08:      rgba(11,31,58,0.08);
  --ink-04:      rgba(11,31,58,0.04);

  /* Paper — core + warm/cool variants */
  --paper-110:    #F9F5EA;   /* slightly warmer */
  --paper:        #F5F1E6;
  --paper-raised: #FBF8F0;
  --paper-sunken: #EBE5D4;
  --paper-70:     #E4DCC4;   /* creamier, for recessed surfaces */

  /* Rules & lines */
  --rule:        #D6CDB4;
  --rule-soft:   #E3DCC5;
  --rule-strong: var(--ink);

  /* Accents */
  --hazard:       #E8521F;
  --hazard-deep:  #BE3F12;
  --hazard-tint:  #FBE3D6;

  --steel:        #2B5080;
  --steel-tint:   #D9E1EF;

  --sage:         #4F7355;
  --sage-tint:    #DCE7DD;

  --rust:         #A13517;
  --rust-tint:    #F1D5CB;

  --ochre:        #B5831E;
  --ochre-tint:   #F1E4BE;

  /* Typography */
  --font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Shape */
  --radius-xs:  3px;
  --radius-sm:  4px;
  --radius:     6px;
  --radius-lg:  10px;
  --radius-xl:  20px;
  --radius-2xl: 28px;
  --rule-w:     1px;
  --rule-w-thick: 2px;

  /* Spacing scale (4-based) */
  --s-0:  0;
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-8:  32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;
  --s-32: 128px;

  /* Elevation scale — warm-tinted ink, layered */
  --shadow-xs:    0 1px 2px rgba(11,31,58,0.04);
  --shadow-sm:    0 1px 3px rgba(11,31,58,0.06), 0 1px 2px rgba(11,31,58,0.04);
  --shadow-md:    0 4px 16px rgba(11,31,58,0.08), 0 1px 3px rgba(11,31,58,0.04);
  --shadow-lg:    0 16px 48px rgba(11,31,58,0.10), 0 4px 12px rgba(11,31,58,0.06);
  --shadow-xl:    0 32px 96px rgba(11,31,58,0.12), 0 8px 24px rgba(11,31,58,0.08);
  --shadow-focus: 0 0 0 3px var(--hazard-tint);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,0.6);

  /* Motion */
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;
  --ease-standard: cubic-bezier(.2,.7,.2,1);
  --ease-spring:   cubic-bezier(.34,1.56,.64,1);
  --ease-out-expo: cubic-bezier(.16,1,.3,1);
  /* Back-compat aliases */
  --ease: var(--ease-standard);
  --dur:  var(--dur-base);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background:
    /* blueprint grid, extremely faint */
    linear-gradient(to right, rgba(11,31,58,0.035) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(to bottom, rgba(11,31,58,0.035) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv01", "cv11", "tnum";
}

/* Decorative orbs from old design — fully neutralized */
.ambient, .orb { display: none !important; }

/* --- Dark theme tokens ("Midnight Paper") --- */
[data-theme="dark"] {
  --ink:         #E6E2D5;
  --ink-92:      #DBD6C8;
  --ink-80:      #C7C0AE;
  --ink-60:      #A8A293;
  --ink-40:      #908A7E;
  --ink-20:      #454038;
  --ink-08:      rgba(230,226,213,0.08);
  --ink-04:      rgba(230,226,213,0.04);

  --paper:        #11161C;
  --paper-110:    #0B1017;
  --paper-raised: #17202A;
  --paper-sunken: #0D131A;
  --paper-70:     #242D39;

  --rule:        #2A3541;
  --rule-soft:   #20293A;
  --rule-strong: #E6E2D5;

  --hazard:      #F3693A;
  --hazard-deep: #D95924;
  --hazard-tint: rgba(243,105,58,0.18);

  --steel:       #7BA1D9;
  --steel-tint:  rgba(123,161,217,0.18);
  --sage:        #7AA081;
  --sage-tint:   rgba(122,160,129,0.16);
  --rust:        #D96B4C;
  --rust-tint:   rgba(217,107,76,0.18);
  --ochre:       #D5A850;
  --ochre-tint:  rgba(213,168,80,0.18);

  --shadow-xs:    0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.25);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.40), 0 1px 3px rgba(0,0,0,0.30);
  --shadow-lg:    0 16px 48px rgba(0,0,0,0.50), 0 4px 12px rgba(0,0,0,0.30);
  --shadow-xl:    0 32px 96px rgba(0,0,0,0.60), 0 8px 24px rgba(0,0,0,0.40);
  --shadow-focus: 0 0 0 3px rgba(243,105,58,0.35);

  color-scheme: dark;
}
[data-theme="dark"] body {
  background:
    linear-gradient(to right, rgba(230,226,213,0.03) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(to bottom, rgba(230,226,213,0.03) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--paper);
}
[data-theme="dark"] .nav {
  background: rgba(17,22,28,0.85);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
}
[data-theme="dark"] .trust-strip { background: var(--paper-110); }
[data-theme="dark"] .trust-logo { filter: grayscale(1) brightness(1.3); }

/* Dark-mode AA contrast fixes for orange-tinted surfaces.
   Why: white on lighter dark-mode hazard (#F3693A) is 3.05:1 — fails AA.
   Hazard text on hazard-tinted bg is also too low. Switch to navy text on solid
   orange CTAs and cream text on hazard-tinted chips. */
[data-theme="dark"] .hero-cta-primary,
[data-theme="dark"] .pricing-popular-badge,
[data-theme="dark"] .cta-banner .hero-cta-primary { color: #0B1F3A; }
[data-theme="dark"] .pricing-toggle-save,
[data-theme="dark"] .testimonial-avatar,
[data-theme="dark"] .pricing-matrix-table thead th.is-popular { color: var(--ink); }
[data-theme="dark"] .pricing-matrix-table td.is-popular { background: rgba(243,105,58,0.10); }
[data-theme="dark"] .pricing-card-popular .pricing-tier { color: var(--hazard); }

/* --- Theme toggle (portal nav) --- */
.theme-toggle {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  color: var(--ink-60);
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard);
}
.theme-toggle:hover {
  background: var(--paper-raised);
  color: var(--ink);
  border-color: var(--ink-40);
}
.theme-toggle:focus-visible {
  outline: none;
  border-color: var(--hazard);
  box-shadow: var(--shadow-focus);
}
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: inline-flex; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* --- Screen reader only --- */
.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 --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* --- Nav --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: var(--rule-w) solid var(--rule);
  padding: 0 24px;
  transition: box-shadow var(--dur) var(--ease);
}
.nav-scrolled {
  box-shadow: 0 1px 0 var(--rule);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.logo-icon { display: flex; }
.logo-accent {
  font-style: italic;
  font-weight: 500;
  color: var(--hazard);
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  color: var(--ink-60);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav-links a:hover {
  color: var(--ink);
  border-bottom-color: var(--hazard);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
  white-space: nowrap;
  border: var(--rule-w) solid var(--ink);
}
.nav-cta:hover { background: var(--hazard); border-color: var(--hazard); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: transparent;
  border: var(--rule-w) solid var(--rule-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
}
.nav-toggle-bar {
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: 80px 24px 64px;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-content {
  max-width: 840px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: var(--rule-w) solid var(--ink);
  background: var(--paper-raised);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 32px;
  border-radius: 0;
}
.hero-badge::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--hazard);
  border-radius: 50%;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  font-weight: 420;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 30, "wght" 420;
  text-wrap: balance;
}
/* Old class: used in HTML - restyle to an underline-highlight */
.gradient-text {
  font-style: italic;
  font-weight: 500;
  color: var(--hazard-deep);
  background: linear-gradient(transparent 68%, var(--hazard-tint) 68%);
  padding: 0 4px;
  display: inline-block;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink-60);
  max-width: 620px;
  margin-bottom: 40px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform var(--dur-base) var(--ease-standard),
              background var(--dur-base) var(--ease-standard),
              border-color var(--dur-base) var(--ease-standard),
              box-shadow  var(--dur-base) var(--ease-standard),
              color       var(--dur-base) var(--ease-standard);
  cursor: pointer;
  white-space: nowrap;
}
.hero-cta-primary {
  background: var(--hazard);
  color: #fff;
  border-color: var(--hazard);
  box-shadow: var(--shadow-md);
}
.hero-cta-primary:hover {
  background: var(--hazard-deep);
  border-color: var(--hazard-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.hero-cta-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.hero-cta-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.hero-cta-secondary:hover {
  background: var(--ink);
  color: var(--paper);
}

.hero-trust {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-40);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --- Section shared --- */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 24px;
  position: relative;
}
.section-container-narrow {
  max-width: 800px;
}

.section-header {
  margin-bottom: 56px;
  max-width: 720px;
  padding-top: 12px;
  border-top: var(--rule-w-thick) solid var(--ink);
  position: relative;
}
.section-header::before {
  content: attr(data-num);
  display: block;
  position: absolute;
  top: -22px;
  left: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink-60);
  background: var(--paper);
  padding-right: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 420;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 12px;
  margin-top: 16px;
  font-variation-settings: "opsz" 72, "SOFT" 30;
  text-wrap: balance;
}
.section-desc {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-60);
  max-width: 600px;
}

/* --- Problem --- */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0;
  border-top: var(--rule-w) solid var(--rule);
  border-left: var(--rule-w) solid var(--rule);
}
.pain-card {
  padding: 36px 32px;
  border-right: var(--rule-w) solid var(--rule);
  border-bottom: var(--rule-w) solid var(--rule);
  background: var(--paper);
  transition: background var(--dur) var(--ease);
}
.pain-card:hover {
  background: var(--paper-raised);
}
.pain-icon {
  color: var(--rust);
  margin-bottom: 20px;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--rust-tint);
  border-radius: 50%;
}
.pain-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.pain-card p {
  color: var(--ink-60);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* --- How it works --- */
.steps-flow {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: var(--rule-w-thick) solid var(--ink);
  padding-top: 32px;
  position: relative;
}
.step {
  padding: 0 20px 0 0;
  position: relative;
}
.step + .step-connector + .step {
  border-left: var(--rule-w) solid var(--rule);
  padding-left: 20px;
}
.step-connector { display: none; }

.step-number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--hazard);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  display: block;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
}
.step-number::before {
  content: "STEP ";
}
.step-icon {
  color: var(--ink);
  margin-bottom: 12px;
}
.step-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.step-desc {
  color: var(--ink-60);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- Features --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0;
  border-top: var(--rule-w) solid var(--rule);
  border-left: var(--rule-w) solid var(--rule);
}
.feature-card {
  padding: 36px 32px;
  background: var(--paper);
  border-right: var(--rule-w) solid var(--rule);
  border-bottom: var(--rule-w) solid var(--rule);
  transition: background var(--dur-base) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard),
              transform  var(--dur-base) var(--ease-out-expo);
  position: relative;
  z-index: 1;
}
.feature-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 3px;
  background: var(--hazard);
  transition: width var(--dur-slow) var(--ease-out-expo);
}
.feature-card:hover {
  background: var(--paper-raised);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  z-index: 2;
}
.feature-card:hover::before { width: 100%; }

.feature-icon {
  color: var(--hazard);
  margin-bottom: 20px;
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--hazard-tint);
  border-radius: var(--radius-sm);
}
.feature-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.feature-desc {
  color: var(--ink-60);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* --- Pricing --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border-top: var(--rule-w-thick) solid var(--ink);
  border-left: var(--rule-w) solid var(--rule);
  align-items: stretch;
}
.pricing-card {
  position: relative;
  padding: 36px 28px 32px;
  background: var(--paper);
  border-right: var(--rule-w) solid var(--rule);
  border-bottom: var(--rule-w) solid var(--rule);
  display: flex;
  flex-direction: column;
  transition: background var(--dur) var(--ease);
}
.pricing-card:last-child {
  border-right: none;
}
.pricing-card:hover { background: var(--paper-raised); }

.pricing-card-popular {
  background: var(--ink);
  color: var(--paper);
}
.pricing-card-popular:hover { background: var(--ink-80); }

.pricing-popular-badge {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-100%);
  padding: 6px 14px;
  background: var(--hazard);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 0;
}

.pricing-tier {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-60);
  margin-bottom: 18px;
}
.pricing-card-popular .pricing-tier { color: var(--paper-sunken); }

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
  padding-bottom: 18px;
  border-bottom: var(--rule-w) solid var(--rule);
}
.pricing-card-popular .pricing-price {
  border-bottom-color: rgba(255,255,255,0.15);
}
.pricing-amount {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 420;
  letter-spacing: -0.035em;
  line-height: 1;
  color: inherit;
  font-variant-numeric: tabular-nums;
  font-variation-settings: "opsz" 72;
}
.pricing-period {
  color: var(--ink-40);
  font-size: 0.95rem;
  font-family: var(--font-mono);
}
.pricing-card-popular .pricing-period { color: var(--paper-sunken); }

.pricing-tagline {
  margin-top: 18px;
  color: var(--ink-60);
  font-size: 0.9rem;
  line-height: 1.5;
  min-height: 2.5em;
}
.pricing-card-popular .pricing-tagline { color: var(--paper-sunken); }

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0 28px;
  flex: 1;
}
.pricing-features li {
  font-size: 0.9rem;
  color: var(--ink);
  padding-left: 22px;
  position: relative;
  line-height: 1.5;
}
.pricing-card-popular .pricing-features li { color: var(--paper); }

.pricing-features li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 12px; height: 2px;
  background: var(--hazard);
}
.pricing-card-popular .pricing-features li::before { background: var(--hazard); }

.pricing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: var(--rule-w-thick) solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  margin-top: auto;
  cursor: pointer;
}
.pricing-cta:hover {
  background: var(--ink);
  color: var(--paper);
}
.pricing-card-popular .pricing-cta {
  border-color: var(--paper);
  color: var(--paper);
}
.pricing-card-popular .pricing-cta:hover {
  background: var(--paper);
  color: var(--ink);
}
.pricing-cta-accent {
  background: var(--hazard);
  border-color: var(--hazard);
  color: #fff;
}
.pricing-cta-accent:hover {
  background: var(--hazard-deep);
  border-color: var(--hazard-deep);
  color: #fff;
}
.pricing-card-popular .pricing-cta-accent {
  background: var(--hazard);
  border-color: var(--hazard);
  color: #fff;
}
.pricing-card-popular .pricing-cta-accent:hover {
  background: var(--hazard-deep);
  border-color: var(--hazard-deep);
}

/* --- FAQ --- */
.faq-list {
  display: flex;
  flex-direction: column;
  border-top: var(--rule-w) solid var(--rule);
}
.faq-item {
  border-bottom: var(--rule-w) solid var(--rule);
  background: transparent;
  transition: background var(--dur) var(--ease);
}
.faq-item:hover,
.faq-item[open] { background: var(--paper-raised); }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 4px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
  gap: 16px;
  color: var(--ink);
  transition: color var(--dur) var(--ease);
}
.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--hazard);
  line-height: 1;
  transition: transform .25s var(--ease);
  flex-shrink: 0;
  display: block;
  width: 22px; text-align: center;
  border: none;
  transform: none;
}
details[open] .faq-question::after {
  content: "–";
  transform: none;
}
details[open] .faq-question { color: var(--hazard-deep); }

.faq-answer {
  padding: 0 4px 24px;
}
.faq-answer p {
  color: var(--ink-60);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- CTA Banner --- */
.cta-banner {
  padding: 0 24px 120px;
}
.cta-banner-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  background: var(--ink);
  color: var(--paper);
  padding: 72px 40px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  /* Per-theme muted-label color (can't use --paper at low alpha in dark
     because dark --paper is near-black and the banner bg flips to cream). */
  --banner-muted: rgba(245, 241, 230, 0.72);
  --banner-rule:  rgba(245, 241, 230, 0.18);
}
[data-theme="dark"] .cta-banner-inner {
  --banner-muted: rgba(11, 31, 58, 0.78);
  --banner-rule:  rgba(11, 31, 58, 0.22);
}
.cta-banner-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px) 0 0 / 32px 32px;
  pointer-events: none;
}
.cta-banner-inner > * { position: relative; }

.cta-banner-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 420;
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  color: var(--paper);
  font-variation-settings: "opsz" 72, "SOFT" 30;
  text-wrap: balance;
}
.cta-banner-sub {
  color: var(--banner-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
}
.cta-banner .hero-cta-primary {
  /* Hazard glow on dark navy — subtle paper halo for depth */
  box-shadow: 0 0 0 1px rgba(245,241,230,0.08), 0 10px 24px rgba(232,82,31,0.35);
}
.cta-banner .hero-cta-primary:hover {
  box-shadow: 0 0 0 1px rgba(245,241,230,0.12), 0 14px 32px rgba(232,82,31,0.45);
}

/* --- Footer --- */
.footer,
.footer-full {
  position: relative;
  background: var(--paper);
  border-top: var(--rule-w-thick) solid var(--ink);
  padding: 56px 24px 28px;
}
.footer-full-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.footer-brand-col { max-width: 320px; }
.footer-logo {
  margin-bottom: 18px;
  display: inline-flex;
}
.footer-tagline {
  color: var(--ink-60);
  font-size: 0.9rem;
  line-height: 1.6;
}
.footer-nav {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}
.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-nav-heading {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-40);
  margin-bottom: 6px;
}
.footer-nav-col a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
  align-self: flex-start;
}
.footer-nav-col a:hover {
  color: var(--hazard-deep);
  border-bottom-color: var(--hazard);
}

.footer-bottom {
  border-top: var(--rule-w) solid var(--rule);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy {
  color: var(--ink-40);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* --- Animate on scroll --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out-expo),
              transform 0.7s var(--ease-out-expo);
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Focus --- */
a:focus-visible,
button:focus-visible,
.hero-cta:focus-visible,
.nav-cta:focus-visible,
.pricing-cta:focus-visible,
.faq-question:focus-visible,
.nav-links a:focus-visible {
  outline: var(--rule-w-thick) solid var(--hazard);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* --- Active/touch feedback --- */
.hero-cta:active,
.nav-cta:active,
.pricing-cta:active {
  transform: scale(0.98);
}

/* --- Responsive --- */
@media (max-width: 980px) {
  .steps-flow {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 0;
  }
  .step + .step-connector + .step {
    border-left: none;
    padding-left: 0;
  }
  .step:nth-child(3), .step:nth-child(5) {
    border-top: var(--rule-w) solid var(--rule);
    padding-top: 32px;
  }
}

@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-inner { height: 60px; gap: 12px; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: 60px;
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: var(--rule-w) solid var(--rule);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    padding: 16px 24px;
    font-size: 1rem;
    border-bottom: var(--rule-w) solid var(--rule-soft);
    border-radius: 0;
  }
  .nav-links a:last-child { border-bottom: none; }

  .hero { padding: 56px 20px 48px; }
  .hero-title { font-size: clamp(2.2rem, 8vw, 3.6rem); }
  .hero-subtitle { font-size: 1.05rem; }

  .section-container { padding: 64px 20px; }
  .section-header { margin-bottom: 36px; }

  .pain-grid,
  .features-grid { grid-template-columns: 1fr; }

  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .pricing-card { border-right: var(--rule-w) solid var(--rule); }
  .pricing-popular-badge {
    position: static;
    transform: none;
    display: inline-block;
    margin-bottom: 16px;
  }

  .steps-flow { grid-template-columns: 1fr; }
  .step { border-left: none !important; padding: 0 !important; }
  .step + .step-connector + .step {
    border-top: var(--rule-w) solid var(--rule);
    padding-top: 28px !important;
  }

  .cta-banner-inner { padding: 48px 24px; }

  .footer-top { flex-direction: column; gap: 32px; }
  .footer-nav { gap: 32px; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-cta { justify-content: center; }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-cta:hover,
  .pricing-cta:hover,
  .nav-cta:hover,
  .feature-card:hover {
    transform: none !important;
  }
}

/* =============================================================
   Phase 2 — Premium SaaS sections
   ============================================================= */

/* --- Hero two-column --- */
.hero { max-width: 1280px; padding: 96px 24px 80px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 64px;
  }
}
.hero-content { max-width: 640px; }

.hero-mockup {
  position: relative;
  width: 100%;
  max-width: 640px;
  justify-self: end;
  isolation: isolate;
}
.hero-mockup-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 60% at 70% 35%, rgba(232,82,31,0.18), transparent 70%),
    radial-gradient(50% 50% at 25% 70%, rgba(43,80,128,0.14), transparent 70%);
  filter: blur(24px);
  z-index: -1;
  pointer-events: none;
}
.hero-mockup-frame {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  transform: perspective(1400px) rotateY(-2deg) rotateX(1.5deg);
  transition: transform var(--dur-slow) var(--ease-out-expo);
}
.hero-mockup:hover .hero-mockup-frame {
  transform: perspective(1400px) rotateY(-0.5deg) rotateX(0.5deg) translateY(-4px);
}

/* Hero trust strip */
.hero-trust-strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
  padding: 0;
}
.hero-trust-strip li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-60);
  letter-spacing: 0.02em;
}
.hero-trust-strip svg { color: var(--sage); }

/* --- Trust logos bar --- */
.trust-strip {
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  background: var(--paper-110);
}
.trust-strip-inner {
  padding: 40px 24px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.trust-strip-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-40);
  margin: 0;
}
.trust-logos {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 40px;
  align-items: center;
  justify-items: center;
  width: 100%;
  max-width: 1100px;
  opacity: 0.7;
}
@media (min-width: 640px) { .trust-logos { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .trust-logos { grid-template-columns: repeat(6, 1fr); } }
.trust-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-60);
  filter: grayscale(1);
  transition: filter var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard);
}
.trust-logo:hover { color: var(--ink); filter: grayscale(0.5); }
.trust-logo svg { height: 26px; width: auto; max-width: 100%; }

/* --- Pricing toggle --- */
.pricing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--paper-sunken);
  border: 1px solid var(--rule);
  border-radius: 100px;
  margin: 0 auto 40px;
  display: flex;
  width: fit-content;
}
.pricing-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--ink-60);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 100px;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard);
}
.pricing-toggle-btn:hover { color: var(--ink); }
.pricing-toggle-btn.is-active {
  background: var(--paper-raised);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}
.pricing-toggle-save {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--hazard-deep);
  background: var(--hazard-tint);
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 500;
}

/* --- Pricing card refinements (popular tier) --- */
.pricing-card-popular {
  background: var(--paper-raised);
  color: var(--ink);
  border-top: 2px solid var(--hazard);
  box-shadow: var(--shadow-md), inset 0 0 0 1px var(--hazard-tint);
  position: relative;
  z-index: 1;
}
.pricing-card-popular:hover {
  background: var(--paper-raised);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--hazard-tint);
  transform: translateY(-2px);
}
.pricing-card-popular .pricing-tier { color: var(--hazard-deep); }
.pricing-card-popular .pricing-period,
.pricing-card-popular .pricing-tagline { color: var(--ink-60); }
.pricing-card-popular .pricing-features li { color: var(--ink); }
.pricing-card-popular .pricing-price { border-bottom-color: var(--rule); }
.pricing-card-popular .pricing-cta {
  border-color: var(--paper);
  color: var(--paper);
}
.pricing-card-popular .pricing-cta:hover {
  background: var(--paper);
  color: var(--ink);
}

/* --- Pricing matrix --- */
.pricing-matrix {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}
.pricing-matrix-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.pricing-matrix-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
}
.pricing-matrix-scroll:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}
.pricing-matrix-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.pricing-matrix-table th,
.pricing-matrix-table td {
  padding: 14px 16px;
  text-align: center;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink);
}
.pricing-matrix-table th[scope="row"] {
  text-align: left;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
}
.pricing-matrix-table thead th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-60);
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}
.pricing-matrix-table thead th.is-popular {
  color: var(--hazard-deep);
  background: var(--hazard-tint);
  border-bottom-color: var(--hazard);
}
.pricing-matrix-table td.is-popular {
  background: rgba(251,227,214,0.35);
  font-weight: 500;
}
.pricing-matrix-table td.yes { color: var(--sage); font-weight: 600; }
.pricing-matrix-table td.no  { color: var(--ink-40); }
.pricing-matrix-table tr:last-child th,
.pricing-matrix-table tr:last-child td { border-bottom: none; }
@media (max-width: 720px) {
  .pricing-matrix-table { font-size: 0.82rem; }
  .pricing-matrix-table th,
  .pricing-matrix-table td { padding: 10px 8px; }
}

/* --- Testimonials --- */
.testimonials { position: relative; z-index: 1; }
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.testimonial {
  position: relative;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-out-expo);
  margin: 0;
}
.testimonial:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.testimonial-mark {
  color: var(--hazard-tint);
  margin-bottom: 14px;
}
.testimonial blockquote {
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 20px;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 36;
}
.testimonial blockquote p { margin: 0; }
.testimonial figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
}
.testimonial-avatar {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--hazard-tint);
  color: var(--hazard-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.testimonial-name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}
.testimonial-role {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-60);
}

/* --- CTA banner stats --- */
.cta-banner-stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
  padding: 0 0 32px;
  border-bottom: 1px solid var(--banner-rule);
}
.cta-banner-stats li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}
.cta-banner-stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 420;
  letter-spacing: -0.02em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
  font-variation-settings: "opsz" 48;
}
.cta-banner-stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--banner-muted);
}

/* --- Footer upgrade --- */
.footer-newsletter {
  display: flex;
  gap: 6px;
  margin-top: 20px;
  max-width: 320px;
}
.footer-newsletter input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  min-height: 38px;
}
.footer-newsletter input:focus {
  outline: none;
  border-color: var(--hazard);
  box-shadow: var(--shadow-focus);
}
.footer-newsletter button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-standard);
  white-space: nowrap;
}
.footer-newsletter button:hover { background: var(--hazard); border-color: var(--hazard); }
.footer-newsletter-note {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--ink-40);
  margin-top: 10px;
}
.footer-socials {
  display: inline-flex;
  gap: 14px;
  align-items: center;
}
.footer-socials a {
  color: var(--ink-60);
  transition: color var(--dur-base) var(--ease-standard);
  display: inline-flex;
}
.footer-socials a:hover { color: var(--hazard-deep); }
@media (min-width: 768px) {
  .footer-nav { gap: 64px; }
}
@media (max-width: 640px) {
  .cta-banner-stats { grid-template-columns: 1fr; gap: 16px; }
}

/* --- Reduced motion supplement --- */
@media (prefers-reduced-motion: reduce) {
  .hero-mockup-frame { transform: none; }
  .testimonial:hover { transform: none; }
  .pricing-card-popular:hover { transform: none; }
}

