/* ==========================================================================
   AgentWorks Labs — Styles (agenticworks.com aesthetic)
   Dark theme, Geist fonts, card-based layout, modern components
   ========================================================================== */

/* --- CSS Reset / Normalize --- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; padding: 0; margin: 0; }

/* --- CSS Custom Properties --- */
:root {
  /* Colors - Dark theme (agenticworks style) */
  --bg: #0a0a0b;
  --bg-elevated: #111113;
  --bg-card: #18181b;
  --bg-card-hover: #1f1f23;
  --border: #27272a;
  --border-hover: #3f3f46;
  
  --fg: #fafafa;
  --fg-muted: #a1a1aa;
  --fg-subtle: #71717a;
  
  /* Brand - Blue tech palette */
  --primary: #050C9C;
  --primary-hover: #3572EF;
  --primary-light: #3ABEF9;
  --primary-glow: #A7E6FF;
  
  /* Gradients */
  --grad-primary: linear-gradient(135deg, #3ABEF9 0%, #3572EF 100%);
  --grad-primary-reverse: linear-gradient(135deg, #3572EF 0%, #3ABEF9 100%);
  --grad-card: linear-gradient(180deg, rgba(58, 190, 249, 0.08) 0%, rgba(53, 114, 239, 0.04) 100%);
  --grad-border: linear-gradient(180deg, #3ABEF9 0%, #3572EF 100%);
  
  /* Typography */
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  
  /* Container */
  --container-max: 1200px;
  --container-padding: 1.5rem;
  
  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 32px rgba(58, 190, 249, 0.15);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  
  /* Z-index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal: 400;
  --z-toast: 500;
}

/* The site is dark-only by design. We intentionally do NOT define a
   prefers-color-scheme: light override so the dark palette is consistent
   for every visitor regardless of their OS theme. */

/* --- Base Styles --- */
html { 
  font-family: var(--font-sans); 
  background: var(--bg); 
  color: var(--fg); 
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { 
  min-height: 100vh; 
  display: flex; 
  flex-direction: column; 
}

::selection { background: var(--primary-light); color: var(--bg); }
::-moz-selection { background: var(--primary-light); color: var(--bg); }

/* Focus visible */
:focus-visible { 
  outline: 2px solid var(--primary-light); 
  outline-offset: 2px; 
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  top: var(--space-md);
  left: var(--space-md);
  width: auto;
  height: auto;
  padding: var(--space-sm) var(--space-md);
  background: var(--primary);
  color: var(--fg);
  border-radius: var(--radius-md);
  z-index: var(--z-toast);
  font-weight: 500;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.15;
  color: var(--fg);
  margin: 0;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin: 0 0 var(--space-md); color: var(--fg-muted); }
p:last-child { margin-bottom: 0; }

.gradient-text {
  color: var(--fg);
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: var(--space-sm);
}
#process .eyebrow,
#blog .eyebrow {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
  text-transform: none;
  white-space: nowrap;
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-md);
  line-height: 1.1;
}

.section-description {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--fg-muted);
  max-width: 720px;
  margin: var(--space-lg) auto 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--grad-primary);
  color: var(--bg);
  border: none;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 8px 24px rgba(58, 190, 249, 0.3); 
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn-secondary:hover { 
  border-color: var(--primary-light); 
  background: rgba(58, 190, 249, 0.08); 
  color: var(--primary-light); 
}

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border-color: transparent;
  padding: 0.5rem 1rem;
}
.btn-ghost:hover { color: var(--fg); }

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: var(--z-sticky);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo img { height: 60px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  transition: color var(--transition-fast);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--grad-primary);
  transition: width var(--transition-base);
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.lang-toggle:hover { 
  border-color: var(--primary-light); 
  color: var(--primary-light); 
  background: rgba(58, 190, 249, 0.08); 
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(72px + var(--space-4xl)) 0 var(--space-4xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(53, 114, 239, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(58, 190, 249, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero .container { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.hero-content { max-width: 580px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: rgba(58, 190, 249, 0.1);
  border: 1px solid rgba(58, 190, 249, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: var(--space-lg);
}

.hero-title { margin-bottom: var(--space-lg); line-height: 1.1; }
.hero-subtitle { 
  font-size: clamp(1rem, 1.5vw, 1.125rem); 
  max-width: 540px; 
  margin-bottom: var(--space-xl); 
  line-height: 1.7; 
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-md); }

.hero-visual { position: relative; }

.visual-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-slow);
}
.visual-card:hover { 
  border-color: var(--border-hover); 
  box-shadow: var(--shadow-lg), var(--shadow-glow); 
}

.visual-header, .visual-footer {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-muted);
  padding: var(--space-xs) 0;
}

.visual-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-light);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

.visual-graph { margin: var(--space-md) 0; }
.node-graph { width: 100%; height: auto; }

/* --- Sections --- */
.section { padding: var(--space-4xl) 0; }
.section-alt { background: var(--bg-elevated); }

/* Offset anchored sections so the fixed header doesn't cover them on nav */
section[id] { scroll-margin-top: 80px; }

.section-header { text-align: center; max-width: 720px; margin: 0 auto var(--space-3xl); }
h2.section-title, .section-title { 
  margin-bottom: var(--space-md); 
  color: var(--fg);
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-subtitle { font-size: 1.125rem; color: var(--fg-muted); }

/* --- Two-column split sections (Features / Services / Why) --- */
.split-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-3xl);
  align-items: center;
}

.split-copy .eyebrow { margin-bottom: var(--space-md); }
.split-copy .section-title { margin-bottom: var(--space-lg); }
.split-sub {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--fg-muted);
  margin-bottom: var(--space-lg);
}
.split-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--fg-subtle);
  margin-bottom: var(--space-xl);
}
.split-copy .btn { margin-top: var(--space-sm); }

/* Cards side of a split section */
.split-cards .cards-grid { margin-top: 0; }
.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
}
.why-compact-grid { grid-template-columns: repeat(2, 1fr); }

/* Compact steps for the Process split layout */
.compact-steps-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
.compact-steps-grid .step-card { height: 100%; }
.compact-steps-grid .step-number { margin-bottom: var(--space-md); }
.compact-steps-grid .step-title { font-size: 1rem; }
.compact-steps-grid .step-description { font-size: 0.8125rem; }

/* --- Process timeline --- */
.timeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
/* Connecting line behind the nodes */
.timeline::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 5%;
  right: 5%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--grad-primary), var(--grad-primary), transparent);
  opacity: 0.4;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.timeline-node {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-lg);
  background: var(--bg);
  border: 2px solid var(--primary-light);
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 4px var(--bg-elevated), var(--shadow-glow);
}
.timeline-num,
.timeline-icon {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--primary-light);
}
.timeline-icon {
  width: 26px;
  height: 26px;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  height: 100%;
}
.timeline-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.timeline-card .step-title { font-size: 1rem; margin-bottom: var(--space-sm); }
.timeline-card .step-description { font-size: 0.8125rem; }

/* Features visual card */
.split-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.feature-visual-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: all var(--transition-slow);
}
.feature-visual-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.fv-head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-muted);
  padding: var(--space-xs) 0 var(--space-md);
}
.feature-visual-card img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  display: block;
}
.fv-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  padding-top: var(--space-md);
  margin-top: var(--space-md);
  border-top: 1px solid var(--border);
}
.fv-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.fv-num {
  font-size: 1.75rem;
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-mono);
}
.fv-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Alternate split-row sides so sections don't all read the same way */
.features-row .split-copy { order: 2; }
.features-row .split-visual { order: 1; }
.why-row .split-copy { order: 2; }
.why-row .split-cards { order: 1; }

/* --- Unified Cards Grid (Services + Why) --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

/* Unified card base - shared by Services and Why */
.unified-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.unified-card:hover { 
  border-color: var(--border-hover); 
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.unified-card .card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(58, 190, 249, 0.1);
  border-radius: var(--radius-lg);
  color: var(--primary-light);
  margin-bottom: var(--space-lg);
}
.unified-card .card-icon svg { width: 24px; height: 24px; }

.unified-card .card-title { margin-bottom: var(--space-sm); font-size: 1.125rem; }
.unified-card .card-description { 
  flex: 1; 
  font-size: 0.875rem; 
  line-height: 1.6; 
  margin-bottom: var(--space-lg); 
}

.unified-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

.unified-card .card-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary-light);
  background: rgba(58, 190, 249, 0.1);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
}

.unified-card .card-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  transition: all var(--transition-fast);
}
.unified-card .card-link:hover { color: var(--primary-light); gap: var(--space-sm); }

/* Why cards specific - extend unified card */
.why-card .why-icon {
  width: 56px;
  height: 56px;
}
.why-card .why-icon svg { width: 28px; height: 28px; }

.why-grid {
  /* Uses unified-grid + cards-grid from above */
}

.why-card .why-title { margin-bottom: var(--space-sm); font-size: 1.125rem; }
.why-card .why-description { 
  font-size: 0.875rem; 
  line-height: 1.6; 
  color: var(--fg-muted);
  /* No margin-bottom since no footer */
}

/* --- Services Accordion --- */
.split-accordion { width: 100%; }

.accordion {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-base), background var(--transition-base), box-shadow var(--transition-base);
  overflow: hidden;
}
.accordion-item:hover { border-color: var(--border-hover); }
.accordion-item[open] {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
}

.accordion-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.accordion-header::-webkit-details-marker { display: none; }
.accordion-header:hover .accordion-title { color: var(--primary-light); }

.accordion-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: rgba(58, 190, 249, 0.1);
  border-radius: var(--radius-lg);
  color: var(--primary-light);
}
.accordion-icon svg { width: 22px; height: 22px; }

.accordion-title {
  flex: 1;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--fg);
  transition: color var(--transition-fast);
}

.accordion-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--fg-muted);
  transition: transform var(--transition-base), color var(--transition-base);
}
.accordion-chevron svg { width: 18px; height: 18px; }
.accordion-item[open] .accordion-chevron {
  transform: rotate(180deg);
  color: var(--primary-light);
}

/* Smooth expand/collapse via the grid-rows trick */
.accordion-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--transition-base);
}
.accordion-item[open] .accordion-body { grid-template-rows: 1fr; }
.accordion-body-inner {
  overflow: hidden;
  min-height: 0;
}

.accordion-description {
  padding: 0 var(--space-lg);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--fg-muted);
}

.accordion-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin: var(--space-md) var(--space-lg) var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

.accordion-footer .card-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary-light);
  background: rgba(58, 190, 249, 0.1);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
}

.accordion-footer .card-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  transition: all var(--transition-fast);
}
.accordion-footer .card-link:hover { color: var(--primary-light); gap: var(--space-sm); }

/* --- Steps / Process Grid --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  position: relative;
  transition: all var(--transition-base);
}
.step-card:hover { 
  border-color: var(--border-hover); 
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

.step-number {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-light);
  background: rgba(58, 190, 249, 0.1);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
}

.step-title { margin-bottom: var(--space-sm); font-size: 1.125rem; }
.step-description { font-size: 0.875rem; line-height: 1.6; color: var(--fg-muted); }

/* Steps in split layout (compact, 2 cols) */
.steps-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}
.steps-compact .step-card {
  padding: var(--space-lg);
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}
.steps-compact .step-number {
  margin-bottom: 0;
  flex-shrink: 0;
}
.steps-compact .step-body { flex: 1; min-width: 0; }
.steps-compact .step-title { font-size: 1rem; margin-bottom: var(--space-xs); }

/* --- Blog Grid (agenticworks.com style) --- */
.blog-grid-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--space-lg);
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.blog-card:hover { 
  border-color: var(--border-hover); 
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.blog-card-media {
  aspect-ratio: 16 / 10;
  width: 100%;
  overflow: hidden;
  background: var(--grad-card);
}
.blog-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-gradient {
  aspect-ratio: 16 / 10;
  width: 100%;
  border-radius: 0;
}

.blog-content { padding: var(--space-lg); display: flex; flex-direction: column; flex: 1; }
.blog-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.75rem;
  color: var(--fg-subtle);
  margin-bottom: var(--space-sm);
  font-family: var(--font-mono);
}
.blog-category {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary-light);
  background: rgba(58, 190, 249, 0.1);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
}
.blog-title { 
  font-size: 1.125rem; 
  margin-bottom: var(--space-sm); 
  line-height: 1.3;
  transition: color var(--transition-fast);
}
.blog-card:hover .blog-title { color: var(--primary-light); }
.blog-excerpt { 
  flex: 1; 
  font-size: 0.875rem; 
  line-height: 1.6; 
  color: var(--fg-muted);
  margin-bottom: var(--space-lg); 
}

.blog-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  transition: all var(--transition-fast);
}
.blog-link:hover { color: var(--primary-light); gap: var(--space-sm); }

/* --- Featured Blog Cards (like Services/Why) --- */
.blog-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--space-lg);
}

/* Blog grid inside split layout: stack cards vertically */
.blog-row .blog-featured-grid {
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
.blog-row .blog-featured-card {
  flex-direction: row;
  gap: var(--space-lg);
}
.blog-row .blog-featured-image {
  width: 42%;
  flex-shrink: 0;
  aspect-ratio: 16 / 10;
}
.blog-row .blog-featured-content { padding: var(--space-md) var(--space-md) var(--space-md) 0; }

.blog-featured-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.blog-featured-image {
  aspect-ratio: 16 / 10;
  width: 100%;
  overflow: hidden;
  background: var(--grad-card);
}
.blog-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.blog-featured-card:hover .blog-featured-image img {
  transform: scale(1.05);
}

.blog-featured-content {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-featured-content .blog-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.75rem;
  color: var(--fg-subtle);
  margin-bottom: var(--space-sm);
  font-family: var(--font-mono);
}

.blog-featured-content .blog-category {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary-light);
  background: rgba(58, 190, 249, 0.1);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
}

.blog-featured-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
  line-height: 1.3;
  transition: color var(--transition-fast);
}
.blog-featured-card:hover .blog-featured-title { color: var(--primary-light); }

.blog-featured-excerpt {
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--fg-muted);
  margin-bottom: var(--space-lg);
}

.blog-featured-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  transition: all var(--transition-fast);
}
.blog-featured-link:hover { color: var(--primary-light); gap: var(--space-sm); }

.blog-actions { text-align: center; margin-top: var(--space-xl); }

/* --- Post detail page --- */
.post-container {
  padding: calc(72px + var(--space-2xl)) var(--container-padding) var(--space-4xl);
  max-width: 820px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  font-size: 0.875rem;
  color: var(--fg-subtle);
}
.breadcrumb a { color: var(--primary-light); font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }

.post { background: transparent; }

.post-header { margin-bottom: var(--space-xl); }
.post-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--fg-subtle);
}
.blog-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary-light);
  background: rgba(58, 190, 249, 0.1);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
}
.post-title {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

.post-hero-img {
  width: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  margin-bottom: var(--space-xl);
}

.post-body { font-size: 1.0625rem; line-height: 1.8; color: var(--fg-muted); }
.post-body h2 {
  font-size: 1.5rem;
  margin: var(--space-2xl) 0 var(--space-md);
  color: var(--fg);
}
.post-body p { margin-bottom: var(--space-lg); }

.post-cta {
  margin-top: var(--space-3xl);
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  text-align: center;
}
.post-cta h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.post-cta p { margin-bottom: var(--space-lg); }

.post-not-found { text-align: center; padding: var(--space-3xl) 0; }
.post-not-found h1 {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-md);
}
.post-not-found p { margin-bottom: var(--space-lg); }

/* --- Page Hero (for blog.html, etc.) --- */
.page-hero {
  padding: calc(72px + var(--space-4xl)) 0 var(--space-3xl);
  text-align: center;
}
.page-title {
  margin-bottom: var(--space-md);
  color: var(--fg);
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-sub { font-size: 1.125rem; color: var(--fg-muted); max-width: 600px; margin: 0 auto; line-height: 1.7; }

/* --- Generic content pages (About / Legal) --- */
.content-page {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: var(--space-4xl);
}
.content-page .content-updated {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xl);
}
.content-page h2 {
  font-size: 1.5rem;
  color: var(--fg);
  margin: var(--space-2xl) 0 var(--space-md);
}
.content-page p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--fg-muted);
  margin-bottom: var(--space-lg);
}
.content-page a { color: var(--primary-light); text-decoration: underline; }
.content-page .content-cta { margin-top: var(--space-2xl); text-align: center; }
.content-page .btn { text-decoration: none; }

/* --- Filter Bar --- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-bottom: var(--space-xl);
}
.filter-btn {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.filter-btn:hover { border-color: var(--primary-light); color: var(--primary-light); }
.filter-btn.is-active { background: var(--grad-primary); border-color: transparent; color: var(--bg); }

/* --- Contact (two columns, hero style) --- */
.section-contact { position: relative; overflow: hidden; }
.section-contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 10% 20%, rgba(53, 114, 239, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(58, 190, 249, 0.08) 0%, transparent 60%);
  pointer-events: none;
}
.section-contact .container { position: relative; z-index: 1; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: var(--space-3xl);
  align-items: start;
}

/* Left column: text + contact details */
.contact-copy { max-width: 480px; }
.contact-copy .eyebrow { margin-bottom: var(--space-md); }
.contact-title {
  margin-bottom: var(--space-lg);
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
}
.contact-sub {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--fg-muted);
  margin-bottom: var(--space-xl);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}
a.contact-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-glow);
}

.contact-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: rgba(58, 190, 249, 0.1);
  color: var(--primary-light);
}
.contact-item-icon svg { width: 22px; height: 22px; }

.contact-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contact-item-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.contact-item-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
}
a.contact-item:hover .contact-item-value { color: var(--primary-light); }

/* Right column: form */
.contact-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: var(--space-xl); box-shadow: var(--shadow-lg); }

.form-group { margin-bottom: var(--space-lg); }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: var(--space-sm);
}
.form-input, .form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--fg);
  transition: all var(--transition-fast);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--fg-subtle); }
.form-input:focus, .form-textarea:focus { 
  border-color: var(--primary-light); 
  outline: none; 
  box-shadow: 0 0 0 3px rgba(58, 190, 249, 0.15); 
}
.form-textarea { min-height: 140px; resize: vertical; }

.form-error {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: var(--space-xs);
  min-height: 1.25rem;
}

.form-submit { width: 100%; margin-top: var(--space-md); padding: 1rem; font-size: 1rem; }

.form-success, .form-error#form-error {
  text-align: center;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-top: var(--space-md);
}
.form-success { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3); color: #4ade80; }
.form-error#form-error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: #f87171; }

/* --- Footer --- */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: var(--space-4xl) 0 var(--space-xl);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

.footer-brand { max-width: 300px; }
.footer-logo img { height: 160px; margin-bottom: var(--space-md); }
.footer-tagline { font-size: 0.875rem; color: var(--fg-muted); line-height: 1.6; margin-bottom: var(--space-lg); }

.footer-social { display: flex; gap: var(--space-md); }
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  transition: all var(--transition-fast);
}
.social-link svg { width: 20px; height: 20px; }
.social-link:hover { 
  border-color: var(--primary-light); 
  color: var(--primary-light); 
  background: rgba(58, 190, 249, 0.08); 
  transform: translateY(-2px); 
}

.footer-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xl); }
.footer-nav-col h4 { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg-subtle); margin-bottom: var(--space-lg); }
.footer-nav-col ul { display: flex; flex-direction: column; gap: var(--space-sm); }
.footer-nav-col a { font-size: 0.875rem; color: var(--fg-muted); transition: color var(--transition-fast); }
.footer-nav-col a:hover { color: var(--primary-light); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}
.copyright { font-size: 0.875rem; color: var(--fg-subtle); }
.footer-note { font-size: 0.875rem; color: var(--fg-subtle); font-family: var(--font-mono); }

/* --- Animations (GSAP targets) --- */
.reveal { opacity: 0; transform: translateY(30px); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Staggered reveal for service/why cards */
.compact-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.compact-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.compact-grid .reveal:nth-child(3) { transition-delay: 0.15s; }
.compact-grid .reveal:nth-child(4) { transition-delay: 0.2s; }
.compact-grid .reveal:nth-child(5) { transition-delay: 0.25s; }
.why-compact-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.why-compact-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.why-compact-grid .reveal:nth-child(3) { transition-delay: 0.15s; }
.why-compact-grid .reveal:nth-child(4) { transition-delay: 0.2s; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-content { max-width: 100%; }
  .hero-ctas { justify-content: center; }
  .hero-visual { max-width: 500px; margin: 0 auto; }
  
  .split-row { grid-template-columns: 1fr; gap: var(--space-2xl); }
  .split-copy { max-width: 100%; text-align: center; }
  .split-copy .eyebrow { text-align: center; }
  .split-copy .btn { display: inline-flex; }
  .split-visual { justify-content: center; }
  /* Restore natural order on mobile: copy first, visual/cards below */
  .features-row .split-copy, .why-row .split-copy { order: 1; }
  .features-row .split-visual, .why-row .split-cards { order: 2; }
  
  .timeline { grid-template-columns: repeat(3, 1fr); }
  
  /* Blog cards stack back to vertical on small screens */
  .blog-row .blog-featured-grid { grid-template-columns: 1fr; }
  .blog-row .blog-featured-card { flex-direction: column; }
  .blog-row .blog-featured-image { width: 100%; }
  .blog-row .blog-featured-content { padding: var(--space-lg); }
  
  .steps-compact { grid-template-columns: 1fr; }
  
  .footer-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; max-width: none; border-bottom: 1px solid var(--border); padding-bottom: var(--space-xl); }
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .contact-copy { max-width: 100%; }
}

@media (max-width: 768px) {
  :root { --space-4xl: 3rem; --space-3xl: 2.5rem; }
  
  .nav-links { display: none; }
  .hero { text-align: center; padding-top: calc(72px + var(--space-3xl)); }
  .hero-ctas { justify-content: center; }
  
  .cards-grid, .steps-grid, .blog-grid-posts { grid-template-columns: 1fr; }
  .why-compact-grid, .compact-steps-grid { grid-template-columns: 1fr; }
  
  /* Timeline becomes vertical with left connector line */
  .timeline { grid-template-columns: 1fr; gap: var(--space-lg); }
  .timeline::before { top: 0; bottom: 0; left: 27px; right: auto; width: 2px; height: auto; }
  .timeline-item { flex-direction: row; align-items: flex-start; text-align: left; gap: var(--space-md); }
  .timeline-node { margin-bottom: 0; flex-shrink: 0; }
  
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-sm); text-align: center; }
}

@media (max-width: 480px) {
  :root { --container-padding: 1rem; }
  .btn { padding: 0.75rem 1.25rem; }
  .footer-nav { grid-template-columns: 1fr; text-align: center; }
}

/* --- Print --- */
@media print {
  .header, .footer, .btn, .contact-form, .hero-visual { display: none !important; }
  .hero { min-height: auto; padding: var(--space-xl) 0; }
  body { background: white !important; color: black !important; }
  a { text-decoration: underline; }
}

/* --- Utility Classes --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-muted { color: var(--fg-muted); }
.text-primary { color: var(--primary-light); }
.mt-auto { margin-top: auto; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }