/* ClearSight Edge marketing site. Colours match the operator console. */
:root {
  --page: #070b10;
  --panel: #0d131b;
  --panel-2: #101822;
  --border: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-ink: #04131a;
  --alarm: #ef4444;
  --amber: #f59e0b;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 10px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: #67e8f9; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 .6em;
  letter-spacing: -.005em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: .6rem 1rem; border-radius: 6px; font-weight: 600;
}
.skip-link:focus { top: 1rem; color: var(--accent-ink); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.875rem; padding: .7rem 1.35rem;
  background: var(--accent); color: var(--accent-ink);
  border: 2px solid var(--accent); border-radius: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  text-decoration: none; letter-spacing: .01em;
  transition: background-color .15s ease, color .15s ease;
}
.btn:hover { background: #67e8f9; border-color: #67e8f9; color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--panel); border-color: var(--muted); color: var(--text); }
.btn-small { min-height: 2.5rem; padding: .45rem 1rem; font-size: 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 11, 16, .92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark { width: 1.75rem; height: 1.75rem; flex: none; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: .005em; }
.brand-word span { font-weight: 500; color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav ul { display: flex; gap: 1.4rem; list-style: none; }
.site-nav ul a { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-nav ul a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  width: 2.75rem; height: 2.75rem;
  background: transparent; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 1.2rem; height: 2px; background: currentColor; margin: 0 auto;
  position: relative; transition: transform .2s ease;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 52rem) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 1rem;
    padding: 1rem var(--gutter) 1.5rem;
    background: var(--page); border-bottom: 1px solid var(--border);
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: .7rem 0; border-bottom: 1px solid var(--border); font-size: 1.1rem; }
  .no-js .site-nav { display: flex; position: static; }
}

/* Hero */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(60rem 30rem at 85% 10%, rgba(34, 211, 238, .07), transparent 70%),
    var(--page);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(0, 11fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
.hero-copy h1 { max-width: 20ch; }
.lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: #cbd5e1; max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 1.25rem; }
.hero-note {
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--muted); font-size: .98rem; margin: 0;
}
.hero-note::before {
  content: ""; width: .6rem; height: .6rem; border-radius: 50%;
  border: 2px solid var(--accent); flex: none;
}

.hero-figure { margin: 0; }
.scene { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(34, 211, 238, .06); }
.hero-figure figcaption { color: var(--muted); font-size: .92rem; margin-top: .85rem; max-width: 40rem; }

.svg-label { font-family: var(--font-display); font-size: 13px; font-weight: 600; }
.svg-tag { font-family: var(--font-display); font-size: 12px; font-weight: 600; }
.svg-hud { font-family: var(--font-display); font-size: 13px; font-weight: 500; }
.svg-toast-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.svg-toast-body { font-family: var(--font-body); font-size: 12px; }

/* One deliberate motion moment: the alert box pulses and the zone tape drifts. */
@media (prefers-reduced-motion: no-preference) {
  .zone-line { animation: tape 1.6s linear infinite; }
  .alert-box { animation: alert 1.8s ease-in-out infinite; }
  .rec-dot { animation: blink 1.6s steps(2, start) infinite; }
  .toast { animation: toast-in .5s ease-out 1.2s both; }
}
@keyframes tape { to { stroke-dashoffset: -34; } }
@keyframes alert { 50% { fill-opacity: .2; } }
@keyframes blink { to { visibility: hidden; } }
@keyframes toast-in { from { opacity: 0; } to { opacity: 1; } }

.targets-row { margin-top: clamp(2rem, 4vw, 3rem); }
.targets {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel);
}
.targets > div { padding: 1.1rem 1.4rem; }
.targets > div + div { border-left: 1px solid var(--border); }
.targets dt { color: var(--muted); font-size: .95rem; }
.targets dd { margin: .2rem 0 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); color: var(--text); }
.targets-note { color: var(--muted); font-size: .95rem; margin: .8rem 0 0; }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; border-bottom: 1px solid var(--border); }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: #cbd5e1; font-size: 1.1rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.prose { max-width: 40rem; color: #cbd5e1; }
.prose p:last-child { margin-bottom: 0; }

.problem h2 { max-width: 18ch; }

/* Suites: one band split into three, each with its own signal colour. */
.suites {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}
.suite { padding: clamp(1.5rem, 3vw, 2.25rem); border-top: 3px solid var(--suite-colour); }
.suite + .suite { border-left: 1px solid var(--border); }
.suite-hygiene { --suite-colour: var(--accent); }
.suite-safety { --suite-colour: var(--amber); }
.suite-loss { --suite-colour: var(--alarm); }
.suite-icon { width: 2.5rem; height: 2.5rem; color: var(--suite-colour); margin-bottom: 1rem; }
.suite h3 { font-size: 1.6rem; margin-bottom: .3rem; }
.suite > p { color: var(--muted); }
.suite ul { list-style: none; display: grid; gap: .65rem; }
.suite li { position: relative; padding-left: 1.4rem; }
.suite li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: .7rem; height: .5rem;
  border: 1.5px dashed var(--suite-colour); border-radius: 1px;
}

/* How it works */
.how { background: linear-gradient(180deg, var(--page), #0a1017); }
.flow {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem;
  counter-reset: step;
}
.flow-step {
  position: relative;
  padding: 1.5rem 1.4rem 1.6rem;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  counter-increment: step;
}
.flow-step::before {
  content: "Step " counter(step);
  display: block; color: var(--muted); font-size: .9rem; margin-bottom: .9rem;
}
.flow-step:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; right: -1.25rem;
  width: 1.25rem; height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 9px);
}
.flow-icon { width: 2.75rem; height: 2.75rem; color: var(--accent); margin-bottom: 1rem; }
.flow-step h3 { margin-bottom: .4rem; }
.flow-step p { color: #cbd5e1; margin: 0; font-size: 1rem; }

.console { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.console-title { font-size: 1.5rem; margin-bottom: 1.25rem; }
.console-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0; margin: 0;
  border-top: 1px solid var(--border);
}
.console-grid > div { padding: 1.25rem 1.5rem 1.25rem 0; border-bottom: 1px solid var(--border); }
.console-grid > div:nth-child(even) { padding-left: 1.5rem; border-left: 1px solid var(--border); }
.console-grid dt { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin-bottom: .25rem; }
.console-grid dd { margin: 0; color: #cbd5e1; max-width: 32rem; }

/* Privacy */
.data-split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.data-col { padding: clamp(1.5rem, 3vw, 2rem); }
.data-local { background: var(--panel); }
.data-cloud { background: var(--panel-2); border-left: 1px dashed #334155; }
.data-col h3 { display: flex; align-items: center; gap: .6rem; }
.data-col h3::before { content: ""; width: .75rem; height: .75rem; border-radius: 50%; flex: none; }
.data-local h3::before { background: var(--accent); }
.data-cloud h3::before { border: 2px solid var(--accent); }
.data-col ul { list-style: none; display: grid; gap: .6rem; }
.data-col li { padding-left: 1.2rem; position: relative; color: #cbd5e1; }
.data-col li::before { content: ""; position: absolute; left: 0; top: .7em; width: .5rem; height: 2px; background: var(--muted); }
.data-foot { margin: 1.1rem 0 0; color: var(--muted); font-size: .95rem; }

.facts { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2rem; margin-top: 2.5rem; }
.facts li { color: #cbd5e1; }
.facts strong { display: block; color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin-bottom: .2rem; }

/* Deployment */
.deploy-lead { color: #cbd5e1; font-size: 1.1rem; max-width: 26rem; }
.spec { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: .9rem 1.2rem; border-bottom: 1px solid var(--border); }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.spec th { width: 38%; color: var(--muted); font-weight: 500; }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.5rem, 5vw, 4rem); }
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 0;
  font-family: var(--font-display); font-weight: 600; font-size: 1.2rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: .65rem; height: .65rem;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg) translateY(-3px);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details p { color: #cbd5e1; margin: 0 0 1.25rem; max-width: 44rem; }

/* Call to action */
.cta { padding: clamp(3.5rem, 8vw, 6rem) 0; background: radial-gradient(40rem 20rem at 50% 100%, rgba(34, 211, 238, .08), transparent 70%), var(--page); }
.cta-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta-inner p { color: #cbd5e1; max-width: 34rem; font-size: 1.1rem; margin-bottom: 1.75rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; color: var(--muted); font-size: .95rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2rem; }
.footer-inner p { margin: 0; }
.footer-inner p:last-child { margin-left: auto; }
.brand-small .brand-word { font-size: 1.1rem; }
.brand-small .brand-mark { width: 1.4rem; height: 1.4rem; }

/* Responsive */
@media (max-width: 60rem) {
  .hero-grid, .two-col, .faq-wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-copy h1 { max-width: 22ch; }
  .suites { grid-template-columns: minmax(0, 1fr); }
  .suite + .suite { border-left: 0; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-step:nth-child(2)::after { display: none; }
  .facts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .targets { grid-template-columns: minmax(0, 1fr); }
  .targets > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow-step:not(:last-child)::after {
    display: block; top: auto; bottom: -1.25rem; right: auto; left: 2rem;
    width: 2px; height: 1.25rem;
    background: repeating-linear-gradient(180deg, var(--accent) 0 5px, transparent 5px 9px);
  }
  .console-grid { grid-template-columns: minmax(0, 1fr); }
  .console-grid > div, .console-grid > div:nth-child(even) { padding: 1.1rem 0; border-left: 0; }
  .data-split { grid-template-columns: minmax(0, 1fr); }
  .data-cloud { border-left: 0; border-top: 1px dashed #334155; }
  .spec th, .spec td { display: block; width: 100%; padding: .2rem 1rem; border: 0; }
  .spec th { padding-top: .9rem; }
  .spec td { padding-bottom: .9rem; border-bottom: 1px solid var(--border); }
  .footer-inner p:last-child { margin-left: 0; }
  .hero-actions .btn { flex: 1 1 auto; }
}

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