/* ============================================
   Krux Website Styles
   Design System v1.0 -- 2026-04-11
   Brand: Ink (#1A1A2E) / Paper (#F5F4F1) / Signal (#4F8EF7)
   Typography: Inter (Google Fonts)
   ============================================ */

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

/* Size-adjusted fallback to minimize CLS during Inter font swap.
   Metrics derived from Font Metric Override tool targeting Inter.
   Reduces layout shift when Inter loads and replaces the system font. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('-apple-system'), local('BlinkMacSystemFont'), local('Segoe UI');
  ascent-override: 90%;
  descent-override: 22.43%;
  line-gap-override: 0%;
  size-adjust: 107%;
}

/* --- Design System Tokens --- */
:root {
  /* Colors: Light Mode */
  --color-primary: #1A1A2E;
  --color-secondary: #2D3561;
  --color-accent: #2C6FDB;
  --color-accent-hover: #2461C4;
  --color-accent-subtle: rgba(44, 111, 219, 0.08);
  --color-accent-muted: rgba(44, 111, 219, 0.15);
  --color-surface: #F5F4F1;
  --color-white: #FFFFFF;
  --color-text: #1C1C1E;
  --color-text-muted: #44444A;
  --color-text-light: #555558;
  --color-border: #E0DFDC;
  --color-card-bg: #FFFFFF;
  --color-success: #34C759;
  --color-error: #FF3B30;
  --color-warning: #FF9500;

  /* Colors: Dark surfaces (intentionally dark sections) */
  --color-text-on-dark: #FFFFFF;
  --color-text-on-dark-muted: rgba(255, 255, 255, 0.92);
  --color-text-on-dark-subtle: rgba(255, 255, 255, 0.80);
  --color-border-on-dark: rgba(255, 255, 255, 0.06);
  --color-surface-on-dark: rgba(255, 255, 255, 0.06);

  /* Typography */
  --font-family: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', SFMono-Regular, ui-monospace, 'Cascadia Code', 'Fira Code', monospace;

  --font-size-xs: 0.75rem;
  --font-size-sm: clamp(0.8125rem, 0.78rem + 0.16vw, 0.875rem);
  --font-size-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --font-size-md: clamp(1.0625rem, 1.01rem + 0.26vw, 1.1875rem);
  --font-size-lg: clamp(1.125rem, 1.07rem + 0.27vw, 1.25rem);
  --font-size-xl: clamp(1.375rem, 1.22rem + 0.78vw, 1.75rem);
  --font-size-2xl: clamp(1.75rem, 1.5rem + 1.25vw, 2.25rem);
  --font-size-3xl: clamp(2rem, 1.75rem + 1.25vw, 2.5rem);
  --font-size-4xl: clamp(2.5rem, 2rem + 2.5vw, 3.5rem);

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.08;
  --line-height-heading: 1.2;
  --line-height-body: 1.7;
  --line-height-compact: 1.4;
  --line-height-meta: 1.5;

  --letter-spacing-tight: -0.03em;
  --letter-spacing-heading: -0.02em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.02em;
  --letter-spacing-eyebrow: 0.1em;

  /* Spacing */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 40px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 80px;
  --space-5xl: 120px;
  --space-6xl: 140px;
  --space-7xl: 160px;

  --section-padding: 120px 24px;
  --section-padding-mobile: 80px 20px;

  /* Layout */
  --max-width: 1140px;
  --content-width: 760px;
  --hero-max-width: 1300px;
  --pricing-max-width: 720px;
  --steps-max-width: 960px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 50%;
  --radius-device: 40px;
  --radius-screen: 30px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(26, 26, 46, 0.04);
  --shadow-md: 0 4px 16px rgba(26, 26, 46, 0.08);
  --shadow-lg: 0 8px 32px rgba(26, 26, 46, 0.08);
  --shadow-xl: 0 16px 48px rgba(26, 26, 46, 0.12);
  --shadow-2xl: 0 40px 80px rgba(26, 26, 46, 0.25), 0 16px 32px rgba(26, 26, 46, 0.15);
  --shadow-accent: 0 4px 16px rgba(79, 142, 247, 0.35);
  --shadow-dark: 0 4px 16px rgba(26, 26, 46, 0.3);
  --shadow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --shadow-outline-panel: 0 -8px 24px rgba(0, 0, 0, 0.4);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-reveal: 300ms ease-out;
  --transition-slow: 500ms ease-out;

  --ease-default: ease;
  --ease-out: ease-out;
  --ease-in-out: ease-in-out;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Motion */
  --stagger-step: 80ms;
  --stagger-pricing: 120ms;

  /* Z-Index Scale */
  --z-base: 1;
  --z-dropdown: 10;
  --z-sticky: 50;
  --z-nav: 100;
  --z-modal: 150;
  --z-skip-link: 200;

  /* Semantic tokens: text/icon colors decoupled from --color-primary background uses */
  --color-heading: var(--color-primary);
  --color-icon-fg: var(--color-primary);
  --color-interactive-fg: var(--color-primary);
  --color-label-accent: #2461C4;
  --color-icon-bg: rgba(26, 26, 46, 0.06);
  --color-ghost-hover-bg: rgba(26, 26, 46, 0.04);
  --color-nav-bg: rgba(245, 244, 241, 0.85);
  --color-nav-border: rgba(26, 26, 46, 0.06);
  --shadow-nav-scrolled: 0 1px 12px rgba(26, 26, 46, 0.08);
  --color-input-border: #767679;
  --color-success-text: #1A7A34;
  --color-btn-secondary-bg: var(--color-primary);
  --color-btn-secondary-hover: var(--color-secondary);
}

/* --- Dark Mode --- */
@media (prefers-color-scheme: dark) {
  :root {
    --color-accent: #5A9AFF;
    --color-accent-hover: #4A8AEF;
    --color-accent-subtle: rgba(90, 154, 255, 0.15);
    --color-accent-muted: rgba(90, 154, 255, 0.22);
    --color-surface: #161622;
    --color-white: #1E1E2A;
    --color-text: #F0F0F2;
    --color-text-muted: #A0A0A6;
    --color-text-light: #8E8E96;
    --color-border: #2E2E3A;
    --color-card-bg: #1E1E2A;
    --color-success: #30D158;
    --color-error: #FF453A;
    --color-warning: #FFD60A;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.4);
    --shadow-2xl: 0 40px 80px rgba(0, 0, 0, 0.5), 0 16px 32px rgba(0, 0, 0, 0.35);
    --shadow-accent: 0 4px 16px rgba(90, 154, 255, 0.3);
    --shadow-dark: 0 4px 16px rgba(0, 0, 0, 0.4);

    /* Semantic token dark overrides */
    --color-heading: #F0F0F2;
    --color-icon-fg: #B0B0B8;
    --color-interactive-fg: #F0F0F2;
    --color-label-accent: #5A9AFF;
    --color-icon-bg: rgba(255, 255, 255, 0.06);
    --color-ghost-hover-bg: rgba(255, 255, 255, 0.06);
    --color-nav-bg: rgba(22, 22, 34, 0.85);
    --color-nav-border: rgba(255, 255, 255, 0.06);
    --shadow-nav-scrolled: 0 1px 12px rgba(0, 0, 0, 0.3);
    --color-input-border: rgba(255, 255, 255, 0.12);
    --color-success-text: #30D158;
    --color-btn-secondary-bg: rgba(90, 154, 255, 0.12);
    --color-btn-secondary-hover: rgba(90, 154, 255, 0.22);
  }
}

/* --- Base Styles --- */
html {
  -webkit-text-size-adjust: 100%;
}

/* Smooth scroll only for users who have not requested reduced motion */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background-color: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-accent-hover);
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-accent-subtle);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--color-accent);
  letter-spacing: var(--letter-spacing-wide);
}

h1, h2, h3, h4 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-heading);
  letter-spacing: var(--letter-spacing-heading);
  color: var(--color-heading);
}

h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-sm);
}

h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-xs);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Skip Navigation --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  padding: 12px 24px;
  background: var(--color-accent);
  color: white;
  border-radius: var(--radius-md);
  z-index: var(--z-skip-link);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-sm);
  color: white;
}

/* --- Utility --- */
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3xl);
}

/* Scroll margin for sticky nav — applies to sections and focusable descendants */
section[id] {
  scroll-margin-top: 80px;
}

section[id] a,
section[id] button,
section[id] input,
section[id] summary,
section[id] details {
  scroll-margin-top: 80px;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  border-radius: var(--radius-lg);
  padding: 14px 32px;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
  text-align: center;
  line-height: 1;
}

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

.btn-primary {
  background-color: var(--color-accent);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-secondary {
  background-color: var(--color-btn-secondary-bg);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--color-btn-secondary-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-dark);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1.5px solid var(--color-border);
}

.btn-ghost:hover {
  color: var(--color-interactive-fg);
  border-color: var(--color-interactive-fg);
  background: var(--color-ghost-hover-bg);
}

.btn-large {
  font-size: var(--font-size-md);
  padding: 18px 40px;
}

.btn-hero {
  font-size: var(--font-size-md);
  padding: 20px 48px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  background: var(--color-nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-nav-border);
  transition: box-shadow var(--transition-base);
}

.nav--scrolled {
  box-shadow: var(--shadow-nav-scrolled);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-interactive-fg);
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: contain;
}

.logo-text {
  font-weight: var(--font-weight-bold);
  font-size: 1.25rem;
  letter-spacing: var(--letter-spacing-heading);
  color: var(--color-interactive-fg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-base);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--color-interactive-fg);
}

.nav-cta {
  background: var(--color-accent) !important;
  color: white !important;
  padding: 10px 24px !important;
  border-radius: var(--radius-md) !important;
  transition: all var(--transition-base) !important;
}

.nav-cta:hover {
  background: var(--color-accent-hover) !important;
  color: white !important;
  transform: translateY(-1px);
}

/* Mobile-only elements (hidden on desktop) */
.nav-cta-mobile {
  display: none;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-hamburger-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-icon-fg);
  border-radius: 1px;
  transition: all var(--transition-base);
  transform-origin: center;
}

/* Hamburger X transform */
.nav-mobile-open .nav-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-mobile-open .nav-hamburger span:nth-child(2) {
  opacity: 0;
}

.nav-mobile-open .nav-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu panel */
#nav-menu {
  display: none;
}

/* --- Hero --- */
.hero {
  padding: 160px 24px 120px;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  max-width: var(--hero-max-width);
  margin: 0 auto;
  min-height: 90vh;
}

.hero-content {
  flex: 1;
  max-width: 560px;
}

.hero-eyebrow {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-eyebrow);
  color: var(--color-label-accent); /* Light: #2461C4 (4.87:1 on #F5F4F1). Dark: #5A9AFF (5.8:1 on #161622) */
  margin-bottom: 20px;
}

.hero h1 {
  font-size: var(--font-size-4xl);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  margin-bottom: var(--space-md);
  color: var(--color-heading);
}

.hero-subtitle {
  font-size: var(--font-size-md);
  line-height: 1.65;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  max-width: 500px;
}

.hero-subtitle code {
  font-size: 0.875em;
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.hero-proof {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  font-weight: var(--font-weight-medium);
}

/* --- Hero: Pre-animation states ---
   Elements are visible by default for LCP measurement.
   JS adds .will-animate to <html> synchronously (inline script in <head>)
   which re-hides them so the entrance animation can run.
   Without JS, elements remain visible. */
html.will-animate .hero-eyebrow,
html.will-animate .hero h1,
html.will-animate .hero-subtitle,
html.will-animate .hero-actions,
html.will-animate .hero-proof {
  opacity: 0;
}

html.will-animate .hero-visual {
  opacity: 0;
  transform: translateY(24px);
}

.hero-visual {
  flex-shrink: 0;
}

/* will-change applied only during the animation window */
body.is-loaded .hero-visual {
  will-change: transform, opacity;
}

/* --- Hero Animations (triggered by .is-loaded on body) --- */
@keyframes krux-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes krux-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}


body.is-loaded .hero-eyebrow {
  animation: krux-fade-up 400ms ease-out 100ms both;
}

body.is-loaded .hero h1 {
  animation: krux-fade-up 400ms ease-out 200ms both;
}

body.is-loaded .hero-subtitle {
  animation: krux-fade-up 400ms ease-out 320ms both;
}

body.is-loaded .hero-actions {
  animation: krux-fade-up 400ms ease-out 440ms both;
}

body.is-loaded .hero-proof {
  animation: krux-fade-in 300ms ease 580ms both;
}

body.is-loaded .hero-visual {
  animation: krux-fade-up 500ms ease-out 300ms both;
}


/* --- Scroll-triggered reveal animations --- */
.anim-fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}

.anim-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.anim-stagger-child {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}

.anim-stagger-child.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Hero Visual: CSS iPhone Mockup --- */
.device-iphone {
  width: 300px;
  background: var(--color-primary);
  border-radius: var(--radius-device);
  padding: 12px;
  box-shadow: var(--shadow-2xl), var(--shadow-inner);
}

.device-screen {
  background: #000000;
  border-radius: var(--radius-screen);
  overflow: hidden;
}

/* Hero Screenshot (replaces CSS mockup) */
.hero-screenshot {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Email Capture Section --- */
.email-capture {
  padding: var(--space-2xl) 24px var(--space-4xl);
  background: var(--color-surface);
}

.email-capture .section-inner {
  max-width: 520px;
  text-align: center;
}

.email-capture h2 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-xs);
}

.email-capture-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.email-form {
  display: flex;
  gap: var(--space-xs);
}

.email-input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  background: var(--color-card-bg);
  border: 1.5px solid var(--color-input-border); /* Light: #767679 (4.54:1). Dark: rgba(255,255,255,0.12) */
  border-radius: var(--radius-lg);
  color: var(--color-text);
  min-height: 48px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.email-input::placeholder {
  color: var(--color-text-light);
}

.email-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(44, 111, 219, 0.15);
}

.email-input:invalid:not(:placeholder-shown):not(:focus) {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.15);
}

.email-privacy {
  font-size: var(--font-size-xs);
  color: var(--color-text-light);
  margin-top: var(--space-xs);
}

.email-success {
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-md);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-success-text); /* Light: #1A7A34 (5.73:1). Dark: #30D158 (~9.2:1) */
}

.email-success svg {
  flex-shrink: 0;
}

.email-form-wrapper.is-success .email-form {
  display: none;
}

.email-form-wrapper.is-success .email-privacy {
  display: none;
}

.email-form-wrapper.is-success .email-success {
  display: flex;
}

/* --- Problem Section --- */
.problem {
  padding: var(--section-padding);
  background: var(--color-white);
}

.problem h2 {
  max-width: var(--content-width);
}

.problem-lead {
  font-size: 1.25rem;
  line-height: var(--line-height-body);
  color: var(--color-text);
  max-width: var(--content-width);
  margin-bottom: var(--space-sm);
  font-weight: var(--font-weight-medium);
}

.problem-agitate {
  font-size: var(--font-size-md);
  line-height: 1.75;
  color: var(--color-text-muted);
  max-width: var(--content-width);
  margin-bottom: var(--space-3xl);
}

.pain-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.pain-point {
  padding: var(--space-lg);
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
}

.pain-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-icon-bg);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  color: var(--color-icon-fg);
}

.pain-point h3 {
  font-size: 1.125rem;
  color: var(--color-heading);
  margin-bottom: var(--space-xs);
}

.pain-point p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* --- How It Works --- */
.how-it-works {
  padding: var(--section-padding);
  background: var(--color-primary);
  color: white;
}

.how-it-works h2 {
  color: white;
  text-align: center;
  margin-bottom: 72px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xl);
  max-width: var(--steps-max-width);
  margin: 0 auto;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--color-accent-muted);
  color: var(--color-accent);
  font-weight: var(--font-weight-bold);
  font-size: 1.375rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
  border: 2px solid rgba(44, 111, 219, 0.3);
}

.step h3 {
  color: white;
  font-size: var(--font-size-md);
  margin-bottom: 12px;
}

.step p {
  font-size: 0.9375rem;
  color: var(--color-text-on-dark-muted);
  line-height: 1.65;
}

.step code {
  background: rgba(44, 111, 219, 0.2);
  color: var(--color-accent);
}

/* Step connector lines (desktop only) */
@media (min-width: 1024px) {
  .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 28px;
    left: calc(50% + 36px);
    width: calc(100% - 56px);
    height: 1px;
    background: rgba(44, 111, 219, 0.2);
  }
}

/* --- Features --- */
.features {
  padding: var(--section-padding);
  background: var(--color-surface);
}

.features h2,
.features .section-subtitle {
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.feature {
  background: var(--color-card-bg);
  padding: 36px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
}

.feature:hover {
  border-color: rgba(44, 111, 219, 0.3);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  color: var(--color-accent);
}

.feature h3 {
  font-size: 1.125rem;
  color: var(--color-heading);
  margin-bottom: var(--space-xs);
}

.feature p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* --- AI-Ready Section --- */
.ai-ready {
  padding: var(--section-padding);
  background: var(--color-primary);
  color: white;
}

.ai-ready .section-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

.ai-content h2 {
  color: white;
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-md);
}

.ai-content p {
  font-size: var(--font-size-md);
  color: var(--color-text-on-dark-muted);
  line-height: var(--line-height-body);
  margin-bottom: var(--space-sm);
}

.ai-content p:last-child {
  margin-bottom: 0;
}

.ai-content code {
  background: rgba(44, 111, 219, 0.2);
  color: var(--color-accent);
}

.ai-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-flow {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.ai-flow-item {
  background: var(--color-surface-on-dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  min-width: 120px;
}

.ai-flow-item.highlight {
  background: var(--color-accent-muted);
  border-color: rgba(44, 111, 219, 0.4);
}

.ai-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-eyebrow);
  color: var(--color-text-on-dark-subtle);
  margin-bottom: var(--space-xs);
}

.ai-flow-item.highlight .ai-label {
  color: var(--color-accent);
}

.ai-flow-item code {
  font-size: 0.8125rem;
  background: none;
  padding: 0;
  color: rgba(255, 255, 255, 0.85);
}

.ai-flow-item.highlight code {
  color: white;
  font-weight: var(--font-weight-medium);
}

.ai-flow-arrow {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.25);
}

/* --- Device Showcase Section --- */
.device-showcase {
  padding: var(--section-padding);
  background: var(--color-surface);
}

.device-showcase h2,
.device-showcase .section-subtitle {
  text-align: center;
}

.showcase-devices {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--space-xl);
  margin-top: var(--space-3xl);
}

.showcase-device {
  text-align: center;
}

.device-label {
  display: block;
  margin-top: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
}

/* Device frames */
.device-frame {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
}

.device-frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* Per-device sizing */
.showcase-ipad {
  flex: 0 0 auto;
  max-width: 380px;
}

.showcase-mac {
  flex: 0 0 auto;
  max-width: 480px;
}

.showcase-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.showcase-iphone {
  max-width: 140px;
}

.device-frame--phone {
  border-radius: 20px;
}

.showcase-watch {
  max-width: 100px;
}

.device-frame--watch {
  border-radius: 24px;
  border: 2px solid #333;
  background: #000;
}

.device-frame--mac {
  border-radius: 8px;
}

/* --- Testimonials (Hidden) --- */
[data-hidden="true"] {
  display: none;
}

.testimonials {
  padding: var(--section-padding);
  background: var(--color-white);
}

.testimonials h2 {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.testimonial {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 36px;
  margin: 0;
}

.testimonial p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  color: var(--color-text);
  margin-bottom: var(--space-md);
  font-style: italic;
}

.testimonial cite {
  display: block;
  font-style: normal;
}

.testimonial cite strong {
  display: block;
  font-size: 0.9375rem;
  color: var(--color-heading);
  font-weight: var(--font-weight-semibold);
}

.testimonial cite span {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* --- Pricing --- */
.pricing {
  padding: var(--section-padding);
  background: var(--color-white);
}

.pricing h2,
.pricing .section-subtitle {
  text-align: center;
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  max-width: var(--pricing-max-width);
  margin: 0 auto var(--space-2xl);
}

.pricing-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  transition: all var(--transition-base);
}

.pricing-card:hover {
  border-color: rgba(44, 111, 219, 0.3);
  box-shadow: var(--shadow-lg);
}

.pricing-badge {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-eyebrow);
  color: var(--color-label-accent); /* Light: #2461C4 (4.87:1). Dark: #5A9AFF (4.7:1 on composite bg) */
  background: var(--color-accent-subtle);
  padding: 6px 16px;
  border-radius: var(--radius-2xl);
  margin-bottom: var(--space-md);
}

.pricing-amount {
  margin-bottom: 4px;
}

.currency {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-heading);
  vertical-align: top;
  line-height: 1.6;
}

.price {
  font-size: 3.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-heading);
  letter-spacing: var(--letter-spacing-tight);
  line-height: 1;
}

.pricing-gbp {
  font-size: 1.25rem;
  font-weight: var(--font-weight-regular);
  color: var(--color-text-muted);
  margin-top: 4px;
}

.pricing-term {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: var(--space-lg);
}

.pricing-features li {
  font-size: 0.9375rem;
  color: var(--color-text);
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  line-height: 1.5;
}

.pricing-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15px;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  opacity: 0.6;
}

.pricing-card .btn {
  width: 100%;
}

.pricing-comparison {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.comparison-line {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-bottom: 4px;
}

.comparison-note {
  font-size: 0.9375rem;
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
}

/* --- FAQ --- */
.faq {
  padding: var(--section-padding);
  background: var(--color-surface);
}

.faq h2 {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.faq-list {
  max-width: var(--content-width);
  margin: 0 auto;
}

.faq-list details {
  border-bottom: 1px solid var(--color-border);
}

.faq-list details:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-list summary {
  padding: 24px 40px 24px 0;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--color-heading);
  cursor: pointer;
  list-style: none;
  position: relative;
  line-height: var(--line-height-compact);
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::marker {
  display: none;
  content: '';
}

.faq-list summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 24px;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-text-muted);
  transition: transform var(--transition-base);
}

.faq-list details[open] summary::after {
  content: '\2212';
  transform: rotate(0deg);
}

.faq-list details p {
  padding: 0 0 24px;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: var(--line-height-body);
  max-width: 640px;
}

.faq-list details p code {
  font-size: 0.875em;
}

/* --- CTA Section --- */
.cta-section {
  padding: var(--space-6xl) 24px;
  background: var(--color-primary);
  text-align: center;
}

.cta-section h2 {
  color: white;
  font-size: var(--font-size-3xl);
  max-width: var(--content-width);
  margin: 0 auto var(--space-md);
}

.cta-description {
  font-size: var(--font-size-md);
  color: var(--color-text-on-dark-muted);
  max-width: 600px;
  margin: 0 auto var(--space-sm);
  line-height: var(--line-height-body);
}

.cta-description code {
  background: rgba(44, 111, 219, 0.2);
  color: var(--color-accent);
}

.cta-reversal {
  font-size: 0.875rem;
  color: var(--color-text-on-dark-subtle);
  margin-bottom: var(--space-xl);
}

.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.cta-section .btn-ghost {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--color-text-on-dark-muted);
}

.cta-section .btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  background: rgba(255, 255, 255, 0.06);
}

/* --- Footer --- */
.footer {
  background: var(--color-primary);
  padding: 60px 24px;
  border-top: 1px solid var(--color-border-on-dark);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-brand .logo-mark {
  width: 32px;
  height: 32px;
}

.footer-brand .nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.footer-brand .logo-text {
  color: white;
  font-size: 1.125rem;
}

.footer-tagline {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.80);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-links a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.80);
  text-decoration: none;
  transition: color var(--transition-base);
  padding: 8px 12px;
  display: inline-block;
}

.footer-links a:hover {
  color: white;
}

/* Footer newsletter */
.footer-newsletter {
  max-width: 280px;
}

.footer-newsletter .email-form {
  display: flex;
  gap: var(--space-xs);
}

.footer-newsletter .email-input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 0.875rem;
  padding: 10px 14px;
  min-height: 40px;
}

.footer-newsletter .email-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.footer-newsletter .email-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(44, 111, 219, 0.15);
}

.footer-newsletter .btn {
  font-size: 0.875rem;
  padding: 10px 20px;
  white-space: nowrap;
}

.footer-newsletter .email-privacy {
  color: rgba(255, 255, 255, 0.75);
}

.footer-newsletter .email-success {
  font-size: 0.875rem;
  padding: var(--space-sm);
}

.footer-copyright {
  width: 100%;
  border-top: 1px solid var(--color-border-on-dark);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  text-align: center;
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.75);
}

/* --- Secondary Pages --- */
.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.page-content.page-content--wide {
  max-width: 960px;
}

.page-content h1 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-xs);
}

.page-meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2xl);
}

.page-content h2 {
  font-size: var(--font-size-xl);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-sm);
}

.page-content h3 {
  font-size: var(--font-size-lg);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.page-content p {
  margin-bottom: var(--space-sm);
}

.page-content ul,
.page-content ol {
  margin-bottom: var(--space-sm);
  padding-left: var(--space-md);
}

.page-content li {
  margin-bottom: var(--space-xs);
}

.page-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Summary box (privacy page) */
.summary-box {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.summary-box h2,
.summary-box h3 {
  margin-top: 0;
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-lg);
}

.summary-box ul {
  margin-bottom: 0;
}

/* Facts table (press page) */
.facts-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-xl);
}

.facts-table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
  vertical-align: top;
}

.facts-table th,
.facts-table td:first-child {
  font-weight: var(--font-weight-semibold);
  color: var(--color-heading);
  white-space: nowrap;
  padding-right: var(--space-lg);
  width: 160px;
  text-align: left;
}

.facts-table td:last-child {
  color: var(--color-text-muted);
}

/* Contact block (support page) */
.contact-block {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.contact-block p {
  margin-bottom: var(--space-xs);
}

.contact-block p:last-child {
  margin-bottom: 0;
}

/* 404 Page */
.page-404 {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
}

.page-404 h1 {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-sm);
}

.page-404 p {
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  max-width: 480px;
}

/* --- Email Validation Error (A07) --- */
.email-error-msg {
  font-size: var(--font-size-xs);
  color: var(--color-error);
  margin-top: var(--space-xs);
}

/* --- Content Visibility: Below-fold sections (Performance) --- */
.problem,
.how-it-works,
.features,
.device-showcase,
.ai-ready,
.pricing,
.faq,
.cta-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 800px;
}

/* --- Responsive: Tablet (768px) --- */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
    gap: var(--space-2xl);
    padding: 120px 20px 80px;
    min-height: auto;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-subtitle {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .device-iphone {
    width: 260px;
  }

  .nav-inner {
    padding: 12px 20px;
  }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-cta-mobile {
    background: var(--color-accent);
    color: white !important;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    transition: all var(--transition-base);
    white-space: nowrap;
  }

  .nav-cta-mobile:hover {
    background: var(--color-accent-hover);
    color: white;
  }

  .nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
  }

  /* Mobile menu panel */
  #nav-menu {
    display: block;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition:
      max-height 300ms ease-out,
      opacity 300ms ease-out,
      visibility 0ms linear 300ms;
    background: var(--color-surface);
    padding: 0 var(--space-md);
    box-shadow: var(--shadow-xl);
  }

  .nav-mobile-open #nav-menu {
    max-height: 300px;
    opacity: 1;
    visibility: visible;
    transition:
      max-height 300ms ease-out,
      opacity 300ms ease-out,
      visibility 0ms linear 0ms;
    padding: var(--space-md);
  }

  #nav-menu a {
    display: block;
    padding: 14px 0;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
  }

  #nav-menu a:last-child {
    border-bottom: none;
  }

  /* Section padding */
  .problem,
  .how-it-works,
  .features,
  .ai-ready,
  .testimonials,
  .pricing,
  .faq {
    padding: var(--section-padding-mobile);
  }

  .pain-points,
  .steps,
  .feature-grid,
  .testimonial-grid,
  .pricing-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .steps {
    gap: var(--space-xl);
  }

  .how-it-works h2 {
    margin-bottom: var(--space-2xl);
  }

  .showcase-devices {
    flex-direction: column;
    align-items: center;
    gap: var(--space-2xl);
  }

  .showcase-ipad { max-width: 100%; }
  .showcase-mac  { max-width: 100%; }

  .showcase-aside {
    flex-direction: row;
    justify-content: center;
  }

  .showcase-iphone { max-width: 120px; }
  .showcase-watch  { max-width: 90px; }

  .ai-ready .section-inner {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .ai-flow {
    flex-direction: column;
  }

  .ai-flow-arrow {
    transform: rotate(90deg);
  }

  .cta-section {
    padding: var(--space-4xl) 20px;
  }

  .email-capture {
    padding: var(--space-2xl) 20px 60px;
  }

  .email-form {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .footer-newsletter {
    max-width: 100%;
    width: 100%;
  }

  .footer-newsletter .email-form {
    flex-direction: column;
  }

  .page-content {
    padding: 100px 20px 60px;
  }

  .section-subtitle {
    margin-bottom: var(--space-xl);
  }

  /* Step connectors hidden on mobile */
  .step::after {
    display: none !important;
  }

  /* Facts table: allow wrapping on mobile */
  .facts-table th,
  .facts-table td:first-child {
    white-space: normal;
    width: auto;
    padding-right: var(--space-sm);
  }

}

/* --- Responsive: Small Mobile (480px) --- */
@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    text-align: center;
  }

  .hero-actions .btn-hero,
  .hero-actions .btn-large {
    padding: 16px 32px;
  }

  .device-iphone {
    width: 240px;
  }

  .feature {
    padding: 28px;
  }

  .pain-point {
    padding: var(--space-md);
  }

  .pricing-card {
    padding: 32px 24px;
  }

  .price {
    font-size: 2.75rem;
  }

  .currency {
    font-size: 1.25rem;
  }

  .cta-section .btn-hero,
  .cta-section .btn-large {
    width: 100%;
    max-width: 320px;
  }

  .cta-section .btn-ghost {
    width: 100%;
    max-width: 320px;
  }
}

/* --- Focus Visible --- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html.will-animate .hero-eyebrow,
  html.will-animate .hero h1,
  html.will-animate .hero-subtitle,
  html.will-animate .hero-actions,
  html.will-animate .hero-proof,
  html.will-animate .hero-visual,
  .anim-fade-up,
  .anim-stagger-child {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* --- Print --- */
@media print {
  .nav,
  .footer,
  .email-capture,
  .cta-section,
  .skip-link,
  .btn {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  h1, h2, h3 {
    color: black;
    page-break-after: avoid;
  }

  section {
    padding: 20px 0 !important;
    background: white !important;
    color: black !important;
  }

  .section-inner {
    max-width: 100%;
  }

  a::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #666;
  }
}

