/* Cam360 landing page. Design tokens mirror brand/BRAND.md */

:root {
  --ink: #37352f;
  --ink-2: rgba(55, 53, 47, 0.72);
  --ink-3: rgba(55, 53, 47, 0.5);
  --canvas: #ffffff;
  --sunken: #f7f6f3;
  --line: rgba(55, 53, 47, 0.1);
  --line-2: rgba(55, 53, 47, 0.16);
  --blue: #2383e2;
  --blue-press: #1a6dc0;
  --wash: rgba(35, 131, 226, 0.1);
  --radius: 10px;
  --shadow-card: 0 1px 2px rgba(15, 15, 15, 0.05);
  --shadow-float: 0 24px 60px rgba(15, 15, 15, 0.14), 0 2px 8px rgba(15, 15, 15, 0.06);
  --shadow-pop: 0 12px 32px rgba(15, 15, 15, 0.14), 0 1px 3px rgba(15, 15, 15, 0.08);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --wrap: 1080px;
  --gutter: 24px;
  --nav-h: 60px;
  --tap: 44px;              /* iOS HIG minimum, Android asks for 48dp */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;   /* stop Android/iOS inflating body text */
  text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--canvas);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;  /* replaced by explicit :active states */
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--wash); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* Respect the notch and the home indicator in landscape on iOS */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: calc(var(--gutter) + env(safe-area-inset-left));
  padding-right: calc(var(--gutter) + env(safe-area-inset-right));
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(12px);   /* iOS Safari needs the prefix */
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 28px; height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 16px; letter-spacing: -0.02em; }
.brand svg { width: 24px; height: 24px; border-radius: 6px; flex: 0 0 auto; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 14px; color: var(--ink-2); }
.nav-cta { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-links + .nav-cta { margin-left: 0; }

/* Mobile disclosure menu (no framework, closes via a few lines of inline JS) */
.menu { display: none; position: relative; }
.menu-btn {
  list-style: none; width: var(--tap); height: var(--tap);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 8px; color: var(--ink-2);
  border: 1px solid var(--line-2);
}
.menu-btn::-webkit-details-marker { display: none; }
.menu[open] .menu-btn { background: var(--sunken); color: var(--ink); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  background: var(--canvas); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--shadow-pop); min-width: 208px; padding: 6px;
  display: flex; flex-direction: column;
}
.menu-panel a {
  display: flex; align-items: center; min-height: var(--tap);
  padding: 0 12px; border-radius: 8px; font-size: 15px; color: var(--ink-2);
}
.menu-panel a:active { background: var(--sunken); color: var(--ink); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: inherit; font-size: 14px; font-weight: 500;
  padding: 9px 16px; border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .06s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-ghost { border-color: var(--line-2); color: var(--ink-2); background: transparent; }
.btn-lg { font-size: 15px; padding: 12px 22px; }
.btn:active { transform: scale(0.985); }
.cta-short { display: none; }
.btn-primary:active { background: var(--blue-press); }
.btn-ghost:active { background: var(--sunken); }

/* ---------- Hero ---------- */
.hero { padding: 76px 0 64px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 300px; gap: 72px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--ink-2); background: var(--sunken);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin-bottom: 22px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); flex: 0 0 auto; }
h1 {
  font-size: clamp(2.05rem, 7.4vw, 3.25rem);
  line-height: 1.08; font-weight: 600; letter-spacing: -0.033em;
  margin-bottom: 20px; max-width: 15ch;
}
.lede { font-size: clamp(1rem, 3.9vw, 1.125rem); color: var(--ink-2); max-width: 46ch; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.micro { font-size: 13.5px; color: var(--ink-3); }

.shot { position: relative; }
.shot::before {
  content: ""; position: absolute; inset: -12% -22% -8%;
  background: radial-gradient(60% 55% at 50% 42%, rgba(35, 131, 226, 0.13), transparent 70%);
  border-radius: 50%; z-index: 0;
}
.shot img {
  position: relative; z-index: 1; width: 100%;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-float);
}

/* ---------- Compat strip ---------- */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--sunken); }
.strip-in { padding: 22px 0; display: flex; align-items: center; gap: 14px 30px; flex-wrap: wrap; justify-content: center; }
.strip-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.strip-item { font-size: 15px; color: var(--ink-2); font-weight: 500; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.sec-head { max-width: 60ch; margin-bottom: 32px; }
h2 { font-size: clamp(1.6rem, 5.4vw, 2rem); line-height: 1.2; font-weight: 600; letter-spacing: -0.022em; margin-bottom: 14px; }
.sec-sub { font-size: clamp(1rem, 3.6vw, 1.0625rem); color: var(--ink-2); }

/* ---------- Feature grid ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  background: var(--canvas); box-shadow: var(--shadow-card); transition: border-color .15s, transform .15s;
}
.card .ico {
  width: 34px; height: 34px; border-radius: 8px; background: var(--wash);
  display: flex; align-items: center; justify-content: center; margin-bottom: 15px; color: var(--blue);
}
.card h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 7px; }
.card p { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-media { display: flex; justify-content: center; }
.split-media img { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-float); }
.split-media.panel {
  max-height: 492px; overflow: hidden; padding: 12px 12px 0;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
}
.split-media.panel img { max-width: 248px; }
.flow { list-style: none; margin-top: 22px; display: flex; flex-direction: column; gap: 15px; }
.flow li { display: flex; gap: 13px; font-size: 15px; color: var(--ink-2); line-height: 1.55; }
.flow .n {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px;
  background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; margin-top: 3px;
}
.flow b { color: var(--ink); font-weight: 600; }
.note { font-size: 14px; color: var(--ink-3); line-height: 1.6; margin-top: 20px; }
.note.wide { max-width: 72ch; margin-top: 26px; }
kbd {
  display: inline-block; background: var(--canvas); border: 1px solid var(--line-2);
  border-radius: 4px; padding: 0 5px; margin: 0 1px; font-family: inherit;
  font-size: 11px; color: var(--ink-2);
}

.tinted { background: var(--sunken); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Install ---------- */
.steps {
  counter-reset: s; display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 26px 48px; max-width: 940px;
}
.step { display: flex; gap: 14px; align-items: baseline; min-width: 0; }
.step-n { counter-increment: s; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 20px; }
.step-n::before { content: counter(s) "."; }
.step-body { min-width: 0; }
.step-body h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 4px; }
.step-body p { font-size: 14.5px; color: var(--ink-2); }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px;
  background: var(--sunken); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--ink);
  overflow-wrap: anywhere;   /* short inline snippets stay inside the column */
}
/* A full command scrolls inside its own box instead of breaking mid word */
code.block {
  display: block; margin-top: 8px; padding: 8px 10px;
  white-space: pre; overflow-x: auto; overflow-wrap: normal;
  -webkit-overflow-scrolling: touch;
}

/* ---------- FAQ ---------- */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 0; min-height: 56px;
  font-size: 16.5px; font-weight: 500;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: 0 0 auto; width: 9px; height: 9px; margin-right: 4px;
  border-right: 1.75px solid var(--ink-3); border-bottom: 1.75px solid var(--ink-3);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .18s;
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-1px, -1px); }
.faq p { font-size: 15.5px; color: var(--ink-2); padding-bottom: 22px; max-width: 68ch; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line); background: var(--sunken);
  padding-top: 44px;
  padding-bottom: calc(52px + env(safe-area-inset-bottom));
}
.foot-top { display: flex; gap: 30px; flex-wrap: wrap; align-items: center; margin-bottom: 26px; }
.foot-links { display: flex; gap: 24px; margin-left: auto; font-size: 14px; color: var(--ink-2); flex-wrap: wrap; }
.foot-built { font-size: 14.5px; color: var(--ink-2); margin-bottom: 20px; }
.foot-built a {
  position: relative;
  color: var(--ink); font-weight: 600;
  border-bottom: 1px solid var(--line-2); padding-bottom: 1px;
  transition: color .15s, border-color .15s;
}
.foot-built a:active { color: var(--blue); border-color: var(--blue); }
/* invisible 44px tall hit area, keeps the underline tight to the word */
.foot-built a::after {
  content: ""; position: absolute; left: -4px; right: -4px; top: 50%;
  transform: translateY(-50%); height: var(--tap);
}
.foot-note { font-size: 13px; color: var(--ink-3); max-width: 70ch; }
.foot-note + .foot-note { margin-top: 8px; }

/* ---------- Pointer capable devices only ---------- */
/* Guarding hover stops phones from latching a hover state after a tap. */
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--ink); }
  .menu-panel a:hover { background: var(--sunken); color: var(--ink); }
  .btn-primary:hover { background: var(--blue-press); }
  .btn-ghost:hover { background: var(--sunken); color: var(--ink); }
  .card:hover { border-color: var(--line-2); transform: translateY(-2px); }
  .foot-links a:hover { color: var(--ink); }
  .foot-built a:hover { color: var(--blue); border-color: var(--blue); }
}

/* ---------- Tablet and below ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .shot { max-width: 280px; margin: 0 auto; }
  h1 { max-width: 100%; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .grid-2 { gap: 14px; }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .nav-links { display: none; }
  .nav-source { display: none; }
  /* nav-links is hidden here, so the CTA group takes over pushing to the right */
  .nav-links + .nav-cta { margin-left: auto; }
  .menu { display: block; }
  /* Comfortable touch targets from here down */
  .btn { min-height: var(--tap); padding: 11px 18px; }
  .btn-lg { min-height: 48px; }
  .foot-links a { min-height: var(--tap); display: flex; align-items: center; }
  .brand { min-height: var(--tap); }
}

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  section { padding: 52px 0; }
  .hero { padding: 40px 0 48px; }
  .sec-head { margin-bottom: 26px; }
  .grid-2 { grid-template-columns: 1fr; gap: 12px; }
  .card { padding: 20px; }
  .shot { max-width: 244px; }
  .split-media.panel { max-height: 420px; }
  .split-media.panel img { max-width: 216px; }
  .split { gap: 30px; }
  .strip-in { padding: 18px 0; gap: 10px 18px; }
  .strip-item { font-size: 14px; }
  .strip-label { width: 100%; text-align: center; }
  .flow li { font-size: 14.5px; }
  .faq summary { font-size: 16px; gap: 14px; }
  .faq p { font-size: 15px; }
  .foot-top { gap: 18px; margin-bottom: 22px; }
  .foot-links { margin-left: 0; gap: 4px 18px; font-size: 14.5px; }
  footer { padding-top: 38px; }
}

/* ---------- Small phones ---------- */
@media (max-width: 430px) {
  /* Full width buttons are easier to hit one handed */
  .hero-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-actions .btn { width: 100%; }
  .nav-in { gap: 10px; }
  .nav-cta { gap: 8px; }
  .nav-cta .btn-primary { padding: 11px 13px; font-size: 13.5px; }
  .brand { font-size: 15.5px; }
}

/* Very narrow, for example an iPhone SE */
@media (max-width: 400px) {
  /* Shorten the bar CTA rather than dropping the wordmark */
  .cta-long { display: none; }
  .cta-short { display: inline; }
  .strip-item { font-size: 13.5px; }
}

/* ---------- Landscape phones ---------- */
@media (max-height: 460px) and (orientation: landscape) {
  .hero { padding: 32px 0 36px; }
  section { padding: 48px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
