
:root {
  --background: #fbfaf8;
  --foreground: #181614;
  --card: #ffffff;
  --card-foreground: #181614;
  --popover: #ffffff;
  --popover-foreground: #181614;
  --primary: #181614;
  --primary-foreground: #fbfaf8;
  --secondary: #f4f2ee;
  --secondary-foreground: #181614;
  --muted: #f0eee9;
  --muted-foreground: #736e68;
  --accent: #1e4b5c;
  --accent-soft: #e7eef0;
  --accent-strong: #123340;
  --accent-foreground: #fbfaf8;
  --destructive: #dc2626;
  --destructive-foreground: #dc2626;
  --border: rgba(24, 22, 20, 0.12);
  --border-subtle: rgba(24, 22, 20, 0.08);
  --input: rgba(24, 22, 20, 0.15);
  --ring: #181614;
  
  --font-sans: 'Instrument Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Instrument Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 300;
  letter-spacing: -0.025em;
  color: var(--foreground);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
  text-align: inherit;
}

input, textarea, select {
  font-family: inherit;
  color: inherit;
}

img, svg, canvas {
  display: block;
}

/* Typography Classes */
.font-sans { font-family: var(--font-sans); }
.font-display { font-family: var(--font-sans); font-weight: 300; letter-spacing: -0.025em; }
.font-serif { font-family: var(--font-serif); }
.font-mono { font-family: var(--font-mono); }

/* Font Weights */
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Letter Spacing */
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-normal { letter-spacing: 0em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }

/* Line Heights */
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.05; }
.leading-snug { line-height: 1.375; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.625; }
.leading-loose { line-height: 2; }
.leading-\[0\.98\] { line-height: 0.98; }
.leading-\[1\.05\] { line-height: 1.05; }
.leading-6 { line-height: 1.5rem; }
.leading-7 { line-height: 1.75rem; }
.leading-8 { line-height: 2rem; }

/* Text Sizing Scale */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1.05; }
.text-6xl { font-size: 3.75rem; line-height: 1.05; }
.text-7xl { font-size: 4.5rem; line-height: 1.05; }
.text-8xl { font-size: 6rem; line-height: 1.05; }

/* Heading Scale (restrained, per typography pass) */
.text-hero-h1 { font-size: clamp(2.375rem, 4.5vw, 3.625rem); line-height: 1.05; text-wrap: balance; }
.text-page-h1 { font-size: clamp(2.125rem, 3.5vw, 3rem); line-height: 1.1; }
.text-section-h2 { font-size: clamp(2rem, 3vw, 2.5rem); line-height: 1.1; }
.text-card-h3 { font-size: clamp(1.3125rem, 1.7vw, 1.5rem); line-height: 1.2; }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.italic { font-style: italic; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }
.whitespace-nowrap { white-space: nowrap; }

/* Layout Containers */
.container-custom {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container-custom {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-custom {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.max-w-7xl { max-width: 80rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-xl { max-width: 36rem; }
.max-w-lg { max-width: 32rem; }
.max-w-md { max-width: 28rem; }
.max-w-sm { max-width: 24rem; }
.max-w-xs { max-width: 20rem; }
.max-w-\[1400px\] { max-width: 80rem; }
.max-w-\[1280px\] { max-width: 80rem; }
.max-w-\[1200px\] { max-width: 75rem; }
.max-w-\[1080px\] { max-width: 67.5rem; }
.max-w-\[1040px\] { max-width: 65rem; }
.max-w-\[900px\] { max-width: 56.25rem; }

/* Grid & Flex Utilities */
.flex { display: flex; }
.block { display: block; }
.hidden { display: none; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.self-start { align-self: flex-start; }
.self-end { align-self: flex-end; }
.flex-wrap { flex-wrap: wrap; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.col-span-1 { grid-column: span 1 / span 1; }
.col-span-2 { grid-column: span 2 / span 2; }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-12 { gap: 3rem; }
.gap-14 { gap: 3.5rem; }
.gap-16 { gap: 4rem; }
.gap-20 { gap: 5rem; }
.gap-24 { gap: 6rem; }
.gap-px { gap: 1px; }

/* Spacing Utilities */
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.py-32 { padding-top: 8rem; padding-bottom: 8rem; }
.py-40 { padding-top: 10rem; padding-bottom: 10rem; }

.pt-6 { padding-top: 1.5rem; }
.pt-12 { padding-top: 3rem; }
.pt-28 { padding-top: 7rem; }
.pt-32 { padding-top: 8rem; }
.pt-8 { padding-top: 2rem; }
.pb-6 { padding-bottom: 1.5rem; }
.pb-8 { padding-bottom: 2rem; }
.pb-14 { padding-bottom: 3.5rem; }
.pb-16 { padding-bottom: 4rem; }
.pb-24 { padding-bottom: 6rem; }
.pb-32 { padding-bottom: 8rem; }
.pb-40 { padding-bottom: 10rem; }
.pb-44 { padding-bottom: 11rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-14 { margin-bottom: 3.5rem; }
.mb-16 { margin-bottom: 4rem; }
.mb-24 { margin-bottom: 6rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-14 { margin-top: 3.5rem; }
.mt-16 { margin-top: 4rem; }
.mt-24 { margin-top: 6rem; }

.mx-auto { margin-left: auto; margin-right: auto; }

/* Sizing & Positions */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.bottom-8 { bottom: 2rem; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-px { width: 1px; }
.h-px { height: 1px; }
.w-2 { width: 0.5rem; }
.h-2 { height: 0.5rem; }
.w-3 { width: 0.75rem; }
.h-3 { height: 0.75rem; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.w-11 { width: 2.75rem; }
.h-11 { height: 2.75rem; }
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }
.w-16 { width: 4rem; }
.h-16 { height: 4rem; }
.w-48 { width: 12rem; }
.h-40 { height: 10rem; }
.h-14 { height: 3.5rem; }
.min-h-screen { min-height: 100vh; }
.min-h-32 { min-height: 8rem; }
.min-h-6 { min-height: 1.5rem; }
.h-\[1px\] { height: 1px; }
.z-10 { z-index: 10; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.overflow-hidden { overflow: hidden; }
.overflow-x-hidden { overflow-x: hidden; }
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }
.select-none { user-select: none; }

/* Colors & Borders */
.bg-background { background-color: var(--background); }
.bg-foreground { background-color: var(--foreground); }
.bg-transparent { background-color: transparent; }
.bg-green-500 { background-color: #22c55e; }
.bg-green-400 { background-color: #4ade80; }
.text-foreground { color: var(--foreground); }
.text-background { color: var(--background); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-green-600 { color: #16a34a; }
.text-destructive { color: var(--destructive); }
.text-accent { color: var(--accent); }
.border-accent { border-color: var(--accent); }
.bg-accent-soft { background-color: var(--accent-soft); }
.stat-value { color: var(--accent); }
.link-accent { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.link-accent:hover { color: var(--accent-strong); }

/* Homepage capabilities: six feature rows shown as a card grid. The rows'
   own row layout (lg:flex-row, lg:grid-cols-2) is overridden to stack
   number, illustration, title and text inside each card. */
.capability-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .capability-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.capability {
  border: 1px solid rgba(24, 22, 20, 0.1);
  border-radius: var(--radius);
  background-color: var(--background);
  padding: 1.5rem;
}
.capability > .flex { flex-direction: column; gap: 1rem; }
.capability .grid { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.capability .grid > :last-child { order: -1; justify-content: flex-start; }
.capability .w-48 { width: 8rem; height: 6.5rem; }
.capability .text-card-h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.capability .text-lg { font-size: 1rem; line-height: 1.6; }

/* Decorative labels drawn by CSS so they stay out of the page's text. */
.term-label::after { content: attr(data-label); }

.transition-colors { transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }
.hover\:text-foreground:hover { color: var(--foreground); }
.hover\:text-background:hover { color: var(--background); }
.hover\:text-muted-foreground:hover { color: var(--muted-foreground); }
.hover\:bg-foreground:hover { background-color: var(--foreground); }
.hover\:bg-foreground\/\[0\.04\]:hover { background-color: rgba(24, 22, 20, 0.04); }
.hover\:border-foreground:hover { border-color: var(--foreground); }

.border { border-width: 1px; border-style: solid; border-color: var(--border); }
.border-t { border-top-width: 1px; border-top-style: solid; border-top-color: var(--border); }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: var(--border); }
.border-l { border-left-width: 1px; border-left-style: solid; border-left-color: var(--border); }
.border-r { border-right-width: 1px; border-right-style: solid; border-right-color: var(--border); }
.border-y { border-top-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-bottom-style: solid; border-color: var(--border); }
.border-foreground { border-color: var(--foreground); }
.border-border { border-color: var(--border); }
.border-border-50, .border-border\/50 { border-color: rgba(24, 22, 20, 0.08); }
.border-border-80, .border-border\/80 { border-color: rgba(24, 22, 20, 0.15); }
.border-foreground-10 { border-color: rgba(24, 22, 20, 0.1); }
.border-foreground-20 { border-color: rgba(24, 22, 20, 0.2); }

.bg-card { background-color: var(--card); }
.bg-muted { background-color: var(--muted); }
.bg-muted\/30 { background-color: rgba(240, 238, 233, 0.4); }
.bg-background\/80 { background-color: rgba(251, 250, 248, 0.8); }
.bg-background\/90 { background-color: rgba(251, 250, 248, 0.9); }
.bg-foreground\/70 { background-color: rgba(24, 22, 20, 0.7); }
.bg-foreground\/90 { background-color: rgba(24, 22, 20, 0.9); }
.bg-foreground-10 { background-color: rgba(24, 22, 20, 0.1); }
.bg-muted-foreground\/40 { background-color: rgba(115, 110, 104, 0.4); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: var(--radius-full); }
.rounded-8 { border-radius: 8px; }

.aspect-square { aspect-ratio: 1 / 1; }
.backdrop-blur-xs { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.ring-4 { box-shadow: 0 0 0 4px var(--background); }
.ring-background { box-shadow: 0 0 0 4px var(--background); }

.bg-grid-pattern {
  background-image: linear-gradient(to right, rgba(24, 22, 20, 0.07) 1px, transparent 1px), linear-gradient(to bottom, rgba(24, 22, 20, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}

.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-8 > * + * { margin-top: 2rem; }

/* Shadow */
.shadow-xs { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.03); }

/* Opacities */
.opacity-0 { opacity: 0; }
.opacity-10 { opacity: 0.1; }
.opacity-20 { opacity: 0.2; }
.opacity-25 { opacity: 0.25; }
.opacity-30 { opacity: 0.3; }
.opacity-40 { opacity: 0.4; }
.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }
.opacity-100 { opacity: 1; }

/* Buttons & Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  border-radius: var(--radius-full);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--foreground);
  color: var(--background);
  border: 1px solid var(--foreground);
}

.btn-primary:hover {
  background-color: rgba(24, 22, 20, 0.9);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background-color: var(--accent-soft);
}

.btn-invert {
  background-color: var(--background);
  color: var(--foreground);
  border: 1px solid var(--background);
}

.btn-invert:hover {
  background-color: rgba(251, 250, 248, 0.9);
  transform: translateY(-1px);
}

.btn-lg {
  height: 3.5rem;
  padding-left: 2rem;
  padding-right: 2rem;
  font-size: 1rem;
}

.btn-sm {
  height: 2.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  font-size: 0.875rem;
}

/* Process Step Buttons */
.process-step-btn {
  color: #fbfaf8;
  transition: opacity 0.3s ease, background-color 0.3s ease;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid rgba(251, 250, 248, 0.15);
}

.process-step-btn h3 {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  transition: color 0.3s ease;
}

.process-step-btn p {
  color: rgba(251, 250, 248, 0.72);
  transition: color 0.3s ease;
}

.process-step-btn .step-num {
  color: rgba(251, 250, 248, 0.65);
  transition: color 0.3s ease;
}

/* Active Step */
.process-step-btn.opacity-100 {
  opacity: 1 !important;
}

.process-step-btn.opacity-100 h3 {
  color: #ffffff !important;
  font-weight: 500;
}

.process-step-btn.opacity-100 p {
  color: #ffffff !important;
}

.process-step-btn.opacity-100 .step-num {
  color: #ffffff !important;
}

/* Inactive Step */
.process-step-btn.opacity-40 {
  opacity: 0.75 !important;
}

.process-step-btn.opacity-40:hover {
  opacity: 1 !important;
}

.process-step-btn.opacity-40:hover h3 {
  color: #ffffff !important;
}

.process-step-btn.opacity-40:hover p {
  color: rgba(251, 250, 248, 0.95) !important;
}

.process-step-btn.opacity-40:hover .step-num {
  color: #ffffff !important;
}

/* Form Elements */
.form-input, .form-select, .form-textarea {
  width: 100%;
  min-height: 44px;
  border-radius: 6px;
  border: 1px solid rgba(24, 22, 20, 0.18);
  background-color: transparent;
  padding: 0.65rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--foreground);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--foreground);
  box-shadow: 0 0 0 3px rgba(24, 22, 20, 0.1);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.form-error-msg {
  font-size: 0.8125rem;
  color: var(--destructive);
  margin-top: 0.25rem;
}

/* Header Navigation Bar */
.header-nav {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-nav.scrolled {
  top: 1rem;
  left: 1rem;
  right: 1rem;
}

.nav-container {
  margin-left: auto;
  margin-right: auto;
  max-width: 80rem;
  padding-left: 1rem;
  padding-right: 1rem;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
  .nav-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .nav-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.header-nav.scrolled .nav-container {
  background-color: rgba(251, 250, 248, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(24, 22, 20, 0.1);
  border-radius: 9999px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  max-width: 80rem;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  height: 5rem;
  transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-nav.scrolled .nav-inner {
  height: 3.5rem;
}

.nav-link {
  font-size: 0.875rem;
  color: rgba(24, 22, 20, 0.7);
  transition: color 0.3s;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--foreground);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent);
  transition: width 0.3s;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Mobile Menu Fullscreen Drawer */
.mobile-menu-drawer {
  display: none;
  position: fixed;
  inset: 0;
  background-color: var(--background);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  flex-direction: column;
  justify-content: space-between;
  padding: 7rem 2rem 2.5rem;
}

.mobile-menu-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

/* Case Study Detail Modal */
.case-study-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
  overflow-y: auto;
  background-color: rgba(24, 22, 20, 0.7);
}

.case-study-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.case-study-modal-panel {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 2rem auto;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.3);
  transform: translateY(12px);
  transition: transform 0.3s ease;
}

.case-study-modal.open .case-study-modal-panel {
  transform: translateY(0);
}

.case-study-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--foreground);
  transition: background-color 0.2s, color 0.2s;
}

.case-study-modal-close:hover {
  background-color: var(--muted);
}

.mobile-nav-link {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 1.875rem);
  color: var(--foreground);
  transition: transform 0.3s, color 0.3s;
  display: block;
}

.mobile-nav-link:hover {
  color: var(--muted-foreground);
  transform: translateX(8px);
}

/* Media Queries & Responsive Layouts */
@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:items-center { align-items: center; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .sm\:pt-32 { padding-top: 8rem; }
  .sm\:bottom-10 { bottom: 2.5rem; }
  .sm\:col-span-2 { grid-column: span 2 / span 2; }
  .sm\:p-8 { padding: 2rem; }
  .sm\:p-10 { padding: 2.5rem; }
  .sm\:px-4 { padding-left: 1rem; padding-right: 1rem; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:block { display: block; }
  .md\:hidden { display: none !important; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .md\:text-sm { font-size: 0.875rem; }
  .md\:text-2xl { font-size: 1.5rem; }
  .md\:text-5xl { font-size: 3rem; }
  .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .md\:flex-row { flex-direction: row; }
  .md\:items-end { align-items: flex-end; }
  .md\:justify-between { justify-content: space-between; }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:px-4 { padding-left: 1rem; padding-right: 1rem; }
  .md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .md\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* Header logo mark: always shown. It carries "SDS" itself, so where the full
   wordmark does not fit beside it, "Development Services" is the part that
   gives way, leaving the short "Streamline" name next to the mark. */
.header-logo-img { display: block; }
@media (max-width: 519px), (min-width: 1024px) and (max-width: 1099px) {
  .header-wordmark-rest { display: none; }
}

/* Header lockup and nav switch.
   "Streamline Development Services" is 274px wide at 18px, so the full
   lockup plus six nav links plus the CTA needs about 1100px of header at the
   default sizes. The header is position:fixed, which overflows silently - it
   never produces a scrollbar - so anything that does not fit is simply cut
   off the right edge. Rather than let that happen the header has its own
   breakpoint at 1024px: below it the drawer button, above it the full nav with
   the wordmark and the link gap stepped down until there is room for both at
   their full size (1280px). */
.header-wordmark { font-size: 1.125rem; white-space: nowrap; }

.nav-links, .nav-cta { display: none; }
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
}

@media (min-width: 1024px) {
  .nav-links, .nav-cta { display: flex; }
  .nav-toggle { display: none; }
  .nav-links { gap: 1.5rem; }
  .nav-links a { white-space: nowrap; }
  .header-wordmark { font-size: 1rem; }
}

@media (min-width: 1280px) {
  .nav-links { gap: 3rem; }
  .header-wordmark { font-size: 1.125rem; }
}


@media (min-width: 1024px) {
  .lg\:flex { display: flex; }
  .lg\:hidden { display: none !important; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .lg\:flex-row { flex-direction: row; }
  .lg\:items-start { align-items: flex-start; }
  .lg\:p-10 { padding: 2.5rem; }
  .lg\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:grid-cols-\[1\.1fr_0\.9fr\] { grid-template-columns: 1.1fr 0.9fr; }
  .lg\:grid-cols-\[1fr_0\.78fr\] { grid-template-columns: 1fr 0.78fr; }
  .lg\:grid-cols-\[1fr_0\.74fr\] { grid-template-columns: 1fr 0.74fr; }
  .lg\:grid-cols-\[0\.9fr_1\.1fr\] { grid-template-columns: 0.9fr 1.1fr; }
  .lg\:grid-cols-\[0\.82fr_1\.18fr\] { grid-template-columns: 0.82fr 1.18fr; }
  .lg\:grid-cols-\[0\.78fr_1\.22fr\] { grid-template-columns: 0.78fr 1.22fr; }
  .lg\:grid-cols-\[1fr_0\.86fr\] { grid-template-columns: 1fr 0.86fr; }
  .lg\:grid-cols-\[0\.92fr_1\.08fr\] { grid-template-columns: 0.92fr 1.08fr; }
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
  .lg\:col-span-6 { grid-column: span 6 / span 6; }
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
  .lg\:col-span-12 { grid-column: span 12 / span 12; }
  .lg\:aspect-auto { aspect-ratio: auto; }
  
  .lg\:px-4 { padding-left: 1rem; padding-right: 1rem; }
  .lg\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .lg\:px-12 { padding-left: 2rem; padding-right: 2rem; }
  .lg\:px-16 { padding-left: 4rem; padding-right: 4rem; }
  .lg\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
  .lg\:py-24 { padding-top: 6rem; padding-bottom: 6rem; }
  .lg\:py-32 { padding-top: 8rem; padding-bottom: 8rem; }
  .lg\:py-40 { padding-top: 10rem; padding-bottom: 10rem; }
  .lg\:pt-36 { padding-top: 9rem; }
  .lg\:pb-14 { padding-bottom: 3.5rem; }
  .lg\:pb-24 { padding-bottom: 6rem; }
  .lg\:pb-32 { padding-bottom: 8rem; }
  .lg\:pb-44 { padding-bottom: 11rem; }
  .lg\:mb-10 { margin-bottom: 2.5rem; }
  .lg\:mb-24 { margin-bottom: 6rem; }
  .lg\:mt-20 { margin-top: 5rem; }
  .lg\:gap-8 { gap: 2rem; }
  .lg\:gap-14 { gap: 3.5rem; }
  .lg\:gap-16 { gap: 4rem; }
  .lg\:gap-20 { gap: 5rem; }
  .lg\:gap-24 { gap: 6rem; }

  .lg\:text-5xl { font-size: 3rem; }
  .lg\:text-6xl { font-size: 3.75rem; line-height: 1; }
  .lg\:text-7xl { font-size: 4.5rem; line-height: 1; }
  .lg\:text-\[1\.35rem\] { font-size: 1.35rem; }
  .lg\:leading-9 { line-height: 2.25rem; }
  .lg\:sticky { position: sticky; }
  .lg\:top-28 { top: 7rem; }
  .lg\:top-32 { top: 8rem; }
  .lg\:self-start { align-self: flex-start; }
  .lg\:justify-end { justify-content: flex-end; }
  .lg\:bottom-12 { bottom: 3rem; }
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 45;
  max-width: 34rem;
  margin-left: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(24, 22, 20, 0.12);
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.cookie-banner.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
}

.cookie-banner-text {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted-foreground);
  margin: 0;
}

.cookie-banner-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.cookie-settings-link {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-settings-link:hover {
  color: var(--foreground);
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner { transition: none; }
}

/* Homepage proof strip: project-specific figures with hairline dividers.
   dt precedes dd in the markup for valid HTML; column-reverse shows the
   figure above its label. */
.proof-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin-block: 0;
  background-color: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.proof-item {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 1.25rem 1rem;
  background-color: var(--background);
  text-align: center;
}
.proof-value {
  margin: 0;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  line-height: 1.05;
}
.proof-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
/* Phones: one row per figure, value left and label right, to keep the
   stacked strip short. */
@media (max-width: 639px) {
  .proof-item {
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    text-align: left;
  }
  .proof-value { font-size: 1.75rem; min-width: 5rem; }
}
@media (min-width: 640px) {
  .proof-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .proof-item { padding: 1.75rem 1rem; }
}

/* Compact variant attached under the case-study diagram. */
.proof-strip-compact {
  border-top: 0;
  border-radius: 0 0 8px 8px;
}
.proof-strip-compact .proof-item { padding: 1rem; }
.proof-strip-compact .proof-value { font-size: clamp(1.5rem, 2.4vw, 2rem); }

/* Featured case-study diagram. Below 1024px the stacked mobile SVG is
   served; cap its width so tablets do not blow it up. */
.case-figure { margin: 0; }
.case-diagram {
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  background-color: var(--background);
  overflow: hidden;
}
.case-diagram img {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
}
@media (max-width: 1023px) {
  .case-diagram { padding: 0.5rem 0; }
  .case-diagram img { max-width: 520px; aspect-ratio: 400 / 490; }
}

/* Homepage testimonials. Cards in a row stretch to the tallest; the
   attribution is pushed to the bottom so names line up across cards. */
.testimonial {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0;
}
.testimonial blockquote { margin: 0; }
.testimonial figcaption {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}
.testimonial-secondary { margin-top: 1.5rem; background-color: transparent; }
/* Desktop row: share row tracks across the three cards so quotes, names
   and links line up even though one card has no case-study link. */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 1024px) {
    .testimonial-grid { grid-template-rows: repeat(4, auto); }
    .testimonial-grid .testimonial {
      display: grid;
      grid-row: span 4;
      grid-template-rows: subgrid;
      row-gap: 1.25rem;
    }
    .testimonial-grid .testimonial figcaption { margin-top: 0; }
  }
}
@media (min-width: 1024px) {
  .testimonial-secondary {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: end;
    gap: 2rem;
  }
  .testimonial-secondary figcaption {
    padding-top: 0;
    padding-left: 1.5rem;
    border-top: 0;
    border-left: 1px solid var(--border-subtle);
  }
}
@media (max-width: 639px) {
  .testimonial { gap: 1rem; padding: 1.25rem; }
  .testimonial blockquote p { font-size: 1rem; line-height: 1.65; }
}
