/* CamAI landing — getcamai.com
   Tokens + component classes from the Nocturne design system (claude.ai/design
   project fb4bd9a3, _ds/nocturne-…/styles.css), trimmed to what this page uses,
   plus the page-layout classes and responsive breakpoints. Fonts are loaded
   from Google Fonts via <link> in index.html (no CSS @import — it blocks). */

:root {
  --color-bg: #161826;
  --color-surface: #232532;
  --color-text: #e9e9ed;
  --color-accent: #9184d9;
  --color-divider: color-mix(in srgb, #e9e9ed 16%, transparent);

  --color-neutral-100: #f3f5fe;
  --color-neutral-200: #e4e7f5;
  --color-neutral-800: #3f424d;
  --color-neutral-900: #292b31;

  --color-accent-100: #f5f4ff;
  --color-accent-200: #e7e5fe;
  --color-accent-400: #b5abfc;
  --color-accent-800: #423a6a;

  --color-section: #262a60;
  --color-section-glow: #353b80;

  --font-heading: "Inter", system-ui, sans-serif;
  --font-heading-weight: 500;
  --font-body: "Inter", system-ui, sans-serif;

  --space-1: 2.8px;
  --space-2: 5.6px;
  --space-3: 8.4px;
  --space-4: 11.2px;
  --space-6: 16.8px;
  --space-8: 22.4px;

  --radius-sm: 4px;
  --radius-md: 8px;

  --shadow-sm: 0 0 0 1px #3f424d;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* The in-page links land on a section heading; without this it sits flush
   against the viewport edge and reads as cut off. */
[id] { scroll-margin-top: calc(var(--space-8) * 2); }
body {
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55; font-weight: 400;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 var(--space-2);
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h4 { font-size: 20px; }
h6 { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-400); }
img { display: block; max-width: 100%; height: auto; }
.text-muted { color: color-mix(in srgb, var(--color-text) 55%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* ── motion ────────────────────────────────────────────────────────────────
   Reveal-on-scroll is progressive enhancement. The markup ships visible; only
   a browser that ran the observer script starts elements hidden (the script
   sets html.js itself, and refuses to when the user asks for reduced motion).
   A script error therefore leaves a readable page, never a blank one. */
.js .reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity 620ms cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 620ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Cards in a row all cross the threshold at once, so the cascade has to come
   from delays. Only where the grid is actually multi-column — stacked on a
   phone, a delay is just a card that arrives late. */
@media (min-width: 961px) {
  .js .stagger > .reveal:nth-child(2) { transition-delay: 70ms; }
  .js .stagger > .reveal:nth-child(3) { transition-delay: 140ms; }
  .js .stagger > .reveal:nth-child(4) { transition-delay: 210ms; }
}

/* The hero is above the fold — it animates on load rather than on scroll. */
@keyframes rise-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.js .hero-copy > *, .js .hero-media > * {
  animation: rise-in 700ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.js .hero-copy > *:nth-child(2) { animation-delay: 70ms; }
.js .hero-copy > *:nth-child(3) { animation-delay: 140ms; }
.js .hero-copy > *:nth-child(4) { animation-delay: 210ms; }
.js .hero-media > *:nth-child(1) { animation-delay: 140ms; }
.js .hero-media > *:nth-child(2) { animation-delay: 280ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* belt and braces — the script already opts out, but a stale html.js from
     bfcache must not leave anything mid-animation */
  .js .reveal, .js .hero-copy > *, .js .hero-media > * {
    opacity: 1; transform: none; animation: none; transition: none;
  }
}

/* Nothing below the fold has been scrolled into view when a print starts, so
   without this the printed page is the hero and several sheets of blank. */
@media print {
  .js .reveal, .js .hero-copy > *, .js .hero-media > * {
    opacity: 1; transform: none; animation: none; transition: none;
  }
}

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.btn-primary { color: var(--color-accent); border-color: var(--color-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--color-accent) 12%, transparent); color: var(--color-accent); }
.btn-primary:active { background: color-mix(in srgb, var(--color-accent) 22%, transparent); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-lg { padding: var(--space-3) var(--space-6); }

/* — cards — */
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-6); border-radius: var(--radius-md); background: var(--color-surface);
}
.card-kicker { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); }
.card-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 17px; line-height: 1.2; margin: 0;
}
.card-body { margin: 0; font-size: 13px; opacity: 0.8; flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
}
.elev-sm { box-shadow: var(--shadow-sm); }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px;
  border-radius: calc(var(--radius-md) * 0.75);
}
.tag-accent { background: var(--color-accent-800); color: var(--color-accent-100); }
.tag-neutral { background: var(--color-neutral-800); color: var(--color-neutral-100); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }

/* — tables — */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: var(--space-2); border-bottom: 1px solid transparent;
}
.table td { padding: var(--space-2); border-bottom: 1px solid transparent; }
.table tbody tr {
  background: linear-gradient(to right,
    transparent, color-mix(in srgb, var(--color-text) 8%, transparent) 48px,
    color-mix(in srgb, var(--color-text) 8%, transparent) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}

/* — page layout — */
.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-8); }

.nav {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-6) 0;
}
.nav-brand {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 18px; margin-right: auto; color: inherit; text-decoration: none;
}
.nav a { color: inherit; text-decoration: none; font-size: 14px; transition: color 180ms ease; }
.nav a:hover { color: var(--color-accent); }
/* the links sit in the header's flex row, not in a box of their own — but stay
   one element so the mobile breakpoint can drop them in a single rule */
.nav-links { display: contents; }
.nav .btn-primary { color: var(--color-accent); }

.brand-mark {
  width: 24px; height: 24px; border-radius: var(--radius-sm);
  border: 1px solid var(--color-accent); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-mark::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-accent);
}
.brand-mark-sm { width: 18px; height: 18px; }
.brand-mark-sm::after { width: 6px; height: 6px; }

.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: calc(var(--space-8) * 2); align-items: center;
  padding: calc(var(--space-8) * 2) 0 calc(var(--space-8) * 2.5);
}
.hero-badges {
  display: inline-flex; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.hero-badges .meta { font-size: 12px; }
.hero h1 { max-width: 15em; margin-bottom: var(--space-4); }
.hero-lead { font-size: 17px; max-width: 30em; margin-bottom: var(--space-8); text-wrap: pretty; }
.hero-ctas { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.hero-media { display: flex; flex-direction: column; gap: var(--space-4); }
.hero-figure { display: flex; align-items: center; justify-content: center; padding: var(--space-4) 0; }
.hero-figure img { width: 100%; max-width: 400px; }
.output-rows {
  display: flex; flex-direction: column; gap: var(--space-1);
  font-size: 13px; line-height: 1.5; color: var(--color-neutral-200);
}
.output-row {
  background: var(--color-neutral-900); border-radius: var(--radius-sm);
  padding: var(--space-3); display: flex; justify-content: space-between; gap: var(--space-4);
}

.stats-band { background: linear-gradient(180deg, var(--color-section) 0%, var(--color-section-glow) 100%); }
/* padding-block only — the shorthand would cancel .container's side padding */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-8);
  padding-block: calc(var(--space-8) * 1.8);
}
.stat-value {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 32px; line-height: 1.1;
}
.stat-label {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-accent-200); margin-top: var(--space-1);
}

.section { padding: calc(var(--space-8) * 2.5) 0; }
.section-tight { padding-top: 0; }
.section-kicker { color: var(--color-accent); margin-bottom: var(--space-4); }
.section h2 { max-width: 20em; margin-bottom: var(--space-4); }
.section-lead { max-width: 34em; margin-bottom: calc(var(--space-8) * 1.5); text-wrap: pretty; }

.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.case-tags { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-2); }

.hardware {
  display: grid; grid-template-columns: 0.8fr 1.2fr;
  gap: calc(var(--space-8) * 2); align-items: center;
}
.hardware-figure { display: flex; align-items: center; justify-content: center; }
.hardware-figure img { width: 100%; max-width: 420px; }
.hardware h2 { max-width: 18em; }
.hardware-lead { max-width: 32em; margin-bottom: var(--space-8); text-wrap: pretty; }
.hardware .table th { width: 34%; }

.contact { border-top: 1px solid var(--color-divider); }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: calc(var(--space-8) * 2); align-items: start;
  padding-block: calc(var(--space-8) * 2.5);
}
.contact-grid h2 { margin: 0; max-width: 16em; }
.contact-side { display: flex; flex-direction: column; gap: var(--space-6); align-items: flex-start; }
.contact-side p { margin: 0; text-wrap: pretty; }
.btn-mail { padding: var(--space-4) var(--space-8); font-size: 17px; }

.footer { border-top: 1px solid var(--color-divider); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-8); padding-block: var(--space-6); flex-wrap: wrap;
}
.footer-brand {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 15px;
}

/* — responsive — */
@media (max-width: 960px) {
  h1 { font-size: 34px; }
  h2 { font-size: 27px; }
  .hero {
    grid-template-columns: 1fr;
    gap: calc(var(--space-8) * 1.5);
    padding: var(--space-8) 0 calc(var(--space-8) * 2);
  }
  .hero-figure img { max-width: 320px; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .cases-grid { grid-template-columns: 1fr; }
  .hardware { grid-template-columns: 1fr; gap: var(--space-8); }
  .hardware-figure img { max-width: 300px; }
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-8); }
}

@media (max-width: 800px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6) var(--space-8); }
}

@media (max-width: 700px) {
  .nav-links { display: none; }
}

@media (max-width: 560px) {
  h1 { font-size: 29px; }
  h2 { font-size: 24px; }
  .hero-lead { font-size: 16px; }
  .steps-grid { grid-template-columns: 1fr; }
  .section { padding: calc(var(--space-8) * 1.6) 0; }
  .section-tight { padding-top: 0; }
}
