/* ============================================================
   LEVEL UP THE STACK — design tokens
   ============================================================ */

:root,
[data-theme='light'] {
  /* Surfaces */
  --color-bg: #f8f6fc;
  --color-surface: #ffffff;
  --color-surface-2: #fdfcff;
  --color-surface-offset: #f1ecfa;
  --color-surface-offset-2: #e7defa;
  --color-border: #ddd2f0;
  --color-divider: #e8e0f7;

  /* Text */
  --color-text: #150c22;
  --color-text-muted: #5f5372;
  --color-text-faint: #9a8cb3;
  --color-text-inverse: #faf7ff;

  /* Primary accent — deep violet */
  --color-primary: #7c3aed;
  --color-primary-hover: #6d28d9;
  --color-primary-active: #5b21b6;
  --color-primary-highlight: #ede9fe;

  /* Amber — used only for a single "flagship" price badge */
  --color-amber: #b5720a;
  --color-amber-highlight: #f2e2c4;

  /* Success (checklists) */
  --color-success: #9333ea;

  /* Error / warning (rare) */
  --color-error: #a13a3a;

  --radius-sm: 0.4rem;
  --radius-md: 0.7rem;
  --radius-lg: 1.1rem;
  --radius-xl: 1.6rem;
  --radius-full: 9999px;

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

  --shadow-sm: 0 1px 2px oklch(0.2 0.03 300 / 0.07);
  --shadow-md: 0 8px 24px oklch(0.2 0.03 300 / 0.10);
  --shadow-lg: 0 20px 48px oklch(0.2 0.03 300 / 0.17);

  --content-narrow: 640px;
  --content-default: 980px;
  --content-wide: 1240px;

  --font-display: 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;
  --font-body: 'Inter', -apple-system, sans-serif;
}

[data-theme='dark'] {
  --color-bg: #09060f;
  --color-surface: #0f0a1a;
  --color-surface-2: #140e22;
  --color-surface-offset: #0c0815;
  --color-surface-offset-2: #1b1330;
  --color-border: #29203f;
  --color-divider: #1f1730;

  --color-text: #f3eefd;
  --color-text-muted: #a99bc7;
  --color-text-faint: #6a5c85;
  --color-text-inverse: #0a0712;

  --color-primary: #a78bfa;
  --color-primary-hover: #c4b5fd;
  --color-primary-active: #ddd6fe;
  --color-primary-highlight: #241a3d;

  --color-amber: #f2b544;
  --color-amber-highlight: #3a2e17;

  --color-success: #d8b4fe;
  --color-error: #e08a8a;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.45);
  --shadow-md: 0 8px 24px oklch(0 0 0 / 0.5);
  --shadow-lg: 0 24px 56px oklch(0 0 0 / 0.65);
}

/* Site is light-only by design (no theme toggle). Intentionally NOT following
   prefers-color-scheme, so the brand renders identically for every visitor
   regardless of OS setting. */

: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.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.75rem);

  --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: var(--space-6);
}

section {
  padding-block: clamp(var(--space-16), 9vw, var(--space-32));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  border: 1px solid color-mix(in oklab, var(--color-primary) 35%, transparent);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-12);
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-block: var(--space-4) var(--space-3);
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

.divider-line {
  height: 1px;
  background: var(--color-divider);
  border: none;
}

/* ============================================================
   Top contact bar
   ============================================================ */

.topbar {
  background: var(--color-text);
  color: var(--color-bg);
}
[data-theme='dark'] .topbar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  padding-block: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.01em;
}

.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: inherit;
  text-decoration: none;
  opacity: 0.9;
  white-space: nowrap;
}
a.topbar-item:hover {
  opacity: 1;
  color: var(--color-primary-light, var(--color-primary));
}
.topbar-item svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .topbar-inner {
    gap: var(--space-1) var(--space-4);
  }
  .topbar-item svg {
    width: 12px;
    height: 12px;
  }
}

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

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-divider);
  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--scrolled {
  box-shadow: var(--shadow-sm);
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary), color-mix(in oklab, var(--color-primary) 45%, var(--color-amber)));
  transition: width 60ms linear;
}

.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);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}

.brand svg {
  width: 30px;
  height: 30px;
  color: var(--color-primary);
  flex-shrink: 0;
}

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

.nav-links {
  display: flex;
  gap: var(--space-5);
  list-style: none;
}

.nav-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}
.nav-links a:hover {
  color: var(--color-text);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1.5px;
  background: var(--color-primary);
  transition: width var(--transition-interactive);
}
.nav-links a:hover::after {
  width: 100%;
}
.nav-links a.active {
  color: var(--color-text);
}
.nav-links a.active::after {
  width: 100%;
}

/* Logo mark — subtle draw/lift on hover */
.brand svg {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand:hover svg {
  transform: translateY(-2px) rotate(-6deg) scale(1.08);
}
@media (prefers-reduced-motion: reduce) {
  .brand:hover svg { transform: none; }
}

/* Shimmer text — animated gradient sweep on the hero highlight word */
.shimmer-text {
  background: linear-gradient(100deg, var(--color-primary) 20%, color-mix(in oklab, var(--color-primary) 40%, #ffb020) 40%, var(--color-primary) 60%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer-sweep 5s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .shimmer-text { animation: none; background-position: 0 0; }
}
@keyframes shimmer-sweep {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-surface);
}
.icon-btn:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}

.nav-toggle {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive), background var(--transition-interactive), border-color var(--transition-interactive);
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: 0 4px 20px color-mix(in oklab, var(--color-primary) 45%, transparent);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s ease;
  z-index: 1;
}
.btn-primary:hover::before {
  left: 130%;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px color-mix(in oklab, var(--color-primary) 55%, transparent);
}
.btn-primary:active {
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary::before { transition: none; display: none; }
}
.btn-ghost {
  border-color: var(--color-border);
  color: var(--color-text);
  background: var(--color-surface);
}
.btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}
.btn-block {
  width: 100%;
}

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

.hero {
  padding-block-start: clamp(var(--space-16), 10vw, var(--space-24));
  padding-block-end: clamp(var(--space-12), 6vw, var(--space-20));
  position: relative;
  overflow: hidden;
  background-image:
    radial-gradient(circle at 1.5px 1.5px, color-mix(in oklab, var(--color-text) 12%, transparent) 1.5px, transparent 0);
  background-size: 26px 26px;
  background-position: -13px -13px;
}

.hero-net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.7;
  pointer-events: none;
}

/* Cursor-follow glow — desktop only, tracks the pointer inside the hero */
.hero-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(320px circle at var(--glow-x, 50%) var(--glow-y, 30%), color-mix(in oklab, var(--color-primary) 20%, transparent), transparent 70%);
}
.hero-glow.is-active {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce), (pointer: coarse) {
  .hero-glow { display: none; }
}
[data-theme='light'] .hero {
  background-image:
    radial-gradient(circle at 1.5px 1.5px, color-mix(in oklab, var(--color-text) 8%, transparent) 1.5px, transparent 0);
}

.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 60%;
  background: radial-gradient(ellipse at top, color-mix(in oklab, var(--color-primary) 16%, transparent), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-16);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-block: var(--space-5) var(--space-6);
}

.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-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.cta-microcopy {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}
.cta-microcopy-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--color-primary) 20%, transparent);
  flex-shrink: 0;
  animation: pulse-dot 2.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}
@media (prefers-reduced-motion: reduce) {
  .cta-microcopy-dot { animation: none; }
}

.hero-stats {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.hero-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
}
.hero-stat span {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Terminal mockup */
.terminal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-offset);
  border-bottom: 1px solid var(--color-border);
}
.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
}
.terminal-title {
  margin-left: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.terminal-body {
  padding: var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  min-height: 300px;
}

.terminal-line {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  opacity: 0;
  transform: translateY(4px);
  animation: term-in 0.4s ease forwards;
}
.terminal-line .prompt {
  color: var(--color-primary);
  flex-shrink: 0;
}
.terminal-line .out {
  color: var(--color-text-muted);
}
.terminal-line .ok {
  color: var(--color-success);
}
.cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--color-primary);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

@keyframes term-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ============================================================
   USA banner
   ============================================================ */

.usa-banner {
  background: var(--color-primary);
  padding-block: var(--space-6);
}
.usa-banner-inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.usa-banner-badge {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
}
.usa-banner-badge svg {
  width: 24px;
  height: 24px;
  color: var(--color-text-inverse);
}
.usa-banner-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  color: var(--color-text-inverse);
}
.usa-banner-text strong {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
}
.usa-banner-text span {
  font-size: var(--text-sm);
  color: rgba(244, 250, 249, 0.85);
}

/* ============================================================
   Trust bar
   ============================================================ */

.trust-bar {
  padding-block: var(--space-10);
  border-block: 1px solid var(--color-divider);
  background: var(--color-surface-offset);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.trust-item svg {
  width: 22px;
  height: 22px;
  color: var(--color-primary);
  flex-shrink: 0;
}
.trust-item span {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============================================================
   Reveal on scroll
   ============================================================ */

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

/* ============================================================
   Skills
   ============================================================ */

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

.skill-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease, opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in oklab, var(--color-primary) 35%, var(--color-border));
}
.skill-card:hover .icon svg {
  transform: scale(1.15) rotate(-4deg);
}
.skill-card .icon svg {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@media (prefers-reduced-motion: reduce) {
  .skill-card, .skill-card .icon svg { transition: none; }
  .skill-card:hover { transform: none; }
}

/* Staggered entrance — cards cascade in one after another instead of popping together.
   Delay is baked only into the opacity leg of the transition list so hover feedback
   (transform/box-shadow/border-color) always stays instant, never inheriting the stagger. */
.skills-grid .reveal:nth-child(1) { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease, opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0ms; }
.skills-grid .reveal:nth-child(2) { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease, opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 60ms; }
.skills-grid .reveal:nth-child(3) { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease, opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 120ms; }
.skills-grid .reveal:nth-child(4) { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease, opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 180ms; }
.skills-grid .reveal:nth-child(5) { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease, opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 240ms; }
.skills-grid .reveal:nth-child(6) { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease, opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 300ms; }
.pricing-grid .reveal:nth-child(1),
.pricing-grid-2col .reveal:nth-child(1) { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease, opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0ms; }
.pricing-grid .reveal:nth-child(2),
.pricing-grid-2col .reveal:nth-child(2) { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease, opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 80ms; }
.pricing-grid .reveal:nth-child(3) { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease, opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 160ms; }
.pricing-grid .reveal:nth-child(4) { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease, opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 240ms; }
@media (prefers-reduced-motion: reduce) {
  .skills-grid .reveal, .pricing-grid .reveal, .pricing-grid-2col .reveal { transition-delay: 0ms !important; }
}

.skill-card .icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.skill-card .icon svg {
  width: 20px;
  height: 20px;
}

.skill-card h3 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.skill-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.tag {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

/* ============================================================
   Services
   ============================================================ */

.services {
  background: var(--color-surface-offset);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.service-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
}

.service-card h3 {
  font-size: var(--text-base);
  font-weight: 700;
}

.service-price {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.service-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============================================================
   Paid Media / Ads section
   ============================================================ */

.ads-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.ads-copy-block h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.ads-copy-block p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.compare-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.compare-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.compare-top h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
}

.compare-tag {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.compare-tag-fast {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}

.compare-tag-slow {
  background: var(--color-amber-highlight);
  color: var(--color-amber);
}

.compare-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
}

.ads-verdict {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 840px;
  padding: var(--space-6);
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
.ads-verdict strong {
  color: var(--color-text);
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-16);
}

/* ============================================================
   Industries section
   ============================================================ */

.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-10);
}

.industry-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.industry-card .icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.industry-card .icon svg {
  width: 20px;
  height: 20px;
}
.industry-card h3 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.industry-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

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

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  align-items: stretch;
}

.pricing-grid-2col {
  grid-template-columns: repeat(2, 1fr);
  max-width: 780px;
  margin-inline: auto;
}

.price-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease, opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.price-card:not(.featured):hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in oklab, var(--color-primary) 35%, var(--color-border));
}
@media (prefers-reduced-motion: reduce) {
  .price-card:not(.featured):hover { transform: none; }
}

.price-card.featured {
  border: 2px solid var(--color-primary);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--color-primary) 30%, transparent), 0 16px 40px color-mix(in oklab, var(--color-primary) 28%, transparent);
  transform: scale(1.02);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
@media (max-width: 720px) {
  .price-card.featured {
    transform: none;
  }
}

.price-badge {
  position: absolute;
  top: -12px;
  left: var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.price-card h3 {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.price-amount {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.price-amount span {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 400;
  font-family: var(--font-body);
  white-space: nowrap;
}

.price-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}

.price-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  flex-grow: 1;
}
.price-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.price-features svg {
  width: 16px;
  height: 16px;
  color: var(--color-success);
  flex-shrink: 0;
  margin-top: 3px;
}

.pricing-note {
  margin-top: var(--space-10);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.pricing-note strong {
  color: var(--color-text);
}

/* ============================================================
   Process
   ============================================================ */

.process-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: var(--space-10);
  border-top: 1px solid var(--color-divider);
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-primary);
  display: block;
  margin-bottom: var(--space-3);
}

.step h3 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.step p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============================================================
   Local presence
   ============================================================ */

.local {
  background: var(--color-surface-offset);
}

.local-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.local-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.local-card .icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
}
.local-card .icon svg {
  width: 22px;
  height: 22px;
}

.local-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
  font-family: var(--font-display);
}
.local-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}

.local-card a.btn {
  margin-top: auto;
}

/* ============================================================
   Contact CTA
   ============================================================ */

.contact-cta {
  text-align: center;
}

.contact-box {
  background: var(--color-text);
  color: var(--color-text-inverse);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-12), 8vw, var(--space-20));
  position: relative;
  overflow: hidden;
}
[data-theme='dark'] .contact-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.contact-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, color-mix(in oklab, var(--color-primary) 30%, transparent), transparent 60%);
}

.contact-box > * {
  position: relative;
}

.contact-box h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-bottom: var(--space-5);
  color: var(--color-text-inverse);
}
[data-theme='dark'] .contact-box h2 {
  color: var(--color-text);
}

.contact-box p {
  font-size: var(--text-lg);
  opacity: 0.75;
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.contact-trust-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-6);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
}
.contact-trust-row span {
  position: relative;
  padding-left: var(--space-4);
}
.contact-trust-row span::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
}
.contact-trust-row span:first-child {
  padding-left: 0;
}
.contact-trust-row span:first-child::before {
  display: none;
}

.contact-box .btn-ghost {
  background: transparent;
  border-color: color-mix(in oklab, var(--color-text-inverse) 30%, transparent);
  color: var(--color-text-inverse);
}
[data-theme='dark'] .contact-box .btn-ghost {
  border-color: var(--color-border);
  color: var(--color-text);
}
.contact-box .btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

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

.footer {
  padding-block: var(--space-12);
  border-top: 1px solid var(--color-divider);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.footer .brand {
  font-size: var(--text-sm);
}
.footer-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}
.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--color-primary);
}
.footer-meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-6);
  margin-inline: auto;
  text-align: center;
  max-width: 60ch;
  padding-inline: var(--space-4);
}
.footer-meta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-meta a:hover {
  color: var(--color-primary);
}

.contact-address {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-inverse);
  opacity: 0.75;
  margin-top: var(--space-4);
}
[data-theme='dark'] .contact-address {
  color: var(--color-text-muted);
  opacity: 1;
}

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

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .process-list {
    grid-template-columns: 1fr;
  }
  .local-grid {
    grid-template-columns: 1fr;
  }
  .ads-copy-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .industry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .usa-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .usa-banner-text {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }
  .nav-links,
  .header-actions .btn-ghost,
  .header-actions .btn-primary {
    display: none;
  }
  .nav-links a.btn-primary {
    color: #fff;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .brand span {
    display: none;
  }
  .header-inner {
    padding-block: var(--space-3);
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .hero-copy h1 {
    font-size: var(--text-2xl);
  }
  .hero-stats {
    gap: var(--space-5);
  }
  .terminal-body {
    min-height: 260px;
  }
  .platform-grid {
    grid-template-columns: 1fr;
  }
  .industry-grid {
    grid-template-columns: 1fr;
  }
  .compare-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   Finishing touches — grain texture, back-to-top, footer stamp
   ============================================================ */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.025;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.back-to-top {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.2s ease;
  z-index: 60;
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--color-primary-hover);
  transform: translateY(-3px) scale(1.05);
}
.back-to-top svg {
  width: 20px;
  height: 20px;
}

.footer-fingerprint {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: center;
  letter-spacing: 0.02em;
  margin-block-start: var(--space-2);
}

@media (max-width: 640px) {
  .back-to-top {
    width: 40px;
    height: 40px;
    right: var(--space-4);
    bottom: var(--space-4);
  }
}

/* ============================================================
   Service area tags (SEO local section)
   ============================================================ */

.service-area-tags {
  justify-content: center;
  margin-bottom: var(--space-8);
}
.service-area-tags .tag {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  border-color: transparent;
  font-weight: 600;
}

/* ============================================================
   Competitor comparison panel
   ============================================================ */

.compare-panel {
  margin-top: var(--space-9);
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.compare-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-7);
}
.compare-head h3 {
  font-size: var(--text-xl);
  font-family: var(--font-display);
  margin-top: var(--space-2);
}
.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
.compare-col {
  padding: var(--space-6);
  border-radius: var(--radius-md);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
}
.compare-col h4 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}
.compare-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
  margin: 0;
}
.compare-col li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding-left: var(--space-5);
  position: relative;
  line-height: 1.5;
}
.compare-col li::before {
  content: "\2715";
  position: absolute;
  left: 0;
  top: 0.05em;
  color: var(--color-error);
  font-size: 0.75em;
}
.compare-col-highlight {
  background: var(--color-primary-highlight);
  border-color: var(--color-primary);
}
.compare-col-highlight h4 {
  color: var(--color-primary);
}
.compare-col-highlight li {
  color: var(--color-text);
}
.compare-col-highlight li::before {
  content: "\2713";
  color: var(--color-primary);
  font-size: 0.85em;
}

@media (max-width: 860px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
}

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

.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.faq-item[open] {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease;
}
.faq-item[open] summary::after {
  content: "\2212";
  transform: rotate(180deg);
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.faq-item p {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
}

@media (prefers-reduced-motion: reduce) {
  .faq-item summary::after {
    transition: none;
  }
}
