/* ==========================================================================
   AmPa Lab — Design System
   ========================================================================== */

:root {
  --ink: #0b0e14;
  --ink-soft: #1c2129;
  --muted: #5b6472;
  --muted-soft: #8a919c;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-tint: #eef1f0;
  --surface: #ffffff;
  --border: #e6e8eb;
  --accent: #00c896;
  --accent-dark: #00a87d;
  --accent-soft: #e5f9f1;
  --civix-blue: #2b3a55;

  --ink-surface: #0b0e14;
  --ink-surface-hover: #1c2129;
  --header-bg: rgba(255, 255, 255, 0.85);
  --nav-mobile-bg: #ffffff;

  --max-width: 1180px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(11, 14, 20, 0.05), 0 1px 1px rgba(11, 14, 20, 0.03);
  --shadow-md: 0 8px 24px rgba(11, 14, 20, 0.08);
  --shadow-lg: 0 24px 64px rgba(11, 14, 20, 0.12);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

/* Dark theme: follows the device until the visitor picks Day or Night explicitly. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f3f5f7;
    --ink-soft: #d7dbe1;
    --muted: #9aa3ad;
    --muted-soft: #6b7280;
    --bg: #0b0e14;
    --bg-soft: #12161f;
    --bg-tint: #171c26;
    --surface: #12161f;
    --border: #262b35;
    --accent: #00d9a3;
    --accent-dark: #00c896;
    --accent-soft: rgba(0, 217, 163, 0.14);
    --civix-blue: #30406a;

    --ink-surface: #171c26;
    --ink-surface-hover: #1f2531;
    --header-bg: rgba(11, 14, 20, 0.8);
    --nav-mobile-bg: #12161f;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ink: #f3f5f7;
  --ink-soft: #d7dbe1;
  --muted: #9aa3ad;
  --muted-soft: #6b7280;
  --bg: #0b0e14;
  --bg-soft: #12161f;
  --bg-tint: #171c26;
  --surface: #12161f;
  --border: #262b35;
  --accent: #00d9a3;
  --accent-dark: #00c896;
  --accent-soft: rgba(0, 217, 163, 0.14);
  --civix-blue: #30406a;

  --ink-surface: #171c26;
  --ink-surface-hover: #1f2531;
  --header-bg: rgba(11, 14, 20, 0.8);
  --nav-mobile-bg: #12161f;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

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

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

p {
  margin: 0;
  color: var(--muted);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

section {
  padding: 112px 0;
}

@media (max-width: 720px) {
  section {
    padding: 72px 0;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-top: 12px;
}

.section-head p {
  margin-top: 16px;
  font-size: 17px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--ink-surface);
  color: #fff;
}

.btn-primary:hover {
  background: var(--ink-surface-hover);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--ink);
}

.btn-accent {
  background: var(--accent);
  color: #06201a;
}

.btn-accent:hover {
  background: var(--accent-dark);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Brand lockup ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-word {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand-word span {
  font-weight: 500;
  color: var(--muted);
}

.on-dark .brand-mark,
.on-dark .brand-word,
.on-dark .brand-word span {
  color: #fff;
}

.on-dark .brand-word span {
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- AmPa logo badge (shared brand mark) ---------- */

.ampa-logo {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ampa-orbit { transform-origin: 32px 32px; animation: ampa-cw 14s linear infinite; }
.ampa-orbit2 { transform-origin: 32px 32px; animation: ampa-ccw 9s linear infinite; }
.ampa-shine { animation: ampa-sweep 3.6s ease-in-out infinite; }
.ampa-spark { transform-origin: 52px 15px; animation: ampa-twinkle 2.2s ease-in-out infinite; }
.ampa-spark.s2 { transform-origin: 11px 50px; animation-delay: 1.1s; }

@keyframes ampa-cw { to { transform: rotate(360deg); } }
@keyframes ampa-ccw { to { transform: rotate(-360deg); } }
@keyframes ampa-sweep { 0% { transform: translateX(0) skewX(-20deg); } 55%, 100% { transform: translateX(110px) skewX(-20deg); } }
@keyframes ampa-twinkle { 0%, 100% { opacity: 0.2; transform: scale(0.5); } 50% { opacity: 1; transform: scale(1.2) rotate(45deg); } }

@media (prefers-reduced-motion: reduce) {
  .ampa-orbit, .ampa-orbit2, .ampa-shine, .ampa-spark { animation: none; }
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), padding 0.3s var(--ease);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header.is-scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--accent-dark);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ---------- Theme switch ---------- */

.theme {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.theme button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.theme button svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.theme button:hover {
  color: var(--ink);
}

.theme button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 78vw;
    max-width: 320px;
    background: var(--nav-mobile-bg);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
    padding: 0 40px;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
  }

  .nav-links.is-open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 18px;
  }

  .nav-actions .btn-secondary {
    display: none;
  }

  .nav-toggle {
    display: flex;
    z-index: 110;
  }

  body.nav-open {
    overflow: hidden;
  }
}

.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 14, 20, 0.4);
  z-index: 95;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.nav-scrim.is-visible {
  display: block;
  opacity: 1;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 196px 0 140px;
  overflow: hidden;
  background: var(--bg-soft);
}

.hero::before {
  content: "";
  position: absolute;
  top: -220px;
  right: -180px;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent-soft), transparent 70%);
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.hero-brand {
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(38px, 5.2vw, 64px);
  max-width: 560px;
}

.hero .lede {
  margin-top: 24px;
  font-size: 19px;
  max-width: 480px;
  color: var(--muted);
}

.hero .btn-row {
  margin-top: 36px;
}

.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-grid {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 14px;
}

.hero-grid .cell {
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-soft);
  padding: 12%;
}

.hero-grid .cell svg {
  width: 100%;
  height: 100%;
}

.hero-grid .cell:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.hero-grid .cell.accent {
  background: var(--ink-surface);
  padding: 0;
}

.hero-grid .cell.accent .brand-mark {
  width: 46%;
  height: 46%;
  color: var(--accent);
}

.hero-grid .cell.glow {
  background: var(--accent);
  padding: 22%;
}

.hero-grid .cell.span-2 {
  grid-column: span 2;
}

.hero-grid .cell.row-2 {
  grid-row: span 2;
}

/* Hero tiles: each one moves on its own, like the AmPa logo tile does. */
.hero-grid .cell { animation: tile-float 6s ease-in-out infinite; }
.hero-grid .cell:nth-child(2) { animation-delay: -1.2s; }
.hero-grid .cell:nth-child(3) { animation-delay: -2.4s; }
.hero-grid .cell:nth-child(4) { animation-delay: -3.6s; }
.hero-grid .cell:nth-child(5) { animation-delay: -4.8s; }
.hero-grid .cell:nth-child(6) { animation-delay: -0.6s; }
.hero-grid .cell.accent { animation-duration: 8s; }

.hero-grid .dots circle { transform-box: fill-box; transform-origin: center; animation: dot-pulse 2.4s ease-in-out infinite; }
.hero-grid .dots circle:nth-child(2n) { animation-delay: .3s; }
.hero-grid .dots circle:nth-child(3n) { animation-delay: .6s; }
.hero-grid .dots circle:nth-child(5n) { animation-delay: .9s; }

.hero-grid .glow svg { animation: ray-spin 18s linear infinite; }

.hero-grid .bars rect { transform-box: fill-box; transform-origin: bottom; animation: bar-eq 2.6s ease-in-out infinite; }
.hero-grid .bars rect:nth-child(2) { animation-delay: .35s; }
.hero-grid .bars rect:nth-child(3) { animation-delay: .7s; }
.hero-grid .bars rect:nth-child(4) { animation-delay: 1.05s; }

.hero-grid .ring-wave { transform-box: fill-box; transform-origin: center; animation: ring-ping 3s ease-out infinite; }
.hero-grid .ring-wave.w2 { animation-delay: 1.5s; }

/* AI tile: a chip that breathes, with a sparkle. */
.hero-grid .cell.ai {
  color: var(--accent);
  background: var(--ink-surface);
  border-color: transparent;
  box-shadow: 0 0 0 0 rgba(0, 200, 150, 0.35);
  animation: tile-float 6s ease-in-out infinite -0.6s, ai-glow 3s ease-in-out infinite;
}
.hero-grid .cell.ai .ai-pins { animation: pins-blink 2s ease-in-out infinite; }
.hero-grid .cell.ai .ai-spark { transform-box: fill-box; transform-origin: center; animation: ampa-twinkle 2.2s ease-in-out infinite; }

@keyframes tile-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes dot-pulse { 0%, 100% { opacity: .35; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.25); } }
@keyframes ray-spin { to { transform: rotate(360deg); } }
@keyframes bar-eq { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
@keyframes ring-ping { 0% { opacity: .9; transform: scale(.35); } 100% { opacity: 0; transform: scale(1.25); } }
@keyframes ai-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(0, 200, 150, 0); } 50% { box-shadow: 0 0 22px 2px rgba(0, 200, 150, 0.35); } }
@keyframes pins-blink { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .hero-grid .cell, .hero-grid .cell.ai, .hero-grid .glow svg, .hero-grid .dots circle, .hero-grid .bars rect,
  .hero-grid .ring-wave, .hero-grid .cell.ai .ai-pins, .hero-grid .cell.ai .ai-spark { animation: none; }
}

@media (max-width: 920px) {
  .hero {
    padding: 160px 0 96px;
  }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-visual {
    order: -1;
    max-width: 280px;
    margin: 0 auto;
  }
}

/* ---------- About ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 17px;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 15px;
}

.about-copy {
  max-width: 680px;
  margin-bottom: 56px;
}

.about-copy p + p {
  margin-top: 16px;
}

.about-copy p {
  font-size: 17px;
  color: var(--ink-soft);
}

@media (max-width: 860px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Products / Civix ---------- */

.products-section {
  background: var(--bg-soft);
}

.product-card {
  background: var(--civix-blue);
  border-radius: var(--radius-lg);
  padding: 64px;
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 48px;
  align-items: center;
  color: #fff;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  transition: background-color 0.3s var(--ease);
}

.product-copy .category {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.product-copy .product-name {
  font-size: clamp(30px, 4vw, 42px);
  margin-top: 12px;
  color: #fff;
}

.product-copy .tagline {
  font-size: 19px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 8px;
}

.product-copy .desc {
  margin-top: 20px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.78);
  max-width: 480px;
}

.feature-pills {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-pills li {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
}

.product-copy .btn-row {
  margin-top: 32px;
}

.disclaimer {
  margin-top: 28px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  max-width: 460px;
  line-height: 1.5;
}

/* Phone mockup */

.phone-mock {
  position: relative;
  margin: 0 auto;
  width: 240px;
  height: 490px;
  border-radius: 38px;
  background: #0d1420;
  border: 6px solid #10192a;
  box-shadow: var(--shadow-lg);
}

.phone-mock::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
}

.phone-screen {
  position: absolute;
  inset: 10px;
  border-radius: 30px;
  background: linear-gradient(180deg, #16223a 0%, #0d1420 100%);
  padding: 32px 16px 16px;
  overflow: hidden;
}

.phone-screen.has-shot {
  padding: 0;
  background: #0d1420;
}

.phone-screen.has-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Sized so the whole screenshot (647 x 1400) fits the frame without cropping. */
.phone-mock:has(.has-shot) { height: 482px; }

.phone-screen .ps-tag {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.phone-screen .ps-headline {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.phone-screen .ps-line {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  margin-top: 14px;
}

.phone-screen .ps-line.w-70 { width: 70%; }
.phone-screen .ps-line.w-90 { width: 90%; }
.phone-screen .ps-line.w-50 { width: 50%; }

.phone-screen .ps-card {
  margin-top: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px;
}

.phone-screen .ps-pill {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 200, 150, 0.16);
  color: var(--accent);
}

@media (max-width: 960px) {
  .product-card {
    grid-template-columns: 1fr;
    padding: 40px 28px;
    text-align: left;
  }

  .phone-mock {
    width: 200px;
    height: 408px;
  }

  .phone-mock:has(.has-shot) { height: 396px; }
}

/* ---------- Approach ---------- */

.approach-section {
  text-align: center;
}

.approach-section .section-head {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.approach-visual {
  margin-top: 56px;
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.approach-chip {
  padding: 18px 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), background-color 0.3s var(--ease);
}

.approach-chip:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-3px);
}

/* ---------- What we build ---------- */

.build-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.build-card {
  padding: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.build-card-ai { grid-column: 1 / -1; }

.build-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.build-card .num {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.06em;
}

.build-card h3 {
  margin-top: 16px;
  font-size: 18px;
}

.build-card p {
  margin-top: 10px;
  font-size: 15px;
}

.build-note {
  margin-top: 40px;
  font-size: 14px;
  color: var(--muted-soft);
}

@media (max-width: 960px) {
  .build-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .build-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Vision ---------- */

.vision-section {
  background: var(--ink-surface);
  color: #fff;
  text-align: center;
}

.vision-section .eyebrow {
  color: var(--accent);
}

.vision-section h2 {
  font-size: clamp(32px, 6vw, 56px);
  max-width: 820px;
  margin: 20px auto 0;
  color: #fff;
}

.vision-section p {
  margin: 28px auto 0;
  max-width: 600px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.65);
}

/* ---------- Why AmPa Lab ---------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.why-card .index {
  font-size: 40px;
  font-weight: 800;
  color: var(--bg-tint);
  -webkit-text-stroke: 1.5px var(--border);
}

.why-card h3 {
  margin-top: 8px;
  font-size: 19px;
}

.why-card p {
  margin-top: 12px;
  font-size: 15px;
}

@media (max-width: 860px) {
  .why-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ---------- Contact ---------- */

.contact-section {
  background: var(--bg-soft);
}

.contact-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 64px;
  text-align: center;
}

.contact-panel h2 {
  font-size: clamp(28px, 4vw, 38px);
}

.contact-panel p {
  margin: 16px auto 0;
  max-width: 480px;
  font-size: 17px;
}

.contact-panel .btn-row {
  margin-top: 32px;
  justify-content: center;
}

@media (max-width: 620px) {
  .contact-panel {
    padding: 40px 24px;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink-surface);
  color: rgba(255, 255, 255, 0.7);
  padding: 72px 0 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand p {
  margin-top: 14px;
  max-width: 280px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-links {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 16px;
}

.footer-col ul li + li {
  margin-top: 12px;
}

.footer-col a {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s var(--ease);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

/* ---------- Legal pages ---------- */

.legal-main {
  padding: 180px 0 120px;
}

.legal-main .container {
  max-width: 760px;
}

.legal-main h1 {
  font-size: clamp(30px, 4vw, 42px);
}

.legal-main .updated {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted-soft);
}

.legal-main h2 {
  font-size: 20px;
  margin-top: 48px;
  margin-bottom: 16px;
}

.legal-main p,
.legal-main li {
  font-size: 16px;
  color: var(--ink-soft);
}

.legal-main ul {
  margin-top: 12px;
  padding-left: 20px;
  list-style: disc;
}

.legal-main li + li {
  margin-top: 8px;
}

.legal-main p + p,
.legal-main p + ul {
  margin-top: 12px;
}

.legal-main a {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}
