/* =============================================================
   SHARED DESIGN SYSTEM - both sites use this file.
   Theme: black field, Mustang Grabber Blue, direct editorial type.

   Structure:
   1. Tokens (colors, type, spacing)
   2. Base + layout
   3. Navigation + footer
   4. Components (cards, tiers, buttons, labels, FAQ)
   5. Hero + section treatments
   6. Animations (isolated at the bottom; safe to delete)
   7. Mobile + reduced motion
   ============================================================= */

/* ---------- 1. TOKENS ---------- */
:root {
  --bg: #05080d;
  --bg-raised: #080d14;
  --bg-panel: #0b121c;
  --line: rgba(88, 184, 255, 0.28);
  --line-soft: rgba(173, 213, 244, 0.12);
  --ink: #f4f8fc;
  --ink-dim: #b0bdc9;
  --ink-faint: #71808e;
  --grabber: #2b6be4;
  --grabber-bright: #65baff;
  --grabber-deep: #174da9;
  --accent-cyan: #54d8ca;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  --max-w: 1180px;
  --pad-x: 24px;
  --radius: 8px;
}

/* ---------- 2. BASE + LAYOUT ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: var(--grabber-bright); text-decoration: none; }
a:hover { color: #92d0ff; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad-x); }
.section { padding: 88px 0; position: relative; }
.section-tight { padding: 56px 0; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.02; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.8rem, 7vw, 5.25rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h3 { font-size: clamp(1.3rem, 2.8vw, 1.7rem); }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--ink-dim); max-width: 46em; }
.measure { max-width: 44em; }

/* small uppercase section labels */
.label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grabber-bright);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.label::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--grabber);
  flex: none;
}
.label-plain::before { display: none; }

.accent { color: var(--grabber-bright); }
.dim { color: var(--ink-dim); }

/* ---------- 3. NAVIGATION + FOOTER ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 8, 13, 0.96);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px;
}
.nav-brand {
  font-family: var(--font-mono);
  font-size: 0.8rem; letter-spacing: 0.26em;
  color: var(--ink); white-space: nowrap;
}
.nav-brand strong { color: var(--grabber-bright); font-weight: 600; }
.nav-links { display: flex; gap: 26px; align-items: center; list-style: none; }
.nav-links a { color: var(--ink-dim); font-size: 0.92rem; }
.nav-links a:hover { color: var(--ink); }
/* keep the blue CTA button readable despite the .nav-links a color */
.nav-links a.btn-blue, .nav-links a.btn-blue:hover { color: #02060a; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  color: var(--grabber-bright); font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.18em; padding: 9px 14px; border-radius: 5px; cursor: pointer;
}

.footer {
  border-top: 1px solid var(--line-soft);
  padding: 64px 0 48px;
  margin-top: 40px;
  background: var(--bg-raised);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-heading { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 16px; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; }
.footer a { color: var(--ink-dim); font-size: 0.94rem; }
.footer a:hover { color: var(--grabber-bright); }
.footer-line { color: var(--ink-faint); font-size: 0.85rem; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- 4. COMPONENTS ---------- */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; padding: 15px 28px; border-radius: 5px;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  min-height: 48px;
}
.btn:active { transform: scale(0.98); }
.btn-blue {
  background: var(--grabber-bright);
  border-color: var(--grabber-deep);
  color: #02060a;
}
.btn-blue:hover { color: #02060a; background: #86caff; box-shadow: 0 8px 26px rgba(43, 107, 228, 0.28); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { background: rgba(43, 107, 228, 0.12); color: var(--ink); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }

/* Solid content panel */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 30px;
  position: relative;
}

/* Card grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
/* grid/flex children may not force the page wider than the phone */
.grid-2 > *, .grid-3 > *, .tier-grid > *, .ladder > * { min-width: 0; }

/* Project card */
.case-card { display: flex; flex-direction: column; gap: 14px; }
.case-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.case-label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.2em; color: var(--ink-faint); }
.case-status {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em;
  padding: 4px 10px; border-radius: 4px; border: 1px solid var(--line);
  color: var(--grabber-bright); white-space: nowrap;
}
.case-status.live { color: var(--accent-cyan); border-color: rgba(63, 211, 196, 0.35); }
.case-card h3 { color: var(--ink); }
.case-card p { color: var(--ink-dim); font-size: 0.95rem; }
.case-points { list-style: none; }
.case-points li { padding-left: 20px; position: relative; color: var(--ink-dim); font-size: 0.92rem; margin-bottom: 8px; }
.case-points li::before { content: "+"; position: absolute; left: 0; color: var(--grabber-bright); font-family: var(--font-mono); }
.case-stat { border-top: 1px solid var(--line-soft); padding-top: 16px; margin-top: auto; }
.case-stat .value { font-family: var(--font-display); font-size: 1.9rem; color: var(--grabber-bright); }
.case-stat .caption { font-size: 0.82rem; color: var(--ink-faint); }
.case-link { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; }

/* Industry plan card */
.industry-card {
  display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  color: var(--ink);
}
a.industry-card:hover { transform: translateY(-3px); border-color: var(--line); color: var(--ink); }
.industry-card .num { font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-faint); letter-spacing: 0.2em; }
.industry-card h3 { font-size: 1.18rem; }
.industry-card .pain { color: var(--ink-dim); font-size: 0.92rem; }
.industry-card .angle { color: var(--ink-faint); font-size: 0.86rem; border-left: 2px solid var(--grabber); padding-left: 12px; }
.industry-card .open {
  margin-top: auto; font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.18em; color: var(--grabber-bright);
}

/* Pricing tiers */
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.tier { display: flex; flex-direction: column; gap: 16px; }
.tier.featured { border-color: var(--line); box-shadow: 0 18px 52px rgba(43, 107, 228, 0.11); }
.tier .tier-name { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--grabber-bright); }
.tier .tier-price { font-family: var(--font-display); font-size: 2.4rem; color: var(--ink); line-height: 1; }
.tier .tier-price small { font-size: 1rem; color: var(--ink-faint); font-family: var(--font-body); }
.tier .tier-tag { color: var(--ink-dim); font-size: 0.92rem; font-style: italic; }
.tier ul { list-style: none; }
.tier li { padding-left: 20px; position: relative; color: var(--ink-dim); font-size: 0.93rem; margin-bottom: 9px; }
.tier li::before { content: "+"; position: absolute; left: 0; color: var(--grabber-bright); font-family: var(--font-mono); }
.tier .btn { margin-top: auto; }

/* Add-on strip */
.addon { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; margin-top: 22px; }
.addon .addon-price { font-family: var(--font-display); font-size: 1.7rem; color: var(--grabber-bright); }
.addon ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.addon li { color: var(--ink-dim); font-size: 0.9rem; padding-left: 18px; position: relative; }
.addon li::before { content: "+"; position: absolute; left: 0; color: var(--grabber-bright); font-family: var(--font-mono); }
.addon .note { flex-basis: 100%; color: var(--ink-faint); font-size: 0.86rem; }

/* Ladder */
.ladder { display: grid; gap: 14px; counter-reset: rung; }
.ladder .rung { display: flex; gap: 22px; align-items: baseline; padding: 20px 26px; }
.ladder .rung-num { font-family: var(--font-mono); color: var(--grabber-bright); font-size: 0.85rem; letter-spacing: 0.1em; flex: none; }
.ladder .rung h3 { font-size: 1.12rem; }
.ladder .rung p { color: var(--ink-dim); font-size: 0.92rem; }

/* FAQ */
.faq { display: grid; gap: 14px; }
.faq details { background: var(--bg-panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px 24px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--grabber-bright); font-family: var(--font-mono); }
.faq details[open] summary::after { content: "-"; }
.faq details p { color: var(--ink-dim); margin-top: 12px; font-size: 0.95rem; }

/* Big quote / positioning line */
.big-line {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  line-height: 1.25;
  color: var(--ink);
  border-left: 3px solid var(--grabber);
  padding-left: clamp(18px, 4vw, 36px);
  max-width: 30em;
}

/* Module chips (floating system modules) */
.modules { display: flex; flex-wrap: wrap; gap: 10px; }
.module-chip {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-dim);
  border: 1px solid var(--line-soft); border-radius: 4px;
  padding: 8px 16px; background: rgba(255, 255, 255, 0.025);
}
.module-chip.lit { color: var(--grabber-bright); border-color: var(--line); }

/* Stat row */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.stat-block .value { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.9rem); color: var(--grabber-bright); }
.stat-block .caption { color: var(--ink-faint); font-size: 0.88rem; margin-top: 6px; }

/* ---------- 5. HERO + SECTION TREATMENTS ---------- */
.hero { padding: 110px 0 90px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(43, 107, 228, 0.11), transparent 44%);
}
.hero .wrap { position: relative; }
.hero h1 { max-width: 14em; }
.hero .lead { margin-top: 24px; }
.hero-quote { margin-top: 30px; }

/* two-column hero with cinematic clip panel */
.hero-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 48px; align-items: center; }
.hero-grid > * { min-width: 0; } /* prevents grid min-content overflow on narrow phones */
.hero-video { padding: 14px; max-width: 360px; justify-self: end; margin: 0; }
.hero-video-label { display: block; margin-bottom: 10px; }
.hero-video-frame { position: relative; aspect-ratio: 9 / 16; border-radius: 5px; overflow: hidden; background: #000; }
.hero-video-poster, .hero-video-clip {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-video-clip { z-index: 1; }
/* cinematic edge fade so the clip sits in the dark field */
.hero-video-frame::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  box-shadow: inset 0 0 60px rgba(7, 9, 13, 0.55);
}

/* section headings */
.section-head { margin-bottom: 44px; }
.section-head h2 { max-width: 18em; }
.section-head .lead { margin-top: 14px; }

/* divider line */
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); margin: 0 auto; max-width: var(--max-w); position: relative; }

/* CTA band */
.cta-band { text-align: center; padding: 90px 0; }
.cta-band h2 { margin: 0 auto; max-width: 16em; }
.cta-band .btn-row { justify-content: center; }

/* ---------- 5b. CEOMAR SCAN ---------- */
.scan-hero { padding-bottom: 28px; }
.scan-hero h1 { margin-bottom: 16px; }
.scan-tabs {
  display: flex; gap: 8px; margin-top: 28px;
  border: 1px solid var(--line-soft);
  border-radius: 8px; padding: 6px; width: fit-content; max-width: 100%;
}
.scan-tab {
  font: inherit; font-weight: 600; font-size: 0.95rem;
  background: transparent; color: var(--ink-dim);
  border: 0; border-radius: 6px;
  padding: 12px 22px; min-height: 44px; cursor: pointer;
}
.scan-tab.is-on { background: var(--grabber); color: #f4f8fc; }
.scan-card { max-width: 720px; margin: 0 auto; scroll-margin-top: 80px; }
.scan-kicker {
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 10px;
}
.scan-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.scan-ta {
  width: 100%; min-height: 220px;
  background: var(--bg-raised);
  border: 1px solid var(--line-soft);
  border-radius: 8px; color: var(--ink);
  font: inherit; font-size: 1rem; line-height: 1.6;
  padding: 16px 18px; resize: vertical;
}
.scan-ta:focus { outline: 2px solid var(--grabber-bright); outline-offset: 2px; }
.scan-card .btn { margin-top: 14px; }
.scan-msg { font-size: 0.9rem; color: #e08a6a; min-height: 1.2em; margin-top: 8px; }
.scan-result { margin-top: 28px; text-align: center; }
.scan-score {
  font-family: var(--font-display); font-size: clamp(3.4rem, 12vw, 5.2rem);
  font-weight: 700; color: var(--grabber-bright); line-height: 1; margin: 6px 0 10px;
}
.scan-result h3 { margin: 16px 0 8px; }
.scan-cats, .scan-flags { list-style: none; padding: 0; margin: 12px 0 0; text-align: left; }
.scan-cats li, .scan-flags li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.98rem;
}
.scan-cats li:last-child, .scan-flags li:last-child { border-bottom: 0; }
.scan-repair {
  border: 1px solid rgba(101, 186, 255, 0.35);
  border-radius: 8px; padding: 16px 18px; margin: 18px 0;
  text-align: left;
}
.scan-marked {
  background: var(--bg-raised); border: 1px solid var(--line-soft);
  border-radius: 8px; padding: 16px 18px; margin-top: 16px;
  text-align: left;
}
.scan-marktext { white-space: pre-wrap; word-break: break-word; line-height: 1.8; }
.scan-marked mark {
  border-radius: 4px; padding: 1px 4px;
  background: rgba(224, 138, 106, 0.28); color: #ffd0c0;
  border-bottom: 2px solid #e08a6a;
}
.scan-q {
  font-family: var(--font-display); font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 700; line-height: 1.2; margin: 8px 0 18px; text-align: left;
}
.scan-opt {
  display: block; width: 100%; text-align: left; font: inherit; font-size: 1rem;
  color: var(--ink); background: var(--bg-raised);
  border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 15px 18px; margin-bottom: 10px; cursor: pointer;
  min-height: 48px;
}
.scan-opt:hover, .scan-opt:focus { border-color: var(--grabber-bright); }
.scan-progress { height: 5px; background: rgba(255,255,255,0.07); border-radius: 3px; overflow: hidden; margin: 10px 0 22px; }
.scan-progress i { display: block; height: 100%; background: var(--grabber-bright); }
.scan-back {
  background: none; border: 0; color: var(--ink-faint); font: inherit;
  font-size: 0.9rem; cursor: pointer; padding: 12px 0; min-height: 44px;
}
.scan-back:hover { color: var(--ink); }
.scan-field { display: block; text-align: left; margin: 12px 0; color: var(--ink-dim); }
.scan-field input {
  display: block; width: 100%; margin-top: 6px;
  background: var(--bg-raised); border: 1px solid var(--line-soft);
  border-radius: 8px; color: var(--ink); font: inherit; padding: 12px 14px;
}
.scan-hunt {
  border-top: 1px solid var(--line-soft); margin-top: 22px; padding-top: 18px;
  text-align: left;
}
.scan-hunt-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.scan-email {
  flex: 1 1 220px; background: var(--bg-raised);
  border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); font: inherit; padding: 12px 14px; min-height: 48px;
}
.scan-cta { justify-content: center; }
.scan-types { list-style: none; max-width: 44em; }
.scan-types li { margin-bottom: 12px; color: var(--ink-dim); }
.scan-types strong { color: var(--ink); }
.scan-crawl { color: var(--ink-dim); }
.scan-crawl summary { cursor: pointer; color: var(--grabber-bright); min-height: 44px; }
.scan-crawl-list { margin: 16px 0 0 1.1em; }
.scan-crawl-list ul { margin: 6px 0 16px 1.1em; }

/* ---------- 6. ANIMATIONS (isolated; safe to remove) ---------- */
/* Reveals only activate when JS adds .js to <html>. Without JS,
   everything is fully visible. site.js handles the observer. */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }

/* ---------- 7. MOBILE + REDUCED MOTION ---------- */
@media (max-width: 920px) {
  .grid-3, .tier-grid, .stat-row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-video { justify-self: start; max-width: 300px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .hero { padding: 72px 0 64px; }
  .hero-video { max-width: 100%; width: 100%; }
  .hero-video-frame { aspect-ratio: 4 / 5; } /* tighter crop saves scroll on phones */
  .grid-2, .grid-3, .tier-grid, .stat-row, .footer-grid { grid-template-columns: 1fr; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(7, 9, 13, 0.97); flex-direction: column; align-items: flex-start;
    padding: 22px var(--pad-x) 28px; gap: 18px; border-bottom: 1px solid var(--line-soft);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
  .scan-tabs { width: 100%; }
  .scan-tab { flex: 1; }
  .scan-hunt-row { flex-direction: column; }
  .ladder .rung { flex-direction: column; gap: 8px; }
}
input, select, textarea { font-size: 16px; } /* prevents iOS zoom */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  /* show the still poster instead of the moving clip */
  .hero-video-clip { display: none; }
}
