/* =========================================================
   AetherLab Digital Studio — Design Tokens & Stylesheet
   ========================================================= */
:root {
  --bg-canvas: #07090f;
  --bg-surface: #0e131f;
  --bg-surface-elevated: #151c2e;
  --bg-alt: #0a0e18;
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-indigo: #6366f1;
  --accent-cyan: #22d3ee;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 20px 50px -20px rgba(0, 0, 0, 0.65);
  --header-height: 76px;
  --transition-fast: 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="light"] {
  --bg-canvas: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-alt: #eef2f6;
  --border-subtle: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.22);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --shadow-card: 0 18px 40px -20px rgba(15, 23, 42, 0.14);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
  color: var(--text-secondary);
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* Accessibility Focus Rings (WCAG 2.2) */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 999;
  background: var(--accent-indigo);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus {
  left: 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Ambient Background Grid & Glows */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  z-index: -1;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.18;
  pointer-events: none;
}
.bg-glow--one {
  top: -160px;
  left: -120px;
  background: var(--accent-indigo);
}
.bg-glow--two {
  top: 120px;
  right: -180px;
  background: var(--accent-cyan);
}

/* Layout Utilities */
.container {
  width: min(1160px, calc(100% - 2rem));
  margin-inline: auto;
}

.section {
  padding: 5.5rem 0;
}

.section-alt {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.muted { color: var(--text-muted); }

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: color-mix(in srgb, var(--bg-canvas) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  min-height: 44px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(99, 102, 241, 0.14);
  color: var(--accent-indigo);
  border: 1px solid rgba(99, 102, 241, 0.3);
}
.brand-name span {
  color: var(--accent-cyan);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.6rem 0.95rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}
.nav-link:hover, .nav-link.is-active {
  color: var(--text-primary);
  background-color: var(--bg-surface-elevated);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Minimum 44x44px Accessible Interactive Buttons */
.icon-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.icon-btn:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

html[data-theme="dark"] .icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: none; }

.menu-btn { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.35rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.88rem; }
.btn-lg { min-height: 50px; padding: 0.85rem 1.6rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-indigo), #4f46e5);
  color: #ffffff;
  box-shadow: 0 8px 24px -8px rgba(99, 102, 241, 0.55);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(99, 102, 241, 0.65);
}

.btn-ghost {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-elevated);
  transform: translateY(-2px);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: flex-end;
}
.mobile-drawer[hidden] { display: none; }
.mobile-drawer-panel {
  width: min(320px, 86vw);
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mobile-link {
  padding: 0.85rem 1rem;
  min-height: 44px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-secondary);
}
.mobile-link:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

/* Hero Section */
.hero {
  padding-top: 4rem;
  padding-bottom: 4.5rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 3rem;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.hero-title {
  font-size: clamp(2.35rem, 4.4vw, 3.85rem);
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.text-gradient {
  background: linear-gradient(95deg, var(--accent-indigo), var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  max-width: 56ch;
  margin-bottom: 2rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.5rem;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}
.metric-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
}
.metric-label {
  font-size: 0.84rem;
  color: var(--text-muted);
}
.metric-divider {
  width: 1px;
  height: 36px;
  background: var(--border-subtle);
}

/* Hero Telemetry Showcase Card */
.showcase-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.2rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
}
.window-dots {
  display: flex;
  gap: 6px;
}
.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.badge-live {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.window-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.telemetry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.telemetry-title {
  font-size: 1.25rem;
  margin-top: 0.25rem;
}
.score-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  border: 2px solid var(--accent-emerald);
}

.vitals-bars {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}
.vital-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  margin-bottom: 0.35rem;
}
.mono-value {
  font-family: var(--font-mono);
  font-weight: 600;
}
.accent-emerald { color: var(--accent-emerald); }
.accent-cyan { color: var(--accent-cyan); }
.accent-indigo { color: var(--accent-indigo); }

.progress-track {
  height: 7px;
  background: var(--bg-surface-elevated);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent-emerald);
}
.progress-cyan { background: var(--accent-cyan); }
.progress-indigo { background: var(--accent-indigo); }

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  border-radius: 999px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.chip svg { width: 14px; height: 14px; color: var(--accent-cyan); }

/* Trust Strip */
.trust-strip {
  padding: 2.25rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--bg-surface) 45%, transparent);
}
.trust-caption {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.trust-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 3rem;
}
.trust-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-secondary);
  opacity: 0.82;
}

/* Section Headers */
.section-head {
  max-width: 640px;
  margin-bottom: 3rem;
}
.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.section-kicker {
  display: block;
  color: var(--accent-cyan);
  margin-bottom: 0.6rem;
}
.section-title {
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  margin-bottom: 0.75rem;
}
.section-desc {
  font-size: 1.02rem;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.bento-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.bento-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}
.bento-span-2 {
  grid-column: span 2;
}
.bento-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(99, 102, 241, 0.14);
  color: var(--accent-indigo);
  margin-bottom: 0.25rem;
}
.accent-cyan-bg { background: rgba(34, 211, 238, 0.14); color: var(--accent-cyan); }
.accent-emerald-bg { background: rgba(16, 185, 129, 0.14); color: var(--accent-emerald); }
.accent-amber-bg { background: rgba(245, 158, 11, 0.14); color: var(--accent-amber); }

.tag {
  color: var(--text-muted);
}
.bento-card h3 {
  font-size: 1.32rem;
}
.feature-pills {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.feature-pills li {
  font-size: 0.82rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.bento-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: center;
}
.code-snippet-preview {
  background: #060911;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.tok-muted { color: #64748b; }
.tok-green { color: #10b981; }
.tok-cyan { color: #22d3ee; }

/* Filter Bar & Portfolio Grid */
.filter-bar, .billing-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}
.filter-btn, .toggle-opt {
  min-height: 38px;
  padding: 0.45rem 0.95rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
.filter-btn.is-active, .toggle-opt.is-active {
  background: var(--accent-indigo);
  color: #ffffff;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}
.work-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.work-card[hidden] { display: none; }
.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.work-visual {
  height: 180px;
  padding: 1.25rem;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--border-subtle);
}
.work-visual--indigo { background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.28), var(--bg-surface-elevated)); }
.work-visual--cyan { background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.25), var(--bg-surface-elevated)); }
.work-visual--emerald { background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.25), var(--bg-surface-elevated)); }

.mockup-ui {
  width: 100%;
  height: 100%;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.mockup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.m-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--border-strong);
  display: inline-block;
}
.w-60 { width: 60%; }
.w-50 { width: 50%; }
.w-40 { width: 40%; }
.m-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
}
.m-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.18);
  color: var(--accent-indigo);
}
.m-pill--green {
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent-emerald);
}
.mockup-chart {
  height: 70px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.mockup-chart span {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, var(--accent-indigo), var(--accent-cyan));
}
.mockup-terminal {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mockup-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  height: 68px;
}
.mockup-cards span {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
}

.work-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}
.work-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}
.work-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.work-body h3 { font-size: 1.25rem; }
.work-body p { font-size: 0.94rem; flex: 1; }

.work-link {
  margin-top: 0.5rem;
  min-height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  align-self: flex-start;
}
.work-link:hover svg {
  transform: translateX(4px);
}
.work-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

/* Process Grid */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}
.process-step {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.step-num {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.14);
  color: var(--accent-indigo);
  margin-bottom: 1rem;
}
.process-step h3 {
  font-size: 1.15rem;
  margin-bottom: 0.55rem;
}
.process-step p { font-size: 0.92rem; }

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
  align-items: stretch;
}
.price-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}
.price-card--featured {
  border-color: var(--accent-indigo);
  box-shadow: 0 24px 50px -24px rgba(99, 102, 241, 0.45);
}
.featured-badge {
  position: absolute;
  top: -12px;
  right: 1.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-indigo);
  color: #ffffff;
}
.price-head h3 { font-size: 1.4rem; margin: 0.35rem 0; }
.price-head p { font-size: 0.92rem; }
.price-amount {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}
.currency { font-size: 1.35rem; font-weight: 700; color: var(--text-secondary); }
.amount-val { font-family: var(--font-display); font-size: 2.65rem; font-weight: 700; line-height: 1; }
.period { color: var(--text-muted); font-size: 0.9rem; margin-left: 0.2rem; }

.price-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}
.price-features li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.93rem;
  color: var(--text-secondary);
}
.price-features svg {
  width: 17px;
  height: 17px;
  color: var(--accent-emerald);
  flex-shrink: 0;
}

/* Testimonials & FAQ */
.faq-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2.5rem;
}
.quote-card {
  margin: 0 0 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.quote-card p {
  color: var(--text-primary);
  font-size: 0.98rem;
  margin-bottom: 1.15rem;
}
.quote-card footer {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.quote-card footer strong { display: block; font-size: 0.95rem; }
.quote-card footer span { font-size: 0.83rem; color: var(--text-muted); }

.avatar-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-indigo);
}
.avatar-cyan {
  background: rgba(34, 211, 238, 0.2);
  color: var(--accent-cyan);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-trigger {
  width: 100%;
  min-height: 54px;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
}
.faq-trigger svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}
.faq-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.faq-panel {
  padding: 0 1.25rem 1.15rem;
  font-size: 0.94rem;
}

/* Contact Grid & Form */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}
.contact-details {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
}
.contact-row span { display: block; }
.contact-row a:hover { color: var(--accent-cyan); }

.contact-form-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.field label {
  font-size: 0.88rem;
  font-weight: 600;
}
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.95rem;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent-indigo);
}

.form-status {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
}
.form-status.is-success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald);
}
.form-status.is-error {
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: var(--accent-rose);
}

/* Footer */
.site-footer {
  padding: 3.5rem 0 2rem;
  border-top: 1px solid var(--border-subtle);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}
.footer-tagline {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  max-width: 38ch;
}
.footer-links, .social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.footer-links a:hover { color: var(--text-primary); }

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 1rem;
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
  width: min(620px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 1.65rem; }
.modal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.modal-stat-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}
.modal-stat-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--accent-cyan);
}
.modal-stat-box span {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.modal-details {
  display: grid;
  gap: 1rem;
}
.modal-details h4 {
  color: var(--accent-indigo);
  margin-bottom: 0.35rem;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: calc(1.25rem + env(safe-area-inset-bottom));
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-indigo);
  color: #ffffff;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.45);
  transition: transform var(--transition-fast);
}
.back-to-top[hidden] { display: none; }
.back-to-top:hover { transform: translateY(-3px); }

/* Scroll reveal is progressive enhancement: without JavaScript, content stays visible. */
.reveal {
  opacity: 1;
  transform: none;
}
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 550ms ease, transform 550ms cubic-bezier(0.22, 1, 0.36, 1);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}

/* Responsive Breakpoints */
@media (max-width: 980px) {
  .hero-grid,
  .bento-split,
  .faq-layout,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .bento-grid,
  .work-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bento-span-2 { grid-column: span 2; }
  .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .nav-desktop, .hide-mobile { display: none; }
  .menu-btn { display: inline-grid; }
  .bento-grid,
  .work-grid,
  .pricing-grid,
  .process-grid,
  .form-row,
  .modal-stats {
    grid-template-columns: 1fr;
  }
  .bento-span-2 { grid-column: span 1; }
  .section { padding: 4rem 0; }
}

/* =========================================================
   AETHERLAB QUALITY LAYER — accessibility, resilience & polish
   ========================================================= */

:root {
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-synthesis: none;
}

html {
  scroll-padding-top: calc(var(--header-height) + 1rem);
  scrollbar-gutter: stable;
}

body {
  min-width: 320px;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  color: #ffffff;
  background: rgba(99, 102, 241, 0.78);
}

button,
a,
select {
  touch-action: manipulation;
}

button:disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

.nav-link[aria-current="location"] {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
  box-shadow: inset 0 -2px 0 var(--accent-cyan);
}

.mobile-drawer {
  overscroll-behavior: contain;
}

.mobile-drawer-panel {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body.overlay-open {
  overscroll-behavior: none;
}

.filter-btn:focus-visible,
.toggle-opt:focus-visible,
.faq-trigger:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

.faq-panel[hidden],
.mobile-drawer[hidden],
.modal-backdrop[hidden],
.back-to-top[hidden] {
  display: none !important;
}

.faq-panel {
  overflow-wrap: anywhere;
}

.contact-form-wrap {
  box-shadow: var(--shadow-card);
}

.field input,
.field select,
.field textarea {
  color: var(--text-primary);
  accent-color: var(--accent-indigo);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.field select:invalid {
  color: var(--text-muted);
}

.form-note {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
  margin-top: -0.35rem;
}

.form-status {
  overflow-wrap: anywhere;
}

.social-links .icon-btn {
  text-decoration: none;
}

.social-links .icon-btn svg {
  display: block;
}

.modal-backdrop {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-card {
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  margin-block: auto;
}

.modal-stat-box {
  min-width: 0;
  overflow-wrap: anywhere;
}

.work-card,
.bento-card,
.price-card {
  min-width: 0;
}

.work-card h3,
.bento-card h3,
.price-card h3,
.section-title {
  overflow-wrap: anywhere;
}

/* A smooth hover effect is only used on devices that genuinely support hover. */
@media (hover: hover) and (pointer: fine) {
  .work-card:hover,
  .bento-card:hover,
  .price-card:hover {
    transform: translateY(-4px);
  }
}

@media (max-width: 720px) {
  .hero {
    padding-top: 3rem;
  }

  .hero-grid {
    gap: 2.25rem;
  }

  .hero-title {
    font-size: clamp(2.15rem, 9vw, 3.2rem);
  }

  .hero-metrics {
    gap: 1rem;
  }

  .metric-divider {
    display: none;
  }

  .contact-form-wrap {
    padding: 1.35rem;
  }

  .footer-inner {
    align-items: flex-start;
  }

  .modal-backdrop {
    place-items: start center;
    padding: 0.75rem;
  }

  .modal-card {
    max-height: calc(100dvh - 1.5rem);
    padding: 1.35rem;
    margin-block: auto;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 1.25rem, 1160px);
  }

  .section {
    padding-block: 3.4rem;
  }

  .hero-title {
    font-size: clamp(2rem, 10vw, 2.7rem);
  }

  .hero-cta-row > .btn {
    width: 100%;
  }

  .status-pill {
    max-width: 100%;
    padding-inline: 0.65rem;
  }

  .status-pill .mono-label {
    font-size: 0.64rem;
    letter-spacing: 0.035em;
  }

  .window-body {
    padding: 1rem;
  }

  .vital-meta {
    gap: 0.75rem;
    align-items: flex-start;
  }

  .vital-meta > span:first-child {
    max-width: 68%;
  }

  .vital-meta > span:last-child {
    white-space: nowrap;
  }

  .contact-form-wrap {
    padding: 1rem;
  }

  .footer-bottom {
    align-items: flex-start;
  }
}

@media (prefers-contrast: more) {
  :focus-visible {
    outline-width: 3px;
    outline-offset: 3px;
  }

  .btn-ghost,
  .icon-btn,
  .bento-card,
  .work-card,
  .price-card,
  .contact-form-wrap {
    border-color: var(--border-strong);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal,
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
