/* =============================================================
   CamRelay — Marketing Site
   Dark, native Mac-tool aesthetic. Blue → cyan signal accent.
   ============================================================= */

:root {
  --bg: #0B0E16;
  --bg-2: #0E1220;
  --surface: #141B2B;
  --surface-2: #1A2233;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);

  --text: #EAEEF7;
  --text-soft: #9AA6BE;
  --text-dim: #6B7690;

  --brand: #5B8CFA;
  --brand-2: #43D6C4;
  --brand-dk: #3E6FE0;
  --rec: #FF5A5F;

  --grad: linear-gradient(120deg, var(--brand), var(--brand-2));

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 20px 44px rgba(0, 0, 0, 0.4);
  --glow: 0 12px 40px rgba(91, 140, 250, 0.35);

  --radius: 20px;
  --radius-sm: 14px;
  --maxw: 1120px;
  --ease: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.5rem;
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; color: var(--text); font-weight: 600; letter-spacing: -0.015em; }
a { color: inherit; text-decoration: none; }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: 0.5rem;
}

/* ============================ Buttons ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.8rem 1.5rem;
  border-radius: 100px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), color var(--ease), border-color var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad);
  color: #08131f;
  box-shadow: var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 46px rgba(91, 140, 250, 0.5); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--brand); transform: translateY(-2px); }
.btn-lg { font-size: 1.05rem; padding: 0.95rem 1.9rem; }

/* ============================ Header ============================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 22, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
}
.brand { display: flex; align-items: center; gap: 0.65rem; font-family: var(--display); font-weight: 600; }
.brand-badge { width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-kicker { font-family: var(--sans); font-weight: 700; font-size: 0.58rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); }
.brand-name { font-size: 1.18rem; color: var(--text); letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 1.7rem; list-style: none; }
.nav-links a { font-weight: 600; font-size: 0.93rem; color: var(--text-soft); transition: color var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-cta { padding: 0.5rem 1.15rem; font-size: 0.88rem; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.4rem; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--text); border-radius: 2px; margin: 5px 0; transition: var(--ease); }

/* ============================ Hero ============================ */
.hero {
  position: relative;
  padding: 5.5rem 0 3.5rem;
  background:
    radial-gradient(90% 60% at 50% -8%, rgba(91, 140, 250, 0.22), transparent 62%),
    radial-gradient(70% 50% at 85% 0%, rgba(67, 214, 196, 0.12), transparent 60%),
    var(--bg);
  overflow: hidden;
}
.hero-inner { max-width: 820px; margin-inline: auto; text-align: center; }
.hero h1 {
  font-size: clamp(2.5rem, 6.6vw, 4.4rem);
  font-weight: 700;
  margin: 1.1rem 0 0.9rem;
}
.hero h1 .u {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lede { font-size: clamp(1.08rem, 2.2vw, 1.3rem); color: var(--text-soft); max-width: 640px; margin: 0 auto 1.9rem; }
.hero-ctas { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }
.hero-price { margin-top: 1.1rem; font-size: 1rem; font-weight: 600; color: var(--text-soft); }
.hero-price strong { color: var(--brand-2); font-weight: 800; }
.hero-sub { margin-top: 0.5rem; font-size: 0.84rem; font-weight: 600; color: var(--text-dim); letter-spacing: 0.01em; }
.hero-scene { margin-top: 3rem; width: 100%; max-width: 920px; margin-inline: auto; display: block; }

/* Hero devices: camera Mac (host) → encrypted stream → your Mac (client) */
.hero-devices {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.25rem, 2.5vw, 1.5rem);
  max-width: 920px;
  margin-inline: auto;
}
.device { flex: 1 1 0; max-width: 380px; margin: 0; text-align: center; }
.device img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 24px 44px rgba(0, 0, 0, 0.45));
}
.device figcaption {
  display: inline-flex; align-items: center; gap: 0.45rem;
  margin-top: 0.4rem;
  font-family: var(--sans); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.02em; color: var(--text-soft);
}
.device figcaption .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-2); box-shadow: 0 0 0 3px rgba(67, 214, 196, 0.2);
}

.hero-stream {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  width: clamp(56px, 9vw, 130px);
}
.hero-stream-line {
  width: 100%; height: 3px; border-radius: 3px;
  background-image: repeating-linear-gradient(90deg, var(--brand) 0 6px, transparent 6px 14px);
  animation: stream-flow 1s linear infinite;
}
/* dashes travel left → right (host → client) */
@keyframes stream-flow { from { background-position: 0 0; } to { background-position: 20px 0; } }
.hero-stream-badge {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: #0E1220; border: 1px solid rgba(91, 140, 250, 0.5);
}
.hero-stream-badge svg { width: 20px; height: 20px; }
.hero-stream-label {
  font-size: 0.66rem; font-weight: 600; color: var(--text-dim);
  letter-spacing: 0.02em; text-align: center; line-height: 1.2;
}

@media (max-width: 680px) {
  .hero-devices { flex-direction: column; gap: 1rem; }
  .device { max-width: 300px; }
  /* connector is vertical when the images stack; dashes travel top → bottom */
  .hero-stream { flex-direction: column; width: auto; }
  .hero-stream-line {
    width: 3px; height: 44px;
    background-image: repeating-linear-gradient(180deg, var(--brand) 0 6px, transparent 6px 14px);
    animation: stream-flow-v 1s linear infinite;
  }
}
@keyframes stream-flow-v { from { background-position: 0 0; } to { background-position: 0 20px; } }

/* status chip */
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  color: var(--text-soft);
  font-weight: 700; font-size: 0.74rem; letter-spacing: 0.04em;
  padding: 0.4rem 0.9rem; border-radius: 100px;
}
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 0 3px rgba(255, 90, 95, 0.25); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ============================ Section shell ============================ */
section { position: relative; }
.section { padding: 4.75rem 0; }
.section-head { max-width: 720px; margin: 0 auto 2.75rem; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0.3rem 0 0.7rem; }
.section-head p { font-size: 1.08rem; color: var(--text-soft); }

/* ============================ Use cases (pillars) ============================ */
.usecases { background: var(--bg-2); border-block: 1px solid var(--line); }
.pillar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.3rem; }
.pillar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.pillar-ico {
  width: 54px; height: 54px; border-radius: 15px;
  display: grid; place-items: center; margin-bottom: 1rem; font-size: 1.55rem;
  background: linear-gradient(135deg, rgba(91, 140, 250, 0.18), rgba(67, 214, 196, 0.14));
  border: 1px solid var(--line);
}
.pillar h3 { font-size: 1.24rem; margin-bottom: 0.5rem; }
.pillar p { color: var(--text-soft); font-size: 0.98rem; }
.usecases-more { text-align: center; color: var(--text-dim); font-size: 1rem; margin-top: 2rem; max-width: 680px; margin-inline: auto; }

/* ============================ How it works (steps) ============================ */
.how { background: var(--bg); }
.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.3rem; counter-reset: step; }
.step {
  position: relative;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
}
.step-num {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  color: #08131f; background: var(--grad);
  margin-bottom: 1rem; box-shadow: var(--glow);
}
.step h3 { font-size: 1.2rem; margin-bottom: 0.45rem; }
.step p { color: var(--text-soft); font-size: 0.97rem; }
.step em { color: var(--text); font-style: normal; font-weight: 600; }
.step strong { color: var(--brand-2); font-weight: 700; }

/* ============================ Features ============================ */
.features { background: var(--bg-2); border-block: 1px solid var(--line); }
.features .eyebrow { color: var(--brand); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; }
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.5rem 1.4rem;
  transition: background var(--ease), transform var(--ease), border-color var(--ease);
}
.feature:hover { background: var(--surface-2); transform: translateY(-4px); border-color: var(--line-strong); }
.feature-ico {
  width: 50px; height: 50px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 0.95rem;
  color: var(--brand-2);
  background: linear-gradient(135deg, rgba(91, 140, 250, 0.18), rgba(67, 214, 196, 0.14));
  border: 1px solid var(--line);
}
.feature-ico svg { width: 26px; height: 26px; display: block; }
.feature h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.feature p { color: var(--text-soft); font-size: 0.92rem; }

/* ============================ FAQ ============================ */
.faq { background: var(--bg); }
.faq-list { max-width: 780px; margin-inline: auto; display: flex; flex-direction: column; gap: 0.7rem; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer; list-style: none;
  font-family: var(--sans); font-weight: 700; font-size: 1.02rem; color: var(--text);
  padding: 1.1rem 1.3rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q .chev { transition: transform var(--ease); color: var(--brand-2); flex-shrink: 0; font-size: 1.5rem; line-height: 1; }
.faq-item[open] .chev { transform: rotate(45deg); }
.faq-item[open] { border-color: var(--line-strong); }
.faq-a { overflow: hidden; }
.faq-a-inner { padding: 0 1.3rem 1.15rem; color: var(--text-soft); font-size: 0.98rem; }

/* ============================ Final CTA ============================ */
.final {
  text-align: center; overflow: hidden;
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(91, 140, 250, 0.2), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  border-top: 1px solid var(--line);
}
.final h2 { font-size: clamp(2rem, 5vw, 3rem); max-width: 640px; margin: 0.3rem auto 1rem; }
.final .eyebrow { color: var(--brand-2); }
.final > .container > p { color: var(--text-soft); max-width: 540px; margin: 0 auto 2rem; font-size: 1.08rem; }
.final .hero-ctas { margin-bottom: 0.9rem; }
.final-note { font-size: 0.82rem; color: var(--text-dim); }

/* ============================ Footer ============================ */
.site-footer { background: #070A11; color: var(--text-soft); padding: 2.5rem 0 2rem; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer-links { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.92rem; font-weight: 600; color: var(--text-soft); transition: color var(--ease); }
.footer-links a:hover { color: var(--brand-2); }
.footer-bottom {
  margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: 0.85rem; color: var(--text-dim);
}

/* ============================ Responsive ============================ */
@media (max-width: 860px) {
  .nav-links, .nav > .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1rem;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
}

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