/* ============================================================
   ctohaus — Design System
   Color Scheme: Dark/Premium — Purple Accent
   ============================================================ */

:root {
  --bg:        #0B0B0F;
  --bg-card:   #111115;
  --bg-raised: #16161C;
  --divider:   #1F1F23;
  --text-primary:   #F5F5F7;
  --text-secondary: #A1A1AA;
  --text-muted:     #6B6B74;
  --accent:         #7C3AED;
  --accent-hover:   #A78BFA;
  --accent-glow:    rgba(124, 58, 237, 0.25);
  --accent-glow-lg: rgba(124, 58, 237, 0.12);
  --white: #FFFFFF;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.4), 0 8px 32px rgba(0,0,0,0.3);
  --shadow-purple: 0 0 40px rgba(124, 58, 237, 0.3);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); border: none; }
ul { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4, h5 {
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { color: var(--text-secondary); line-height: 1.75; }

.text-accent { color: var(--accent-hover); }
.text-white  { color: var(--text-primary); }
.text-muted  { color: var(--text-muted); }

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-sm { padding: 64px 0; }

.section-header {
  max-width: 720px;
  margin-bottom: 64px;
}

.section-header.centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-hover);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.section-title {
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
}

/* ── Skip Navigation (Accessibility) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  background: var(--accent);
  color: white;
  padding: 10px 20px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* Focus visible for keyboard nav */
:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(11, 11, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

.nav-logo span {
  color: var(--accent-hover);
}

.nav-logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  color: white;
  letter-spacing: 0;
  flex-shrink: 0;
  margin-right: 6px;
}

.nav-logo-image {
  display: inline-flex;
  align-items: center;
}

.nav-logo-image img {
  height: 32px;
  width: auto;
  display: block;
}

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--text-primary); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 4px;
  cursor: pointer;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border: 1px solid transparent;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--divider);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
  background: rgba(124, 58, 237, 0.06);
}

.btn-ghost {
  background: transparent;
  color: var(--accent-hover);
  padding: 0;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-ghost:hover { color: var(--text-primary); }

.btn-lg {
  padding: 15px 32px;
  font-size: 1rem;
}

.btn svg { flex-shrink: 0; }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-glow-1 {
  position: absolute;
  top: -10%;
  right: -5%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.18) 0%, transparent 65%);
  border-radius: 50%;
}

.hero-glow-2 {
  position: absolute;
  bottom: 5%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 65%);
  border-radius: 50%;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* Canvas particle animation */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Centered hero variant */
.hero-centered {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 180px;
  padding-bottom: 60px;
}

.hero-inner-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 780px;
  padding: 0 24px;
}

.hero-title-centered {
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero-desc-centered {
  max-width: 580px;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.hero-tagline {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  margin-top: -8px;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-hover);
  margin-bottom: 28px;
  width: fit-content;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-hover);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  margin-bottom: 24px;
}

.hero-title .line-accent {
  background: linear-gradient(135deg, #7C3AED, #A78BFA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--divider);
}

.hero-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

.hero-stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card-stack {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.hero-card-main {
  position: relative;
  z-index: 2;
}

.hero-card-float {
  position: absolute;
  z-index: 3;
  background: var(--bg-raised);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-card);
  min-width: 180px;
}

.hero-card-float-1 {
  top: -24px;
  right: -20px;
}

.hero-card-float-2 {
  bottom: -24px;
  left: -20px;
}

.hc-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.hc-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.hc-key {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hc-val {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
}

.hc-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-green { background: rgba(34, 197, 94, 0.12); color: #4ade80; }
.badge-purple { background: rgba(124, 58, 237, 0.15); color: var(--accent-hover); }
.badge-blue { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }

.hc-icon-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.hc-icon {
  width: 28px;
  height: 28px;
  background: var(--accent-glow);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.hc-float-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.04em;
}

.hc-float-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.hc-progress-bar {
  height: 4px;
  background: var(--divider);
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}

.hc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 2px;
  width: 72%;
  animation: progress-grow 2s ease forwards;
}

@keyframes progress-grow {
  from { width: 0; }
  to { width: 72%; }
}

/* ── Approach Section ── */
.approach {
  background: var(--bg);
  border-top: 1px solid var(--divider);
}

.approach-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.approach-step {
  background: var(--bg-card);
  padding: 36px 28px;
  position: relative;
  transition: background var(--transition);
}

.approach-step:hover { background: var(--bg-raised); }

.approach-step-num {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 20px;
  font-variant-numeric: tabular-nums;
}

.approach-step-icon {
  width: 44px;
  height: 44px;
  background: rgba(124, 58, 237, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent-hover);
}

.approach-step h4 {
  color: var(--text-primary);
  font-size: 1.05rem;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.approach-step p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.approach-connector {
  display: none;
}

/* ── Purple Statement Section ── */
.statement-section {
  background: linear-gradient(135deg, #4C1D95 0%, #6D28D9 40%, #7C3AED 70%, #5B21B6 100%);
  position: relative;
  overflow: hidden;
  padding: 100px 0;
}

.statement-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.statement-inner {
  position: relative;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

.statement-quote {
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: white;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin-bottom: 32px;
}

.statement-quote em {
  font-style: normal;
  color: #E9D5FF;
}

.statement-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  max-width: 560px;
  margin: 0 auto 40px;
}

.statement-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.statement-tag {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
}

/* ── Services Section ── */
.services {
  background: var(--bg-card);
  border-top: 1px solid var(--divider);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--divider);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.service-card {
  background: var(--bg-card);
  padding: 44px 40px;
  position: relative;
  transition: background var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  background: var(--bg-raised);
}

.service-card:hover .service-cta {
  color: var(--text-primary);
}

.service-tier {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.service-icon {
  width: 52px;
  height: 52px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-hover);
  margin-bottom: 24px;
  transition: all var(--transition);
}

.service-card:hover .service-icon {
  background: rgba(124, 58, 237, 0.2);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

.service-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.service-card > p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.7;
}

.service-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
  flex: 1;
}

.service-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.service-feature-dot {
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.service-fit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 24px;
}

.service-cta {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-hover);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition), gap var(--transition);
  margin-top: auto;
}

.service-cta:hover { gap: 10px; color: var(--text-primary); }

/* ── AI Integration Section ── */
.ai-section {
  background: var(--bg);
  border-top: 1px solid var(--divider);
}

.ai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.ai-visual {
  position: relative;
}

.ai-flow-diagram {
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: var(--radius-xl);
  padding: 32px;
}

.ai-flow-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.ai-flow-nodes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-flow-node {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-raised);
  border: 1px solid var(--divider);
  transition: border-color var(--transition);
}

.ai-flow-node.active {
  border-color: rgba(124, 58, 237, 0.4);
  background: rgba(124, 58, 237, 0.06);
}

.ai-flow-node-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.ai-flow-node-text h5 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.ai-flow-node-text p {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.ai-flow-arrow {
  display: flex;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin: 2px 0;
}

.ai-content .section-label { margin-bottom: 16px; }

.ai-features-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 36px;
}

.ai-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.ai-feature-icon {
  width: 40px;
  height: 40px;
  background: rgba(124, 58, 237, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-hover);
  flex-shrink: 0;
}

.ai-feature-text h5 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.ai-feature-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Case Studies / Use Cases ── */
.cases {
  background: var(--bg-card);
  border-top: 1px solid var(--divider);
}

.cases-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 64px;
}

.industries-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 80px;
}

.industry-card {
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition);
  cursor: default;
}

.industry-card:hover {
  border-color: rgba(124, 58, 237, 0.35);
  transform: translateY(-2px);
}

.industry-icon {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.industry-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.industry-card p {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.industry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.industry-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 9px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 100px;
  color: var(--accent-hover);
}

/* Use Case Tiers */
.tiers-section {
  border-top: 1px solid var(--divider);
  padding-top: 72px;
}

.tiers-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-hover);
  margin-bottom: 12px;
}

.tiers-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 48px;
  color: var(--text-primary);
}

.tiers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--divider);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.tier-card {
  background: var(--bg-card);
  padding: 32px 24px;
  position: relative;
}

.tier-num {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  color: var(--divider);
  line-height: 1;
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}

.tier-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-hover);
  margin-bottom: 12px;
}

.tier-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.tier-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tier-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tier-item::before {
  content: '→';
  color: var(--accent);
  flex-shrink: 0;
  font-size: 0.75rem;
  margin-top: 1px;
}

/* ── Contact Section ── */
.contact {
  background: var(--bg);
  border-top: 1px solid var(--divider);
}

.contact-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 80px;
  align-items: start;
}

.contact-info h2 {
  margin-bottom: 16px;
}

.contact-info > p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-item-icon {
  width: 40px;
  height: 40px;
  background: rgba(124, 58, 237, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-hover);
  flex-shrink: 0;
}

.contact-item-text h5 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.contact-item-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.contact-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: var(--radius-xl);
  padding: 44px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full { grid-column: 1 / -1; }

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-raised);
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group select {
  appearance: none;
  cursor: pointer;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.form-group select option {
  background: var(--bg-card);
}

.form-submit {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.form-privacy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.form-success {
  display: none;
  text-align: center;
  padding: 40px 0;
}

.form-success-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.form-success h4 {
  margin-bottom: 8px;
}

.form-success p {
  font-size: 0.9rem;
}

/* ── Footer ── */
.footer {
  background: #070709;
  border-top: 1px solid var(--divider);
  padding: 64px 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 32px;
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 14px;
  max-width: 280px;
  line-height: 1.65;
}

.footer-col-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-copy span {
  color: var(--accent-hover);
}

/* ── Nav Active State (multi-page) ── */
.nav-links a.nav-active {
  color: var(--accent-hover);
}

/* ── Page Hero (inner pages) ── */
.page-hero {
  position: relative;
  padding: 150px 0 80px;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.page-hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 60px;
  align-items: center;
}

.page-hero-inner {
  position: relative;
}

/* Right-side animated visual */
.page-hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sys-panel {
  background: #FFFFFF;
  border: 1px solid rgba(124,58,237,0.15);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 4px 40px rgba(124,58,237,0.08), 0 1px 3px rgba(0,0,0,0.06);
}

body:not(.theme-light) .sys-panel {
  background: var(--bg-card);
  border-color: var(--divider);
}

.sys-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(124,58,237,0.1);
}

.sys-panel-dots {
  display: flex;
  gap: 5px;
}

.sys-panel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #E5E7EB;
}

.sys-panel-dot:first-child { background: #F87171; }
.sys-panel-dot:nth-child(2) { background: #FCD34D; }
.sys-panel-dot:nth-child(3) { background: #6EE7B7; }

.sys-panel-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #9CA3AF;
  margin-left: auto;
}

.sys-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(124,58,237,0.06);
}

.sys-row:last-child { border-bottom: none; }

.sys-row-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: #374151;
  min-width: 120px;
}

body:not(.theme-light) .sys-row-label { color: var(--text-secondary); }

.sys-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(124,58,237,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.sys-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  width: 0;
  animation: barGrow 1.4s cubic-bezier(0.4,0,0.2,1) forwards;
}

@keyframes barGrow {
  to { width: var(--bar-target); }
}

.sys-bar-fill:nth-child(1) { animation-delay: 0.2s; }

.sys-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
  white-space: nowrap;
}

.sys-status-ok {
  background: rgba(52,211,153,0.12);
  color: #059669;
}

.sys-status-warn {
  background: rgba(251,191,36,0.12);
  color: #D97706;
}

.sys-status-live {
  background: rgba(124,58,237,0.1);
  color: var(--accent);
}

.sys-panel-scan {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,0.5), transparent);
  animation: scanLine 3s ease-in-out infinite;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

@keyframes scanLine {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(300px); opacity: 0; }
}

.page-hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.page-hero-breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.page-hero-breadcrumb a:hover { color: var(--accent-hover); }

.page-hero-breadcrumb span:not(:last-child) { color: var(--divider); }

.page-hero-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.page-hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.7;
}

/* ── Scroll Animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }

/* ── Mobile Nav Drawer ── */
.nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: var(--bg-card);
  border-left: 1px solid var(--divider);
  z-index: 2000;
  padding: 80px 32px 40px;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  transition: transform var(--transition);
}

.nav-mobile.open {
  display: flex;
  transform: translateX(0);
}

.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1900;
}

.nav-mobile-overlay.open { display: block; }

.nav-mobile a {
  display: block;
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--divider);
  transition: color var(--transition);
}

.nav-mobile a:hover { color: var(--text-primary); }

.nav-mobile .btn {
  margin-top: 16px;
  justify-content: center;
}

.nav-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-visual { display: none; }

  .page-hero-layout {
    grid-template-columns: 1fr;
  }

  .page-hero-visual { display: none; }

  .approach-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .ai-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .industries-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tiers-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }

  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  /* Hamburger easier to tap on mobile */
  .nav-hamburger {
    padding: 10px;
    margin-right: -10px;
  }

  /* Page hero */
  .page-hero {
    padding: 100px 0 56px;
  }

  /* Homepage centered hero */
  .hero-centered {
    padding-top: 120px;
    padding-bottom: 48px;
  }

  .hero-inner-centered {
    padding: 0 16px;
  }

  /* Statement banner */
  .statement-section {
    padding: 64px 0;
  }

  .approach-grid {
    grid-template-columns: 1fr;
  }

  .industries-grid {
    grid-template-columns: 1fr;
  }

  .tiers-grid {
    grid-template-columns: 1fr;
  }

  .cases-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.full { grid-column: 1; }

  .contact-form-wrap {
    padding: 28px 0;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .hero-stats {
    gap: 24px;
  }

  /* Hero action buttons stack on mobile */
  .hero-actions,
  .hero-actions-centered {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero-actions .btn,
  .hero-actions-centered .btn {
    justify-content: center;
    width: 100%;
  }

  /* Sys panel progress rows */
  .sys-row {
    gap: 8px;
  }
  .sys-row-label {
    min-width: 90px;
  }
}

@media (max-width: 480px) {
  .section { padding: 52px 0; }

  .container { padding: 0 16px; }

  .page-hero {
    padding: 90px 0 48px;
  }

  .hero-centered {
    padding-top: 100px;
  }

  /* Reduce large heading sizes on small phones */
  h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
  h2 { font-size: clamp(1.5rem, 6vw, 2rem); }

  .statement-section { padding: 52px 0; }
  .statement-quote { font-size: clamp(1.2rem, 5vw, 1.6rem); }
  .statement-tags { gap: 8px; }

  .services-grid { gap: 0; }
  .service-card { padding: 32px 20px; }

  /* Contact info tiles: single column on small phones */
  .contact-tiles-grid {
    grid-template-columns: 1fr !important;
  }

  /* What-happens-next steps: single column */
  .contact-steps-grid {
    grid-template-columns: 1fr !important;
  }

  /* Nav mobile drawer full width on tiny screens */
  .nav-mobile {
    width: 100%;
    border-left: none;
  }

  /* Buttons full width */
  .btn-lg {
    width: 100%;
    justify-content: center;
  }

  /* Footer copy stack */
  .footer-bottom {
    gap: 6px;
  }
}

/* ════════════════════════════════════════════
   LIGHT THEME — services.html & cases.html
   Nav and footer remain dark; main content
   switches to white with purple accents.
════════════════════════════════════════════ */
body.theme-light {
  --bg:        #FFFFFF;
  --bg-card:   #F8F7FF;
  --bg-raised: #F0EDFF;
  --divider:   #E5E1F0;
  --text-primary:   #0D0D12;
  --text-secondary: #4A4858;
  --text-muted:     #8A879A;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 8px 24px rgba(124,58,237,0.08);
  background: var(--bg);
  color: var(--text-primary);
}

/* Keep nav dark on light pages — force white text so it reads on dark nav */
body.theme-light .nav-logo {
  color: #F5F5F7 !important;
}

body.theme-light .nav-logo span {
  color: var(--accent-hover);
}

body.theme-light .nav-links a {
  color: rgba(255, 255, 255, 0.65);
}

body.theme-light .nav-links a:hover,
body.theme-light .nav-links a.nav-active {
  color: #FFFFFF;
}

body.theme-light .nav-hamburger span {
  background: #F5F5F7;
}

/* Nav is always dark - no scrolled override needed */

/* Keep footer dark on light pages */
body.theme-light .footer {
  background: #070709;
  border-top-color: #1F1F23;
}

/* Force footer text back to light on theme-light pages (CSS vars flip to dark) */
body.theme-light .footer p,
body.theme-light .footer-brand p {
  color: #A1A1AA;
}

body.theme-light .footer-links a {
  color: #A1A1AA;
}

body.theme-light .footer-links a:hover {
  color: var(--accent-hover);
}

body.theme-light .footer-col-title {
  color: #6B6B74;
}

body.theme-light .footer-copy {
  color: #6B6B74;
}

body.theme-light .footer-copy span {
  color: var(--accent-hover);
}

body.theme-light .nav-logo {
  color: #F5F5F7;
}

/* Page hero on light pages */
body.theme-light .hero {
  background: var(--bg);
}

body.theme-light .page-hero {
  background: var(--bg);
}

body.theme-light .page-hero-title,
body.theme-light h1,
body.theme-light h2,
body.theme-light h3,
body.theme-light h4 {
  color: var(--text-primary);
}

body.theme-light .page-hero-desc,
body.theme-light p {
  color: var(--text-secondary);
}

/* Statement banner sits on dark purple — keep text white regardless of theme */
body.theme-light .statement-section p,
body.theme-light .statement-quote,
body.theme-light .statement-sub {
  color: white;
}

body.theme-light .statement-quote em {
  color: #E9D5FF;
}

body.theme-light .statement-tag {
  color: white;
}

body.theme-light .page-hero-breadcrumb,
body.theme-light .page-hero-breadcrumb a {
  color: var(--text-muted);
}

body.theme-light .hero-grid {
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.06) 1px, transparent 1px);
}

body.theme-light .hero-glow-1 {
  background: radial-gradient(circle, rgba(124, 58, 237, 0.10) 0%, transparent 65%);
}

/* Sections */
body.theme-light .section,
body.theme-light section {
  background: var(--bg);
}

body.theme-light .services,
body.theme-light .cases,
body.theme-light .ai-section {
  background: var(--bg);
  border-top-color: var(--divider);
}

/* Section label line */
body.theme-light .section-label {
  color: var(--accent);
}

body.theme-light .section-label::before {
  background: var(--accent);
}

/* Service cards */
body.theme-light .services-grid {
  background: var(--divider);
}

body.theme-light .service-card {
  background: var(--bg);
}

body.theme-light .service-card:hover {
  background: var(--bg-card);
}

body.theme-light .service-tier {
  color: var(--text-muted);
}

body.theme-light .service-card h3 {
  color: var(--text-primary);
}

body.theme-light .service-card > p {
  color: var(--text-secondary);
}

body.theme-light .service-feature {
  color: var(--text-secondary);
}

body.theme-light .service-fit {
  background: var(--bg-card);
  border-color: var(--divider);
  color: var(--text-muted);
}

body.theme-light .service-cta {
  color: var(--accent);
}

body.theme-light .service-cta:hover {
  color: var(--text-primary);
}

/* Industry cards */
body.theme-light .industries-grid .industry-card {
  background: var(--bg);
  border-color: var(--divider);
}

body.theme-light .industry-card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.08);
}

body.theme-light .industry-card h4 {
  color: var(--text-primary);
}

body.theme-light .industry-card p {
  color: var(--text-secondary);
}

/* Tiers */
body.theme-light .tiers-grid {
  background: var(--divider);
}

body.theme-light .tier-card {
  background: var(--bg);
}

body.theme-light .tier-card:hover {
  background: var(--bg-card) !important;
}

body.theme-light .tier-num {
  color: var(--divider);
}

body.theme-light .tier-card h4 {
  color: var(--text-primary);
}

body.theme-light .tier-item {
  color: var(--text-secondary);
}

body.theme-light .tier-item::before {
  color: var(--accent);
}

/* Cases header row button */
body.theme-light .btn-outline {
  border-color: var(--divider);
  color: var(--text-primary);
}

body.theme-light .btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(124, 58, 237, 0.05);
}

/* "Sound Familiar?" problem cards */
body.theme-light [style*="background: var(--bg-card)"] {
  background: var(--bg-card) !important;
  border-color: var(--divider) !important;
}

/* Alternating case section with bg-card */
body.theme-light .cases[style*="bg-card"],
body.theme-light section[style*="bg-card"] {
  background: var(--bg-card) !important;
}

/* AI Flow diagram */
body.theme-light .ai-flow-diagram {
  background: var(--bg-card);
  border-color: var(--divider);
}

body.theme-light .ai-flow-title {
  color: var(--text-muted);
}

body.theme-light .ai-flow-node {
  background: var(--bg);
  border-color: var(--divider);
}

body.theme-light .ai-flow-node.active {
  background: rgba(124, 58, 237, 0.04);
  border-color: rgba(124, 58, 237, 0.3);
}

body.theme-light .ai-flow-node-text h5 {
  color: var(--text-primary);
}

body.theme-light .ai-flow-node-text p {
  color: var(--text-muted);
}

body.theme-light .ai-flow-arrow {
  color: var(--text-muted);
}

body.theme-light .ai-feature-text h5 {
  color: var(--text-primary);
}

body.theme-light .ai-feature-text p {
  color: var(--text-secondary);
}

/* Mobile nav drawer — keep dark */
body.theme-light .nav-mobile {
  background: #111115;
  border-left-color: #1F1F23;
}

body.theme-light .nav-mobile a {
  color: #A1A1AA;
  border-bottom-color: #1F1F23;
}

body.theme-light .nav-mobile a:hover { color: #F5F5F7; }

body.theme-light .nav-mobile-overlay {
  background: rgba(0,0,0,0.7);
}
