/* CamDock landing page — direction A "Notch Night".
   Tokens mirror the Figma frame "A · Notch Night" (page CamDock · Landing). */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/geist-mono-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0d12;
  --surface: #11161e;
  --surface-2: #171d27;
  --line: #232b37;
  --ink: #eef1f5;
  --muted: #a3acb9; /* 8.6:1 on --bg */
  --dim: #8a94a3; /* 6.1:1 on --bg (Figma used #7C8696; lifted for small text) */
  --accent: #4c9bff; /* kicker text, 7.0:1 on --bg */
  --accent-strong: #1f6fe0; /* button fill; white text on it is 4.8:1 */
  --pro-surface: #132036;
  --pro-line: #2f5fa8;

  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --wrap: 1200px;
  --gutter: 24px;
  --radius: 18px;

  /* Motion (Emil Kowalski): strong custom curves, transform/opacity only. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul[role='list'] { list-style: none; padding: 0; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 10px 14px; border-radius: 10px;
  background: var(--ink); color: var(--bg); font-weight: 500; text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* ---------- Type ---------- */

h1 {
  font-size: clamp(44px, 7.4vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 600;
  text-wrap: balance;
}
h2 {
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 600;
  text-wrap: balance;
}
h3 { font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }

.kicker {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker--accent { color: var(--accent); }

.lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--muted); max-width: 640px; }
.sub { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; color: var(--muted); max-width: 600px; text-wrap: pretty; }
.muted { color: var(--dim); font-size: 16px; line-height: 1.55; max-width: 480px; }
.fine { font-size: 14px; color: var(--dim); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font: 500 16px/1 var(--font); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
  transition:
    transform 160ms var(--ease-out),
    background-color 150ms ease,
    border-color 150ms ease;
}
/* Press feedback: the button heard you. */
.btn:active { transform: scale(0.97); }
.btn--sm { min-height: 36px; padding: 0 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--accent-strong); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--light { background: var(--ink); color: var(--bg); }

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: #1a62c7; }
  .btn--ghost:hover { border-color: #3a4556; background: rgba(255, 255, 255, 0.03); }
  .btn--light:hover { background: #ffffff; }
  .nav__links a:hover, .footer__links a:hover { color: var(--ink); }
}

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 13, 18, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.brand img { border-radius: 7px; }
.brand--small { font-size: 14px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.nav__links { display: flex; gap: 32px; }
.nav__links a { color: var(--muted); text-decoration: none; font-size: 15px; transition: color 150ms ease; }

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

.hero { padding-top: clamp(56px, 9vw, 96px); overflow: hidden; }
.hero__copy { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.hero__copy .lede { margin-inline: auto; }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 12px; }
.hero__copy .fine { margin-top: -8px; }

.hero__shot { margin-top: clamp(48px, 7vw, 72px); position: relative; }
.hero__shot img {
  width: 100%;
  border-radius: 22px;
  border: 1px solid #2a3342;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}
/* Fade the bottom of the product shot into the page. */
.hero__shot::after {
  content: '';
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; height: 22%;
  background: linear-gradient(to bottom, rgba(10, 13, 18, 0), var(--bg));
  border-radius: 0 0 22px 22px;
  pointer-events: none;
}

/* ---------- Sections ---------- */

.section { padding-top: clamp(88px, 11vw, 140px); }
.head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 56px; max-width: 760px; }
.head--row { max-width: none; flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 48px; }
.head--row > div { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.head--row .sub { max-width: 440px; font-size: 17px; }

/* Surfaces */
.surfaces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card h3 { padding: 22px 22px 0; }
.card p { padding: 8px 22px 26px; color: var(--muted); font-size: 15px; }

.diagram { position: relative; height: 170px; background: var(--surface-2); display: grid; place-items: center; }
.diagram span, .diagram i { display: block; border-radius: 4px; background: #2c3a4e; }
.diagram--notch { display: block; }
.diagram--notch::before {
  content: ''; position: absolute; top: 0; left: calc(50% - 85px);
  width: 170px; height: 56px; background: #000; border-radius: 0 0 14px 14px;
}
.diagram--notch span { position: absolute; top: 20px; width: 50px; height: 30px; left: calc(50% - 79px); }
.diagram--notch span:nth-child(2) { left: calc(50% - 25px); }
.diagram--notch span:nth-child(3) { left: calc(50% + 29px); }
.diagram--grid { grid-template-columns: 34px repeat(3, 48px); grid-template-rows: repeat(2, 48px); gap: 4px; padding: 0; place-content: center; place-items: stretch; }
.diagram--grid i { grid-row: span 2; background: #141b25; border: 1px solid #2a3442; }
.diagram--float i { position: absolute; left: 20px; top: 24px; width: 62%; height: 120px; background: #1c2330; border: 1px solid #2a3442; border-radius: 8px; }
.diagram--float span { position: absolute; right: 20px; bottom: 20px; width: 44%; height: 68px; border-radius: 10px; border: 1.5px solid #fff; }
.diagram--full span { width: 84%; height: 80%; border-radius: 6px; }
.diagram--full b {
  position: absolute; left: 12%; top: 18%; padding: 4px 8px; border-radius: 99px;
  background: rgba(0, 0, 0, 0.6); color: #fff; font: 400 10px/1.2 var(--mono);
}

/* Split layouts */
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 72px; align-items: center; }
.split--reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split__text { display: flex; flex-direction: column; gap: 16px; }
.split__text .muted { margin-top: 12px; }

.points { display: grid; gap: 14px; margin-top: 16px; }
.points li { position: relative; padding-left: 26px; font-size: 16px; line-height: 1.5; }
.points li::before {
  content: ''; position: absolute; left: 4px; top: 0.6em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* Screenshots (captured from the real app) */
.shot img { width: 100%; border-radius: 14px; }
.shot--window img, .shot--sheet img { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.shot--window + .shot--window { margin-top: 24px; }
.shot--detect img { border-radius: 24px; border: 1px solid var(--line); }

/* Privacy panel */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 56px; display: flex; flex-direction: column; gap: 16px; }
.panel h2 { max-width: 760px; }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 24px; }
.cols p { color: var(--muted); font-size: 15px; margin-top: 10px; }

/* Details */
.details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 28px; }
.details > div { border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 24px 0 28px; }
.details dt { font-weight: 600; font-size: 16px; }
.details dd { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.plan { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(24px, 3vw, 36px); }
.plan--pro { background: var(--pro-surface); border-color: var(--pro-line); }
.plan__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan h3 { font-size: 20px; }
.tag { font-size: 12px; font-weight: 500; color: #a9cdff; background: rgba(76, 155, 255, 0.16); padding: 4px 10px; border-radius: 99px; }
.price { margin-top: 20px; color: var(--muted); font-size: 16px; }
.price span { color: var(--ink); font-size: 56px; font-weight: 600; letter-spacing: -0.05em; margin-right: 6px; font-variant-numeric: tabular-nums; }
.plan__sub { color: var(--muted); margin-top: 6px; }
.plan ul { display: grid; gap: 12px; margin: 28px 0 32px; flex: 1; }
.plan li { position: relative; padding-left: 26px; font-size: 15px; }
.plan li::before { content: '✓'; position: absolute; left: 0; font-weight: 600; color: var(--muted); }
.plan--pro li::before { color: #7db7ff; }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 80px; align-items: start; }
.faq__list details { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.faq__list summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px;
  padding: 24px 0; font-size: 18px; font-weight: 500;
}
.faq__list summary::-webkit-details-marker { display: none; }
/* The plus turns into a cross: state indication, 200ms, interruptible transition. */
.faq__list summary::after {
  content: '+'; color: var(--muted); font-size: 22px; line-height: 1; flex: none;
  /* Own box at the first line: a two-line question would stretch it and rotate it off-centre. */
  align-self: flex-start; width: 1em; text-align: center; margin-top: 0.1em;
  transition: transform 200ms var(--ease-out);
}
.faq__list details[open] summary::after { transform: rotate(45deg); }
.faq__list p { padding: 0 0 24px; color: var(--muted); max-width: 640px; }
.faq__list a { color: var(--accent); text-underline-offset: 3px; }

/* Final CTA */
.final { padding-bottom: 24px; }
.final__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.final__inner img { border-radius: 16px; }
.final__inner h2 { max-width: 640px; }

/* Footer */
.footer { padding: clamp(88px, 10vw, 120px) 0 48px; }
.feedback {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 16px;
}
.feedback__title { font-weight: 500; }
.feedback__sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.footer__row { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 32px; flex-wrap: wrap; }
.footer__links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer__links a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color 150ms ease; }
.footer__legal { color: var(--dim); font-size: 13px; margin-top: 24px; }

/* ---------- Motion ---------- */

/* Hero entrance — first visit only (rare), purpose: one calm arrival instead of a jump.
   CSS animation on transform/opacity so it stays smooth while the page is still loading.
   Non-uniform stagger: copy lands first, the product shot follows. */
@keyframes enter {
  from { opacity: 0; transform: translateY(10px); }
}
@keyframes enter-shot {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
}
.js [data-enter] { animation: enter 600ms var(--ease-out) both; }
.js [data-enter]:nth-child(2) { animation-delay: 50ms; }
.js [data-enter]:nth-child(3) { animation-delay: 110ms; }
.js [data-enter]:nth-child(4) { animation-delay: 160ms; }
.js [data-enter]:nth-child(5) { animation-delay: 200ms; }
.js [data-enter='shot'] { animation: enter-shot 800ms var(--ease-out) 240ms both; }

/* Scroll reveal — explanation pacing on a marketing page; once per element, never on re-scroll. */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-enter], .js [data-enter='shot'] { animation-name: fade; }
  .js [data-reveal] { transform: none; transition: opacity 300ms ease; }
  .btn:active { transform: none; }
}
@keyframes fade { from { opacity: 0; } }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .surfaces { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split--reverse { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .split--reverse .shot { order: 2; }
  .head--row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .faq { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .nav__links { display: none; }
  .head { margin-bottom: 36px; }
  .surfaces, .details, .cols, .plans { grid-template-columns: minmax(0, 1fr); }
  .cols { gap: 28px; }
  .panel { padding: 28px 24px; }
  .ctas { width: 100%; flex-direction: column; }
  .ctas .btn { width: 100%; }
  .hero__shot img { border-radius: 14px; }
  .feedback { flex-direction: column; align-items: flex-start; }
  .faq__list summary { font-size: 17px; }
  .price span { font-size: 48px; }
}

/* ---------- Long-form pages (guides, privacy) ---------- */

.prose { max-width: calc(720px + var(--gutter) * 2); padding-top: 56px; padding-bottom: 32px; }
.crumbs { font: 400 13px/1.4 var(--mono); color: var(--dim); margin-bottom: 28px; }
.crumbs a { color: var(--dim); text-decoration: none; }
.prose h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 20px; }
.prose h2 { font-size: clamp(24px, 3vw, 30px); margin: 48px 0 14px; letter-spacing: -0.03em; }
.prose h3 { margin: 32px 0 10px; }
.prose p, .prose li { color: #c9d0da; font-size: 17px; line-height: 1.7; }
.prose p + p { margin-top: 14px; }
.prose ul, .prose ol { padding-left: 22px; margin: 12px 0; }
.prose li + li { margin-top: 6px; }
.prose a:not(.btn) { color: var(--accent); text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose code { font: 400 0.9em var(--mono); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; overflow-x: auto; margin: 16px 0; }
.prose pre code { background: none; padding: 0; font-size: 14px; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); color: #c9d0da; }
.prose__cta { margin-top: 56px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.footer--slim { padding: 64px 0 40px; }
.notfound { padding-top: 18vh; min-height: 80vh; }
.price s { color: var(--dim); font-size: 20px; margin-right: 4px; text-decoration-thickness: 1.5px; }

/* Good to know (limits before pricing) */
.limits { margin-top: 0; }

/* FAQ page (/faq/) and the home FAQ's lead-in */
.faq__head .sub { margin-top: 16px; font-size: 17px; }
.faq__head a, .faq-page .faq__list a { color: var(--accent); text-underline-offset: 3px; }
.faq-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 8px; }
.faq-toc a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 14px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); transition: border-color 160ms ease, background-color 160ms ease; }
.faq-toc a:not(.btn):hover { border-color: rgba(255, 255, 255, 0.24); }
.faq-group { scroll-margin-top: 88px; }
.faq-page .faq__list p { color: var(--muted); font-size: 16px; }
.faq-page .faq__list summary { font-size: 17px; }


/* Download page */
.download__cta { margin: 28px 0 8px; }

/* Long RTSP addresses in tables (/cameras/) wrap instead of forcing a sideways scroll on phones. */
.prose td code { overflow-wrap: anywhere; }
.prose td code + br + code { display: inline-block; margin-top: 6px; }
/* Wide comparison table (/compare/): keep columns readable and scroll the table, not the page. */
.prose .table--wide th, .prose .table--wide td { min-width: 9.5em; vertical-align: top; font-size: 14px; }
.prose .table--wide th:first-child, .prose .table--wide td:first-child { min-width: 7.5em; }
.table-hint { display: none; }
@media (max-width: 760px) { .table-hint { display: block; } }
.prose .table--wide { width: min(1100px, calc(100vw - var(--gutter) * 2)); position: relative; left: 50%; transform: translateX(-50%); }
@media (max-width: 1100px) { .table-hint { display: block; } }
