:root {
  color-scheme: light;
  --bg: #f6f9fc;
  --surface: #ffffff;
  --surface-2: #edf4fb;
  --ink: #0a1424;
  --muted: #607086;
  --line: #d8e4ef;
  --blue: #1457d9;
  --navy: #082653;
  --cyan: #12bfd1;
  --green: #13a56b;
  --shadow: 0 18px 55px rgba(10, 20, 36, 0.12);
  --radius: 10px;
  --max: 1180px;
  --title: "Aptos Display", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Aptos", "Segoe UI", "Helvetica Neue", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07101b;
  --surface: #0d1a2a;
  --surface-2: #13243a;
  --ink: #eef6ff;
  --muted: #a9b8ca;
  --line: #25384f;
  --blue: #76a9ff;
  --navy: #dbe9ff;
  --cyan: #36d9e5;
  --green: #55d69e;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topnav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,
.btn,
.subnav a,
.card-link {
  text-decoration: none;
  font-weight: 850;
}

.brand {
  color: var(--navy);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn,
.theme-toggle {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.btn {
  padding: 0.72rem 0.95rem;
}

.btn.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.theme-toggle {
  width: 42px;
}

.product-hero {
  position: relative;
  overflow: hidden;
  padding: 5.5rem 0 3.5rem;
  background:
    linear-gradient(105deg, color-mix(in srgb, var(--bg) 98%, transparent) 0%, color-mix(in srgb, var(--bg) 86%, transparent) 48%, color-mix(in srgb, var(--blue) 20%, transparent) 100%),
    url("https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&w=1800&q=80") center / cover;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.78fr);
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--title);
  color: var(--navy);
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  margin-top: 1rem;
  font-size: clamp(3rem, 7vw, 6.2rem);
  max-width: 920px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.8rem);
}

h3 {
  font-size: 1.18rem;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-actions,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.product-panel {
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 900;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.mini-card {
  min-height: 112px;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.mini-card strong {
  display: block;
  color: var(--navy);
}

.mini-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.subnav-wrap {
  position: sticky;
  top: 72px;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.subnav {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
}

.subnav a {
  flex: 0 0 auto;
  padding: 0.55rem 0.72rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.92rem;
}

.subnav a.active,
.subnav a:hover,
.subnav a:focus-visible {
  background: color-mix(in srgb, var(--blue) 11%, var(--surface));
  color: var(--blue);
}

section {
  padding: 4.7rem 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  margin-bottom: 1.6rem;
}

.section-head p {
  max-width: 590px;
  color: var(--muted);
  margin: 0;
}

.grid {
  display: grid;
  gap: 1rem;
}

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

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

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

.card,
.feature-card,
.tech-card,
.challenge-card,
.timeline-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(10, 20, 36, 0.06);
}

.card,
.feature-card,
.tech-card,
.challenge-card {
  padding: 1.15rem;
}

.card p,
.feature-card p,
.tech-card p,
.challenge-card p,
.timeline-card p {
  color: var(--muted);
}

.feature-card {
  min-height: 260px;
  display: grid;
  align-content: start;
  gap: 0.7rem;
}

.feature-shot,
.diagram,
.gallery-shot {
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 1rem;
  border-radius: var(--radius);
  color: #ffffff;
  text-align: center;
  font-weight: 900;
  background:
    linear-gradient(135deg, rgba(20, 87, 217, 0.95), rgba(18, 191, 209, 0.82)),
    repeating-linear-gradient(0deg, transparent 0 16px, rgba(255, 255, 255, 0.16) 16px 17px);
}

.feature-card details {
  margin-top: auto;
}

.feature-card summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 900;
}

.diagram {
  min-height: 280px;
  color: var(--navy);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blue) 12%, var(--surface)), color-mix(in srgb, var(--cyan) 14%, var(--surface))),
    var(--surface);
  border: 1px dashed color-mix(in srgb, var(--blue) 45%, var(--line));
}

.tech-map {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  align-items: center;
}

.tech-center {
  min-height: 320px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: radial-gradient(circle, color-mix(in srgb, var(--blue) 18%, var(--surface)), var(--surface));
  color: var(--navy);
  text-align: center;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.badge-row span {
  padding: 0.52rem 0.68rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--navy);
  font-weight: 850;
}

.impact-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 0;
  list-style: none;
}

.impact-list li {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}

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

.gallery-shot {
  min-height: 230px;
  border: 0;
  cursor: pointer;
}

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

.timeline-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 1rem;
  padding: 1.1rem;
}

.timeline-year {
  color: var(--blue);
  font-weight: 950;
}

.cta-band {
  border-block: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 12%, var(--surface)), var(--surface));
}

.link-grid a {
  display: block;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--blue);
  text-decoration: none;
  font-weight: 900;
}

.resource-rail {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.resource-rail h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.resource-rail .link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 100;
  padding: 1rem;
  background: rgba(5, 12, 24, 0.76);
}

.lightbox.open {
  display: grid;
}

.lightbox-content {
  width: min(900px, 100%);
  min-height: 420px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--surface);
  color: var(--navy);
  padding: 2rem;
  text-align: center;
}

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

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

@media (max-width: 980px) {
  .hero-grid,
  .grid.two,
  .grid.three,
  .grid.four,
  .tech-map,
  .impact-list,
  .gallery-grid,
  .resource-rail .link-grid {
    grid-template-columns: 1fr;
  }

  .product-panel {
    display: none;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .timeline-card {
    grid-template-columns: 1fr;
  }
}
