:root {
  --bg: #f4f7fb;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #ffffff;
  --surface-dark: #0f172a;
  --surface-dark-soft: rgba(15, 23, 42, 0.7);
  --text: #0f172a;
  --muted: #475569;
  --line: rgba(148, 163, 184, 0.25);
  --blue: #2563eb;
  --green: #10b981;
  --purple: #8b5cf6;
  --orange: #f97316;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --yellow: #facc15;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(191, 219, 254, 0.75), transparent 32%),
    radial-gradient(circle at bottom left, rgba(187, 247, 208, 0.7), transparent 28%),
    var(--bg);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image: radial-gradient(rgba(15, 23, 42, 0.12) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 82%);
}

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

img,
video {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  min-width: 0;
}

.brand__text {
  display: block;
  min-width: 0;
  font-size: 1rem;
  line-height: 1.08;
}

.brand__mark {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  color: white;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, var(--blue), var(--cyan) 48%, var(--green));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.24);
}

.brand__text small {
  display: none;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
}

.nav-toggle span {
  display: block;
  width: 1.2rem;
  height: 2px;
  margin: 0.22rem auto;
  background: var(--text);
  border-radius: 999px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding-bottom: 0.35rem;
  border-bottom: 2px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--blue);
  border-color: var(--blue);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 999px;
  padding: 0.95rem 1.35rem;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  color: white;
  background: linear-gradient(135deg, var(--text), var(--blue));
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.22);
}

.button--secondary {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--text);
}

.page-hero,
.sub-hero {
  padding: 5.5rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.9);
  color: var(--blue);
}

.eyebrow--soft {
  background: rgba(240, 253, 244, 0.92);
  color: #047857;
}

.hero-title,
.section-title {
  margin: 1rem 0 0.75rem;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.hero-title {
  font-size: clamp(3.2rem, 7vw, 6rem);
  max-width: 11ch;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.gradient-text {
  background: linear-gradient(90deg, var(--blue), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-copy,
.section-intro,
.lead {
  color: var(--muted);
  line-height: 1.8;
}

.hero-copy {
  font-size: 1.08rem;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}

.hero-card,
.glass-card,
.panel,
.media-panel {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: var(--surface);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  min-height: 30rem;
  border-radius: var(--radius-xl);
  overflow: hidden;
  padding: 1.8rem;
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.94), rgba(14, 165, 233, 0.88) 48%, rgba(16, 185, 129, 0.82));
  color: white;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(white 1.6px, transparent 1.6px);
  background-size: 26px 26px;
}

.hero-card__grid {
  position: absolute;
  inset: auto 1.8rem 1.8rem 1.8rem;
  display: grid;
  gap: 1rem;
}

.hero-card__badge,
.mini-chip,
.stack-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  font-weight: 700;
}

.hero-card__badge {
  padding: 0.65rem 0.95rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.glass-card,
.panel,
.media-panel {
  border-radius: var(--radius-lg);
  padding: 1.4rem;
}

.section {
  padding: 3.75rem 0;
}

.section--dark {
  position: relative;
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: white;
  overflow: hidden;
}

.section--dark::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 26%),
    radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.14), transparent 24%),
    radial-gradient(circle at center right, rgba(139, 92, 246, 0.12), transparent 20%);
}

.section--dark .section-intro,
.section--dark .muted,
.section--dark .stat-label,
.section--dark .timeline-item p,
.section--dark .footer-meta {
  color: rgba(226, 232, 240, 0.72);
}

.section--dark .glass-card,
.section--dark .panel,
.section--dark .media-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.68));
  border-color: rgba(148, 163, 184, 0.14);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.28);
}

.section--dark .card-label,
.section--dark .team-role {
  color: rgba(191, 219, 254, 0.86);
}

.section--dark h3,
.section--dark .stat-value,
.section--dark .person-name {
  color: white;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 1.25rem;
}

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

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 800;
}

.feature-card {
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--green));
  opacity: 0.88;
}

.feature-card h3,
.stat-card h3,
.timeline-item h3,
.stack-card h3,
.team-card h3,
.decision-card h3 {
  margin: 0.65rem 0 0.55rem;
  font-size: 1.18rem;
}

.muted {
  color: var(--muted);
  line-height: 1.7;
}

.loop-band {
  position: relative;
}

.loop-band::before {
  content: "";
  position: absolute;
  top: 3rem;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.2), rgba(16, 185, 129, 0.35), rgba(249, 115, 22, 0.2));
}

.loop-card {
  position: relative;
  min-height: 18rem;
}

.loop-card__accent {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
}

.blue { background: rgba(219, 234, 254, 0.92); color: var(--blue); }
.green { background: rgba(220, 252, 231, 0.95); color: #059669; }
.purple { background: rgba(237, 233, 254, 0.95); color: var(--purple); }
.orange { background: rgba(255, 237, 213, 0.95); color: var(--orange); }

.mini-screen {
  margin-top: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.015));
  min-height: 6.8rem;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mini-screen__bar {
  display: flex;
  gap: 0.35rem;
}

.mini-screen__bar span {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.5);
}

.mini-screen__caption {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: rgba(15, 23, 42, 0.65);
}

.stat-card {
  min-height: 15rem;
}

.stat-value {
  font-size: 2.4rem;
  letter-spacing: -0.05em;
  font-weight: 800;
  margin-top: 0.55rem;
}

.stat-label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--muted);
}

.architecture-flow {
  display: grid;
  gap: 0.8rem;
}

.architecture-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: center;
}

.architecture-node {
  position: relative;
  padding: 1rem;
  min-height: 7.2rem;
}

.architecture-node::after {
  content: "→";
  position: absolute;
  right: -0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(148, 163, 184, 0.9);
  font-size: 1.2rem;
}

.architecture-row .architecture-node:last-child::after {
  display: none;
}

.flow-shell {
  position: relative;
  padding: 1.2rem;
  border-radius: calc(var(--radius-lg) + 4px);
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.9)),
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 30%);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 32px 90px rgba(2, 6, 23, 0.34);
}

.flow-shell::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border-radius: calc(var(--radius-lg) - 4px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.flow-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.9rem;
}

.flow-grid::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.3), rgba(16, 185, 129, 0.36), rgba(249, 115, 22, 0.3));
}

.flow-node {
  position: relative;
  min-height: 12.5rem;
  padding: 1rem;
  border-radius: 1.7rem;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  display: grid;
  align-content: start;
  gap: 0.55rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.flow-node::before {
  content: "";
  position: absolute;
  inset: auto -18% -28% auto;
  width: 7rem;
  height: 7rem;
  border-radius: 999px;
  opacity: 0.22;
  filter: blur(6px);
}

.flow-node__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.flow-node h3 {
  margin: 0.15rem 0 0;
  font-size: 1.08rem;
  line-height: 1.1;
}

.flow-node p {
  margin: 0;
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.65;
}

.flow-node__meta {
  margin-top: auto;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(226, 232, 240, 0.66);
}

.flow-node--blue {
  background:
    linear-gradient(160deg, rgba(37, 99, 235, 0.42), rgba(30, 41, 59, 0.8) 70%);
}

.flow-node--blue::before { background: rgba(59, 130, 246, 0.78); }

.flow-node--green {
  background:
    linear-gradient(160deg, rgba(16, 185, 129, 0.38), rgba(30, 41, 59, 0.8) 70%);
}

.flow-node--green::before { background: rgba(16, 185, 129, 0.82); }

.flow-node--purple {
  background:
    linear-gradient(160deg, rgba(139, 92, 246, 0.38), rgba(30, 41, 59, 0.82) 70%);
}

.flow-node--purple::before { background: rgba(168, 85, 247, 0.84); }

.flow-node--orange {
  background:
    linear-gradient(160deg, rgba(249, 115, 22, 0.4), rgba(30, 41, 59, 0.82) 70%);
}

.flow-node--orange::before { background: rgba(249, 115, 22, 0.82); }

.flow-node--pink {
  background:
    linear-gradient(160deg, rgba(236, 72, 153, 0.38), rgba(30, 41, 59, 0.82) 70%);
}

.flow-node--pink::before { background: rgba(236, 72, 153, 0.82); }

.flow-node--cyan {
  background:
    linear-gradient(160deg, rgba(6, 182, 212, 0.4), rgba(30, 41, 59, 0.82) 70%);
}

.flow-node--cyan::before { background: rgba(6, 182, 212, 0.85); }

.timeline {
  position: relative;
  display: grid;
  gap: 1.15rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 1px;
  background: rgba(148, 163, 184, 0.28);
}

.timeline-item {
  position: relative;
  padding-left: 3.1rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 1.3rem;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: white;
  border: 4px solid var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.media-panel {
  min-height: 24rem;
}

.media-frame {
  position: relative;
  min-height: 20rem;
  border-radius: 1.4rem;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(16, 185, 129, 0.08)),
    #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.media-frame > img,
.media-frame > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.media-frame--vivid {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.26), transparent 35%),
    radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.22), transparent 34%),
    linear-gradient(135deg, #111827, #0f172a);
  border: 1px solid rgba(99, 102, 241, 0.22);
}

.media-frame__overlay {
  position: absolute;
  inset: 1.1rem;
  border: 1px dashed rgba(37, 99, 235, 0.38);
  border-radius: 1.1rem;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
}

.media-frame__overlay--glow {
  border-color: rgba(125, 211, 252, 0.32);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0.06));
}

.scanner-line {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.95), transparent);
  animation: scan 2.6s linear infinite;
}

@keyframes scan {
  from { transform: translateY(12px); }
  to { transform: translateY(300px); }
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.stack-chip {
  padding: 0.38rem 0.7rem;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
  font-size: 0.78rem;
}

.decision-grid,
.team-grid,
.footer-grid {
  display: grid;
  gap: 1rem;
}

.decision-grid,
.team-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.team-role {
  display: inline-block;
  margin-bottom: 0.8rem;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--blue);
}

.team-grid--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.person-card {
  position: relative;
  overflow: hidden;
}

.person-card::before {
  content: "";
  position: absolute;
  inset: auto -14% -30% auto;
  width: 8rem;
  height: 8rem;
  border-radius: 999px;
  opacity: 0.18;
}

.person-card--blue::before {
  background: rgba(37, 99, 235, 0.9);
}

.person-card--green::before {
  background: rgba(16, 185, 129, 0.9);
}

.person-name {
  margin: 0.35rem 0 0.55rem;
  font-size: 1.6rem;
  line-height: 1.02;
}

.person-title {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-weight: 700;
}

.person-list {
  margin: 1rem 0 0;
  padding-left: 1rem;
  color: var(--muted);
  line-height: 1.8;
}

.person-list li + li {
  margin-top: 0.35rem;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.evidence-card {
  position: relative;
  min-height: 15.5rem;
  overflow: hidden;
  color: white;
  border-radius: var(--radius-lg);
  padding: 1.45rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.26);
}

.evidence-card::before {
  content: "";
  position: absolute;
  inset: auto -15% -30% auto;
  width: 8rem;
  height: 8rem;
  border-radius: 999px;
  opacity: 0.28;
  filter: blur(8px);
}

.evidence-card > * {
  position: relative;
  z-index: 1;
}

.evidence-card .stat-label,
.evidence-card .muted {
  color: rgba(239, 246, 255, 0.82);
}

.evidence-card--blue {
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.95), rgba(30, 64, 175, 0.92));
}

.evidence-card--blue::before { background: rgba(125, 211, 252, 0.9); }

.evidence-card--purple {
  background: linear-gradient(145deg, rgba(109, 40, 217, 0.94), rgba(139, 92, 246, 0.9));
}

.evidence-card--purple::before { background: rgba(216, 180, 254, 0.9); }

.evidence-card--green {
  background: linear-gradient(145deg, rgba(4, 120, 87, 0.94), rgba(16, 185, 129, 0.88));
}

.evidence-card--green::before { background: rgba(167, 243, 208, 0.92); }

.evidence-highlight {
  position: relative;
  overflow: hidden;
}

.evidence-highlight::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.14), transparent 26%);
  pointer-events: none;
}

.footer {
  padding: 2.8rem 0 4rem;
}

.footer-grid {
  grid-template-columns: 1.2fr 1fr;
  align-items: end;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: flex-end;
}

.footer-link {
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  color: var(--muted);
}

.footer-meta {
  margin-top: 0.8rem;
  color: var(--muted);
}

.subnav {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.subnav a {
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--muted);
  font-weight: 700;
}

.image-slot-grid {
  display: grid;
  gap: 1rem;
}

.image-slot-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.image-slot-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.image-slot {
  position: relative;
  overflow: hidden;
  min-height: 16rem;
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(148, 163, 184, 0.4);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.58)),
    var(--surface);
  box-shadow: var(--shadow);
}

.image-slot::before {
  content: "";
  position: absolute;
  inset: auto -16% -28% auto;
  width: 7rem;
  height: 7rem;
  border-radius: 999px;
  opacity: 0.18;
  filter: blur(8px);
}

.image-slot > * {
  position: relative;
  z-index: 1;
}

.image-slot__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
}

.image-slot h3 {
  margin: 0.8rem 0 0.5rem;
  font-size: 1.2rem;
}

.image-slot p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.image-slot__path {
  margin-top: 1rem;
  display: inline-block;
  padding: 0.5rem 0.7rem;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--text);
}

.image-slot__hint {
  margin-top: 0.8rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.image-slot__media,
.image-slot__video {
  width: 100%;
  margin-top: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.04);
  display: block;
}

.image-slot__media {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.image-slot__media--landscape {
  aspect-ratio: 16 / 9;
}

.image-slot__media--card {
  aspect-ratio: 16 / 10;
}

.image-slot__media--contain {
  object-fit: contain;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.75rem;
}

.image-slot__media--portrait {
  aspect-ratio: 9 / 16;
  object-position: center top;
}

.image-slot__media--focus-top {
  object-position: center 18%;
}

.image-slot__media--focus-mid {
  object-position: center 34%;
}

.image-slot__media--focus-low {
  object-position: center 46%;
}

.image-slot__video {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.external-credit {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  line-height: 1.55;
  color: rgba(71, 85, 105, 0.88);
}

.external-credit a {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.video-embed {
  position: relative;
  overflow: hidden;
  border-radius: 1.3rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #020617;
  box-shadow: var(--shadow);
  align-self: start;
}

.video-embed video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
}

.video-embed--portrait video {
  aspect-ratio: 9 / 16;
}

.grid-2--top {
  align-items: start;
}

.demo-feature-video {
  max-width: 100%;
}

.image-slot--blue::before { background: rgba(59, 130, 246, 0.92); }
.image-slot--green::before { background: rgba(16, 185, 129, 0.92); }
.image-slot--purple::before { background: rgba(168, 85, 247, 0.92); }
.image-slot--orange::before { background: rgba(249, 115, 22, 0.92); }
.image-slot--pink::before { background: rgba(236, 72, 153, 0.92); }
.image-slot--cyan::before { background: rgba(6, 182, 212, 0.92); }

.section--dark .image-slot {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.68)),
    rgba(15, 23, 42, 0.64);
  border-color: rgba(148, 163, 184, 0.22);
}

.section--dark .image-slot__badge {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.section--dark .image-slot p,
.section--dark .image-slot__hint {
  color: rgba(226, 232, 240, 0.78);
}

.section--dark .image-slot__path {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(248, 250, 252, 0.92);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .page-hero,
  .sub-hero {
    padding: 4.5rem 0 2.5rem;
  }

  .hero-grid,
  .grid-4,
  .grid-3,
  .grid-2,
  .decision-grid,
  .team-grid,
  .footer-grid,
  .stack-grid,
  .architecture-row,
  .flow-grid,
  .evidence-grid,
  .team-grid--duo {
    grid-template-columns: 1fr;
  }

  .loop-band::before,
  .timeline::before,
  .architecture-node::after,
  .flow-grid::before {
    display: none;
  }

  .hero-card {
    min-height: auto;
    padding: 1.4rem;
  }

  .hero-card__grid {
    position: relative;
    inset: auto;
    margin-top: 8.5rem;
  }

  .hero-title {
    max-width: none;
  }

  .site-header__inner {
    align-items: flex-start;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.65rem);
    right: 1rem;
    left: 1rem;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border-radius: 1.4rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow);
    display: none;
  }

  .site-nav a {
    display: block;
    width: 100%;
    padding: 0.65rem 0;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-toggle {
    display: block;
    flex: 0 0 auto;
  }
}

@media (max-width: 640px) {
  body::before {
    opacity: 0.2;
  }

  .container {
    width: min(100% - 1.25rem, var(--max-width));
  }

  .site-header__inner {
    padding: 0.85rem 0;
    gap: 0.75rem;
  }

  .brand {
    gap: 0.7rem;
    padding-right: 0.5rem;
  }

  .brand__mark {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 0.75rem;
    font-size: 0.76rem;
  }

  .brand__text {
    font-size: 0.96rem;
    line-height: 1.02;
  }

  .page-hero,
  .sub-hero {
    padding: 3.85rem 0 2rem;
  }

  .section {
    padding: 2.6rem 0;
  }

  .hero-title {
    font-size: clamp(2.5rem, 13vw, 3.55rem);
    line-height: 0.93;
    margin-top: 0.85rem;
  }

  .section-title {
    font-size: clamp(1.7rem, 10vw, 2.45rem);
    line-height: 0.98;
    margin-top: 0.8rem;
  }

  .hero-copy,
  .section-intro,
  .lead,
  .muted,
  .image-slot p,
  .external-credit {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .eyebrow,
  .image-slot__badge,
  .card-label,
  .team-role,
  .stat-label {
    letter-spacing: 0.12em;
  }

  .hero-actions,
  .subnav {
    gap: 0.75rem;
  }

  .hero-actions .button,
  .subnav a {
    width: 100%;
    justify-content: center;
  }

  .hero-card {
    border-radius: 1.5rem;
    padding: 1.1rem;
  }

  .hero-card__badge {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-card__grid {
    margin-top: 6.5rem;
    gap: 0.85rem;
  }

  .glass-card,
  .panel,
  .media-panel,
  .image-slot,
  .evidence-card {
    border-radius: 1.35rem;
    padding: 1.1rem;
  }

  .feature-card h3,
  .stat-card h3,
  .timeline-item h3,
  .stack-card h3,
  .team-card h3,
  .decision-card h3,
  .image-slot h3,
  .flow-node h3 {
    font-size: 1.02rem;
    line-height: 1.2;
  }

  .stat-value {
    font-size: 2rem;
  }

  .timeline {
    gap: 0.95rem;
  }

  .timeline-item {
    padding-left: 2.35rem;
  }

  .timeline-item::before {
    left: 0.35rem;
    top: 1.15rem;
    width: 0.9rem;
    height: 0.9rem;
  }

  .media-panel,
  .media-frame {
    min-height: 17rem;
  }

  .video-embed {
    border-radius: 1rem;
  }

  .video-embed video,
  .image-slot__media--landscape,
  .image-slot__media--card,
  .image-slot__video {
    aspect-ratio: 16 / 10;
  }

  .image-slot {
    min-height: auto;
  }

  .image-slot__media,
  .image-slot__video {
    margin-top: 0.85rem;
    border-radius: 0.9rem;
  }

  .image-slot__media--contain {
    padding: 0.45rem;
  }

  .flow-shell {
    padding: 0.85rem;
    border-radius: 1.35rem;
  }

  .flow-node {
    min-height: auto;
    gap: 0.45rem;
    border-radius: 1.2rem;
  }

  .flow-node__meta {
    margin-top: 0.4rem;
  }

  .decision-grid,
  .team-grid,
  .footer-grid,
  .image-slot-grid,
  .evidence-grid {
    gap: 0.9rem;
  }

  body[data-page="home"] .image-slot-grid--3 {
    grid-template-columns: 1fr;
  }

  body[data-page="home"] .image-slot-grid--3 .image-slot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 7.25rem;
    grid-template-areas:
      "badge image"
      "title image"
      "text image";
    align-items: start;
    column-gap: 0.9rem;
    row-gap: 0.35rem;
  }

  body[data-page="home"] .image-slot-grid--3 .image-slot__badge {
    grid-area: badge;
    width: max-content;
    max-width: 100%;
  }

  body[data-page="home"] .image-slot-grid--3 .image-slot h3 {
    grid-area: title;
    margin: 0;
    align-self: end;
  }

  body[data-page="home"] .image-slot-grid--3 .image-slot p {
    grid-area: text;
    font-size: 0.94rem;
    line-height: 1.58;
  }

  body[data-page="home"] .image-slot-grid--3 .image-slot__media {
    grid-area: image;
    margin-top: 0;
    width: 100%;
    height: 100%;
    min-height: 7.25rem;
    aspect-ratio: 1 / 1;
    align-self: stretch;
  }

  .footer {
    padding: 2.2rem 0 3rem;
  }

  .footer-grid {
    align-items: start;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .footer-link {
    width: 100%;
    text-align: center;
  }
}
