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

:root {
  --accent: #6366f1;
  --accent-light: #818cf8;
  --void: #0a0a0f;
  --surface: #111118;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background-color: var(--void);
  color: #fff;
  line-height: 1.6;
}

.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.1;
}

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

code, pre {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

/* === Layout === */
.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-lg { max-width: 32rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.hidden { display: none; }
.block { display: block; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-1 { flex: 1 1 0%; }
.order-1 { order: 1; }
.order-2 { order: 2; }

.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.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-x-12 { column-gap: 3rem; }
.gap-y-6 { row-gap: 1.5rem; }

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* === Spacing === */
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.pt-16 { padding-top: 4rem; }
.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-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mb-24 { margin-bottom: 6rem; }
.mb-28 { margin-bottom: 7rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.ml-auto { margin-left: auto; }
.ml-2 { margin-left: 0.5rem; }
.ml-1 { margin-left: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }

/* === Sizing === */
.w-2 { width: 0.5rem; }
.w-3 { width: 0.75rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-full { width: 100%; }
.h-2 { height: 0.5rem; }
.h-3 { height: 0.75rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-16 { height: 4rem; }
.min-h-screen { min-height: 100vh; }

/* === Positioning === */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.inset-x-0 { left: 0; right: 0; }
.top-0 { top: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.pointer-events-none { pointer-events: none; }
.select-none { user-select: none; }

.-translate-x-1\/2 { transform: translateX(-50%); }
.-translate-y-1\/2 { transform: translateY(-50%); }
.top-1\/2 { top: 50%; }
.left-1\/2 { left: 50%; }
.top-1\/4 { top: 25%; }
.right-1\/4 { right: 25%; }
.top-0.right-0 { top: 0; right: 0; }

/* === Colors & Backgrounds === */
.bg-void { background-color: var(--void); }
.text-white { color: #fff; }
.text-accent { color: var(--accent-light); }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.font-mono { font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-widest { letter-spacing: 0.1em; }
.uppercase { text-transform: uppercase; }
.leading-relaxed { line-height: 1.625; }
.leading-\[0\.95\] { line-height: 0.95; }
.whitespace-pre { white-space: pre; }

/* === Opacity text utilities === */
.text-white\/30 { color: rgba(255, 255, 255, 0.3); }
.text-white\/40 { color: rgba(255, 255, 255, 0.4); }
.text-white\/50 { color: rgba(255, 255, 255, 0.5); }
.text-white\/60 { color: rgba(255, 255, 255, 0.6); }
.text-white\/70 { color: rgba(255, 255, 255, 0.7); }
.text-white\/80 { color: rgba(255, 255, 255, 0.8); }

.text-accent\/70 { color: rgba(99, 102, 241, 0.7); }
.text-accent\/80 { color: rgba(129, 140, 248, 0.8); }

.text-emerald-400 { color: #34d399; }
.text-emerald-400\/60 { color: rgba(52, 211, 153, 0.6); }
.text-emerald-400\/80 { color: rgba(52, 211, 153, 0.8); }
.text-purple-400 { color: #c084fc; }
.text-red-400 { color: #f87171; }
.text-yellow-400 { color: #facc15; }
.text-blue-400 { color: #60a5fa; }

/* === Borders === */
.border { border-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-y { border-top-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-bottom-style: solid; }
.border-white\/5 { border-color: rgba(255, 255, 255, 0.05); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.border-emerald-500\/20 { border-color: rgba(16, 185, 129, 0.2); }

.rounded-full { border-radius: 9999px; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-lg { border-radius: 0.5rem; }

/* === Background utilities === */
.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05); }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-white\/\[0\.02\] { background-color: rgba(255, 255, 255, 0.02); }
.bg-emerald-400 { background-color: #34d399; }
.bg-emerald-500\/5 { background-color: rgba(16, 185, 129, 0.05); }
.bg-accent\/5 { background-color: rgba(99, 102, 241, 0.05); }
.bg-accent\/10 { background-color: rgba(99, 102, 241, 0.1); }
.bg-purple-500\/5 { background-color: rgba(168, 85, 247, 0.05); }
.bg-purple-500\/10 { background-color: rgba(168, 85, 247, 0.1); }
.bg-emerald-500\/10 { background-color: rgba(16, 185, 129, 0.1); }
.bg-black\/40 { background-color: rgba(0, 0, 0, 0.4); }

/* === Blur / Shadow === */
.blur-\[120px\] { filter: blur(120px); }
.blur-\[100px\] { filter: blur(100px); }
.blur-\[80px\] { filter: blur(80px); }
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.shadow-black\/40 { --tw-shadow-color: rgba(0, 0, 0, 0.4); }

/* === Transition === */
.transition-colors { transition-property: color, background-color, border-color; transition-duration: 150ms; transition-timing-function: ease; }
.transition-all { transition-property: all; transition-duration: 300ms; transition-timing-function: ease; }
.duration-300 { transition-duration: 300ms; }

/* === Gradient Text === */
.text-gradient {
  background: linear-gradient(135deg, var(--accent-light) 0%, #c084fc 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--from), transparent, var(--to));
}

.bg-gradient-to-b {
  background-image: linear-gradient(to bottom, transparent, var(--via), transparent);
}

/* === Hero Logo === */
.hero-logo {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.3)) drop-shadow(0 0 80px rgba(6, 182, 212, 0.15));
}

@media (min-width: 640px) {
  .hero-logo { width: 160px; }
}

@media (min-width: 1024px) {
  .hero-logo { width: 200px; }
}

/* === Hero Grid === */
.hero-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* === Nav === */
#nav {
  background: transparent;
  border-bottom: 1px solid transparent;
}

.nav-scrolled {
  background: rgba(10, 10, 15, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

/* === Buttons === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  transition: all 200ms ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 200ms ease;
  cursor: pointer;
}

.btn-ghost:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

/* === Feature Cards === */
.feature-card {
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  transition: all 300ms ease;
}

.feature-card:hover {
  border-color: rgba(99, 102, 241, 0.2);
  background: rgba(99, 102, 241, 0.03);
  transform: translateY(-2px);
}

.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent-light);
  transition: all 300ms ease;
}

.feature-card:hover .feature-icon {
  background: rgba(99, 102, 241, 0.15);
}

/* === Pipeline Stages (chevron flow) === */
.pipeline-stage {
  position: relative;
  min-width: 0;
}

.pipeline-stage-inner {
  position: relative;
  padding: 1.25rem 1.25rem 1.25rem 2rem;
  height: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: none;
  border-right: none;
  transition: all 300ms ease;
}

.pipeline-stage:hover .pipeline-stage-inner {
  background: rgba(99, 102, 241, 0.04);
  border-color: rgba(99, 102, 241, 0.25);
}

/* Chevron arrow on the right of every stage except the last */
.pipeline-stage:not(.pipeline-last) .pipeline-stage-inner::after {
  content: "";
  position: absolute;
  top: 0;
  right: -18px;
  width: 36px;
  height: 100%;
  background: inherit;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  clip-path: polygon(0 0, 50% 50%, 0 100%);
  transform-origin: left center;
  z-index: 2;
  transition: all 300ms ease;
}

.pipeline-stage:hover:not(.pipeline-last) .pipeline-stage-inner::after {
  background: rgba(99, 102, 241, 0.04);
  border-color: rgba(99, 102, 241, 0.25);
}

/* Notch on the left of every stage except the first (so the previous chevron slots in visually) */
.pipeline-stage:not(.pipeline-first) .pipeline-stage-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 100%;
  background: var(--void);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  z-index: 1;
}

/* First and last stages get rounded outer corners */
.pipeline-first .pipeline-stage-inner {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
}

.pipeline-last .pipeline-stage-inner {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

@media (max-width: 1023px) {
  /* Stack vertically on mobile: downward chevrons instead of rightward */
  .pipeline-stage-inner {
    padding: 1.25rem;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.5rem;
  }
  .pipeline-stage:not(.pipeline-last) .pipeline-stage-inner::after,
  .pipeline-stage:not(.pipeline-first) .pipeline-stage-inner::before {
    display: none;
  }
  .pipeline-stage:not(.pipeline-last)::after {
    content: "";
    display: block;
    margin: 4px auto;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(99, 102, 241, 0.5);
  }
}

/* === Flow Arrows (How Vectis shipping works) === */
/* Each step is a vertical chevron card. The bottom point nests into the next
   card's top notch so the shipping flow reads as a single stacked sequence. */
.flow-arrows {
  gap: 0;
}

.flow-arrow {
  position: relative;
  min-width: 0;
  margin-top: -18px;
}

.flow-arrow:first-child {
  margin-top: 0;
}

.flow-arrow-inner {
  position: relative;
  height: 100%;
  padding: 2.25rem 1.5rem 2.75rem;
  background: rgba(99, 102, 241, 0.08);
  text-align: center;
  transition: background 300ms ease;
  clip-path: polygon(0 0, 50% 22px, 100% 0, 100% calc(100% - 22px), 50% 100%, 0 calc(100% - 22px));
}

.flow-arrow:hover .flow-arrow-inner {
  background: rgba(99, 102, 241, 0.18);
}

.flow-arrow:nth-child(1) .flow-arrow-inner {
  background: rgba(99, 102, 241, 0.12);
}

.flow-arrow:nth-child(1):hover .flow-arrow-inner {
  background: rgba(99, 102, 241, 0.22);
}

.flow-arrow:nth-child(1) .feature-icon {
  background: rgba(99, 102, 241, 0.16);
}

.flow-arrow:nth-child(1) .text-accent\/80 {
  color: #a5b4fc;
}

.flow-arrow:nth-child(2) .flow-arrow-inner {
  background: rgba(14, 165, 233, 0.12);
}

.flow-arrow:nth-child(2):hover .flow-arrow-inner {
  background: rgba(14, 165, 233, 0.22);
}

.flow-arrow:nth-child(2) .feature-icon {
  background: rgba(14, 165, 233, 0.16);
}

.flow-arrow:nth-child(2) .text-accent\/80 {
  color: #7dd3fc;
}

.flow-arrow:nth-child(3) .flow-arrow-inner {
  background: rgba(16, 185, 129, 0.12);
}

.flow-arrow:nth-child(3):hover .flow-arrow-inner {
  background: rgba(16, 185, 129, 0.22);
}

.flow-arrow:nth-child(3) .feature-icon {
  background: rgba(16, 185, 129, 0.16);
}

.flow-arrow:nth-child(3) .text-accent\/80 {
  color: #6ee7b7;
}

.flow-arrow:nth-child(4) .flow-arrow-inner {
  background: rgba(249, 115, 22, 0.12);
}

.flow-arrow:nth-child(4):hover .flow-arrow-inner {
  background: rgba(249, 115, 22, 0.22);
}

.flow-arrow:nth-child(4) .feature-icon {
  background: rgba(249, 115, 22, 0.16);
}

.flow-arrow:nth-child(4) .text-accent\/80 {
  color: #fdba74;
}

.flow-arrow-inner h5 {
  font-size: 1.125rem;
  line-height: 1.35;
}

.flow-arrow-inner p {
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* First step: flat top edge */
.flow-arrow:first-child .flow-arrow-inner {
  padding-top: 1.5rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), 50% 100%, 0 calc(100% - 22px));
}

/* Last step: flat bottom edge */
.flow-arrow:last-child .flow-arrow-inner {
  padding-bottom: 1.75rem;
  clip-path: polygon(0 0, 50% 22px, 100% 0, 100% 100%, 0 100%);
}

/* Single step (only child): plain rectangle */
.flow-arrow:first-child:last-child .flow-arrow-inner {
  clip-path: none;
}

@media (max-width: 639px) {
  .flow-arrows {
    row-gap: 0.25rem;
  }
  .flow-arrow { margin-top: -10px; }
  .flow-arrow:first-child { margin-top: 0; }
}

/* === Screenshot Frames === */
.screenshot-frame {
  position: relative;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.04);
  transition: all 350ms ease;
}

.screenshot-frame:hover {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(99, 102, 241, 0.15), 0 0 60px -20px rgba(99, 102, 241, 0.25);
  transform: translateY(-3px);
}

.screenshot-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.screenshot-frame .chrome {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 0.875rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.screenshot-frame .chrome .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
}

.showcase-tile {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.showcase-tile .caption {
  padding: 0 0.25rem;
}

.showcase-tile .caption h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.25rem;
}

.showcase-tile .caption p {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
}

.showcase-group-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  margin-bottom: 1rem;
}

.showcase-group-label::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--accent-light);
  opacity: 0.6;
}

/* === Stack Cards === */
.stack-card {
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  transition: all 300ms ease;
}

.stack-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.stack-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stack-card-icon {
  flex-shrink: 0;
  border-radius: 0.25rem;
}

/* === Architecture Diagram === */
.arch-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.arch-layer {
  width: 100%;
  max-width: 640px;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.arch-layer-top {
  background: rgba(99, 102, 241, 0.04);
  border-color: rgba(99, 102, 241, 0.15);
}

.arch-layer-api {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.2);
}

.arch-layer-infra {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
  padding: 1rem 1.25rem;
}

.arch-layer-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.625rem;
}

.arch-layer-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.arch-chip {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  padding: 0.375rem 0.875rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.arch-chip-sub {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 400;
  margin-left: 0.25rem;
}

.arch-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0;
}

.arch-connector-line {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.arch-connector-label {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.25);
  padding: 0.125rem 0.5rem;
}

.arch-infra-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.arch-infra-chip {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid;
  background: rgba(0, 0, 0, 0.2);
}

@media (max-width: 639px) {
  .arch-layer { padding: 1rem; }
  .arch-chip { font-size: 0.6875rem; padding: 0.3rem 0.625rem; }
  .arch-chip-sub { display: block; margin-left: 0; margin-top: 0.125rem; font-size: 0.625rem; }
  .arch-infra-chip { font-size: 0.625rem; padding: 0.3rem 0.5rem; }
}

/* === Architecture Cards === */
.arch-card {
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  transition: all 300ms ease;
}

.arch-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

/* === Module Tags === */
.module-tag {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  transition: all 300ms ease;
}

.module-tag-text {
  display: flex;
  flex-direction: column;
}

.module-tag-name {
  font-weight: 500;
  line-height: 1.2;
}

.module-tag-desc {
  font-size: 0.6875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.25);
  line-height: 1.3;
  margin-top: 0.125rem;
}

.module-tag:hover {
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--accent-light);
  background: rgba(99, 102, 241, 0.05);
}

.module-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  opacity: 0.5;
  margin-top: 0.125rem;
  transition: opacity 300ms ease;
}

.module-tag:hover .module-icon {
  opacity: 1;
}

/* === Table === */
table {
  border-collapse: collapse;
}

th, td {
  text-align: left;
}

/* === Animations === */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-in {
  animation: fade-in 0.8s ease forwards;
}

.animate-fade-in-up {
  animation: fade-in-up 0.8s ease forwards;
  opacity: 0;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animation-delay-100 {
  animation-delay: 100ms;
}

.animation-delay-200 {
  animation-delay: 200ms;
}

.animation-delay-300 {
  animation-delay: 300ms;
}

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.grid .animate-on-scroll:nth-child(1) { transition-delay: 0ms; }
.grid .animate-on-scroll:nth-child(2) { transition-delay: 50ms; }
.grid .animate-on-scroll:nth-child(3) { transition-delay: 100ms; }
.grid .animate-on-scroll:nth-child(4) { transition-delay: 150ms; }
.grid .animate-on-scroll:nth-child(5) { transition-delay: 200ms; }
.grid .animate-on-scroll:nth-child(6) { transition-delay: 250ms; }
.grid .animate-on-scroll:nth-child(7) { transition-delay: 300ms; }
.grid .animate-on-scroll:nth-child(8) { transition-delay: 350ms; }
.grid .animate-on-scroll:nth-child(9) { transition-delay: 400ms; }
.grid .animate-on-scroll:nth-child(10) { transition-delay: 450ms; }
.grid .animate-on-scroll:nth-child(11) { transition-delay: 500ms; }
.grid .animate-on-scroll:nth-child(12) { transition-delay: 550ms; }
.grid .animate-on-scroll:nth-child(13) { transition-delay: 600ms; }
.grid .animate-on-scroll:nth-child(14) { transition-delay: 650ms; }
.grid .animate-on-scroll:nth-child(15) { transition-delay: 700ms; }
.grid .animate-on-scroll:nth-child(n+16) { transition-delay: 750ms; }

/* === Hover === */
.hover\:text-white:hover { color: #fff; }
.hover\:text-white\/60:hover { color: rgba(255, 255, 255, 0.6); }

/* === Gradient backgrounds for sections === */
section .bg-gradient-to-b {
  background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.02), transparent);
}

/* === Mobile Menu === */
#mobile-menu {
  display: none;
}

#mobile-menu.open {
  display: block;
}

.mobile-nav-link {
  display: block;
  padding: 0.625rem 0;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: color 150ms ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  color: #fff;
}

/* === Mobile utility classes === */
.sm\:inline-flex { display: none; }

/* === Mobile-first fixes === */
@media (max-width: 639px) {
  /* Hero: don't force full viewport height on small screens */
  .hero-section {
    min-height: auto;
    padding-top: 5rem;
    padding-bottom: 4rem;
  }

  .hero-logo { width: 80px; margin-bottom: 1.5rem; }

  h1.text-5xl { font-size: 2rem; line-height: 0.95; margin-bottom: 1rem; }
  h2.text-3xl { font-size: 1.5rem; }

  .py-24 { padding-top: 3rem; padding-bottom: 3rem; }
  .py-16 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .mb-16 { margin-bottom: 2.5rem; }
  .mb-8 { margin-bottom: 1.25rem; }
  .mb-10 { margin-bottom: 1.5rem; }
  .mt-16 { margin-top: 2rem; }
  .mt-12 { margin-top: 2rem; }

  .px-6 { padding-left: 1.25rem; padding-right: 1.25rem; }

  /* Sub-heading text */
  .text-lg { font-size: 0.9375rem; line-height: 1.5; }

  /* Terminal preview */
  .terminal-preview .p-5 { padding: 0.875rem; }
  .terminal-preview .font-mono { font-size: 0.75rem; }

  /* Buttons: full-width, stacked tight */
  .btn-primary, .btn-ghost {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    box-sizing: border-box;
  }

  .gap-4 { gap: 0.625rem; }

  /* Built-with bar: 3-column grid */
  .tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1.5rem;
  }

  .tech-icon { font-size: 0.75rem; }

  /* Feature / arch / stack cards */
  .feature-card, .stack-card { padding: 1.125rem; }
  .stack-card-header { gap: 0.625rem; margin-bottom: 0.75rem; }
  .stack-card-icon { width: 20px; height: 20px; }

  .arch-card pre,
  .arch-card .font-mono {
    font-size: 0.625rem;
  }

  /* Table */
  table { font-size: 0.75rem; }
  table th, table td { padding: 0.5rem 0.375rem; }

  /* Section headings */
  .text-accent.text-sm { font-size: 0.6875rem; margin-bottom: 0.375rem; }

  /* Module grid: force 2-col on mobile */
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem;
  }
  .module-tag { padding: 0.5rem 0.5rem; font-size: 0.6875rem; }
  .module-tag-desc { font-size: 0.5625rem; }
  .module-icon { width: 0.75rem; height: 0.75rem; margin-top: 0.125rem; }

  /* Hamburger button: show on mobile */
  #mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  #mobile-menu-btn:active {
    background: rgba(255, 255, 255, 0.05);
  }
}

/* === Table horizontal scroll on small screens === */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* === Responsive === */
@media (min-width: 640px) {
  .sm\:flex { display: flex; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:inline-flex { display: inline-flex; }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:mb-32 { margin-bottom: 8rem; }
  .sm\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .sm\:text-6xl { font-size: 3.75rem; line-height: 1; }
  .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .sm\:p-10 { padding: 2.5rem; }
  .sm\:p-14 { padding: 3.5rem; }
  .sm\:py-32 { padding-top: 8rem; padding-bottom: 8rem; }
  .hidden.sm\:flex { display: flex; }
  .sm\:inline { display: inline; }
  .sm\:block { display: block; }
}

@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:text-5xl { font-size: 3rem; line-height: 1; }
  .md\:text-7xl { font-size: 4.5rem; line-height: 1; }
}

@media (min-width: 1024px) {
  .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-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lg\:gap-16 { gap: 4rem; }
  .lg\:order-1 { order: 1; }
  .lg\:order-2 { order: 2; }
  .lg\:text-8xl { font-size: 6rem; line-height: 1; }
}

/* === Hidden breakpoint utility === */
@media (max-width: 639px) {
  .hidden.sm\:flex { display: none; }
}

@media (max-width: 767px) {
  .hidden.md\:flex { display: none; }
  .hidden.sm\:inline { display: none; }
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--void);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* === Built-with tech icons === */
.tech-icon {
  opacity: 0.6;
  transition: opacity 200ms ease;
}

.tech-icon:hover {
  opacity: 1;
}

/* === Selection === */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: #fff;
}
