/* Shared by index.html, analysis.html and 360code.html.
   Same theme as before (near-black, lime #c8f000, Inter + JetBrains Mono);
   the layout patterns — thin global nav, sticky product sub-nav, stacked
   product tiles, card gallery, directory footer — are borrowed from apple.com. */

:root {
  --bg: #070707;
  --bg-2: #050505;
  --surface: #101010;
  --surface-2: #161616;
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.12);
  --text: #f5f5f7;
  --muted: rgba(255,255,255,0.56);
  --faint: rgba(255,255,255,0.36);
  --lime: #c8f000;
  --lime-hi: #dcff4a;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
a { color: var(--lime); text-decoration: none; }
a:hover { color: var(--lime-hi); }
::selection { background: rgba(200,240,0,0.25); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
img { display: block; max-width: 100%; height: auto; }
section[id] { scroll-margin-top: 64px; }

/* ── Global nav ─────────────────────────────────────────── */
.gnav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(7,7,7,0.8);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
/* On product pages the global nav scrolls away and the sub-nav sticks, as on apple.com. */
.has-lnav .gnav { position: relative; }
.gnav-in {
  max-width: 1024px; height: 48px; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--lime); color: #000;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
}
.brand-name { font-size: 14px; font-weight: 600; letter-spacing: -0.2px; }
.gnav-links { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); list-style: none; }
.gnav-links a { font-size: 12.5px; color: rgba(255,255,255,0.8); }
.gnav-links a:hover, .gnav-links a[aria-current="page"] { color: #fff; }
.gnav-links a[aria-current="page"] { font-weight: 600; }
.gnav-cta { font-size: 12.5px; }
.gnav-toggle {
  display: none; width: 40px; height: 40px; margin-right: -10px;
  background: none; border: 0; color: #fff; cursor: pointer;
}
.gnav-toggle span, .gnav-toggle span::before, .gnav-toggle span::after {
  display: block; position: relative; width: 17px; height: 1.5px; margin: 0 auto;
  background: currentColor; border-radius: 1px; transition: transform .25s, top .25s;
}
.gnav-toggle span::before, .gnav-toggle span::after { content: ''; position: absolute; left: 0; }
.gnav-toggle span::before { top: -5px; }
.gnav-toggle span::after { top: 5px; }
.gnav.open .gnav-toggle span { background: transparent; }
.gnav.open .gnav-toggle span::before { top: 0; transform: rotate(45deg); }
.gnav.open .gnav-toggle span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 767px) {
  .gnav-toggle { display: block; }
  .gnav-cta { display: none; }
  .gnav-links {
    display: none; position: absolute; top: 48px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 28px; background: rgba(7,7,7,0.97);
    border-bottom: 1px solid var(--line);
  }
  .gnav.open .gnav-links { display: flex; }
  .gnav-links a { display: block; padding: 12px 0; font-size: 22px; font-weight: 600; color: #fff; }
}

/* ── Product sub-nav (sticky) ───────────────────────────── */
.lnav {
  position: sticky; top: 0; z-index: 150;
  background: rgba(7,7,7,0.8);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.lnav-in {
  max-width: 1024px; height: 52px; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 20px;
}
.lnav-title { font-size: 19px; font-weight: 600; letter-spacing: -0.3px; color: #fff; margin-right: auto; }
.lnav-title:hover { color: #fff; }
.lnav-links { display: flex; gap: 22px; list-style: none; }
.lnav-links a { font-size: 12px; color: rgba(255,255,255,0.75); }
.lnav-links a:hover { color: #fff; }
@media (max-width: 767px) { .lnav-links { display: none; } }

/* ── Buttons ────────────────────────────────────────────── */
.btn, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px; border-radius: 999px; font-size: 15px; font-weight: 500;
  border: 1px solid var(--lime); transition: background .2s, color .2s;
}
.btn { background: var(--lime); color: #000; }
.btn:hover { background: var(--lime-hi); color: #000; }
.btn-ghost { background: transparent; color: var(--lime); }
.btn-ghost:hover { background: var(--lime); color: #000; }
.btn-sm { padding: 5px 13px; font-size: 12px; }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 22px; }
.ctas.left { justify-content: flex-start; }

/* ── Type ───────────────────────────────────────────────── */
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--lime); }
.display { font-size: clamp(40px, 7vw, 80px); font-weight: 700; line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; }
.headline { font-size: clamp(34px, 5vw, 56px); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
.title { font-size: clamp(26px, 3.2vw, 40px); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; text-wrap: balance; }
.lede { font-size: clamp(18px, 2vw, 24px); line-height: 1.4; color: var(--muted); font-weight: 500; text-wrap: balance; }
.body { font-size: 16px; line-height: 1.6; color: var(--muted); }
.lime { color: var(--lime); }
.grad {
  background: linear-gradient(90deg, #c8f000 0%, #6ee7b7 55%, #38bdf8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.center { text-align: center; }
.wrap { max-width: 1024px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 10vw, 136px) 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ── Product tiles (home) ───────────────────────────────── */
.tile {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(48px, 6vw, 64px) var(--gutter) 0;
  border-bottom: 12px solid var(--bg);
  background: var(--surface);
}
.tile.hero { background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(200,240,0,0.10), transparent 70%), var(--bg); }
.tile .eyebrow { margin-bottom: 12px; }
.tile .lede { max-width: 640px; margin: 12px auto 0; }
.tile-media { max-width: 1000px; margin: clamp(36px, 5vw, 56px) auto 0; }
.tiles-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 12px; background: var(--bg); }
.tiles-2 .tile { border-bottom: 0; padding-bottom: clamp(48px, 6vw, 64px); min-height: 480px; display: flex; flex-direction: column; justify-content: center; }
.tiles-2 .tile .headline { font-size: clamp(30px, 3.6vw, 44px); }
@media (max-width: 767px) { .tiles-2 { grid-template-columns: 1fr; } .tiles-2 .tile { min-height: 380px; } }

/* A screenshot presented as an app window. */
.window {
  border: 1px solid var(--line-2); border-radius: 14px 14px 0 0; border-bottom: 0;
  overflow: hidden; background: #0a0a0a; box-shadow: 0 -20px 80px rgba(0,0,0,0.5);
}
.window.whole { border-radius: 14px; border-bottom: 1px solid var(--line-2); box-shadow: 0 40px 100px rgba(0,0,0,0.7); }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #0d0d0d; border-bottom: 1px solid var(--line); }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a3a; }
.window-bar i:nth-child(1) { background: #ff5f57; }
.window-bar i:nth-child(2) { background: #febc2e; }
.window-bar i:nth-child(3) { background: #28c840; }
.window-bar span { flex: 1; text-align: center; margin-right: 44px; font-family: var(--mono); font-size: 10.5px; color: var(--faint); }

/* ── Card gallery (horizontal scroll) ───────────────────── */
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.gallery {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 40px var(--gutter) 24px; scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
@media (min-width: 1100px) { .gallery { padding-left: calc((100vw - 1024px) / 2 + var(--gutter)); scroll-padding-left: calc((100vw - 1024px) / 2 + var(--gutter)); } }
.card {
  flex: 0 0 clamp(260px, 30vw, 340px); scroll-snap-align: start;
  min-height: 420px; padding: 30px 28px; border-radius: 26px;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.card .eyebrow { color: var(--faint); margin-bottom: 14px; }
.card h3 { font-size: 26px; font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }
.card p { margin-top: 14px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.card .big { margin-top: auto; font-size: 64px; font-weight: 800; letter-spacing: -0.04em; color: var(--lime); line-height: 1; }
.gallery-nav { display: flex; gap: 10px; }
.gallery-nav button {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,0.1); color: #fff; font-size: 16px;
}
.gallery-nav button:hover { background: rgba(255,255,255,0.18); }
@media (max-width: 767px) { .gallery-nav { display: none; } }

/* ── Compare ("Which is right for you?") ────────────────── */
.compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 56px; }
@media (max-width: 860px) { .compare { grid-template-columns: 1fr; } }
.compare-col {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 36px 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
}
.compare-col.featured { border-color: rgba(200,240,0,0.45); background: linear-gradient(180deg, rgba(200,240,0,0.07), rgba(200,240,0,0) 60%), var(--surface); }
.compare-col h3 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 10px; }
.compare-col .who { margin-top: 6px; font-size: 14px; color: var(--muted); }
.compare-col .price { margin-top: 22px; font-size: 15px; color: var(--text); font-weight: 600; }
.compare-col ul { list-style: none; margin: 24px 0 28px; width: 100%; border-top: 1px solid var(--line); }
.compare-col li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--muted); }
.compare-col .ctas { margin-top: auto; }

/* ── Feature rows and grids ─────────────────────────────── */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(32px, 5vw, 72px); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.panel { display: flex; flex-direction: column; padding: 30px 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.panel h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.panel p { margin-top: 10px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.panel .num { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; color: var(--lime); margin-bottom: 18px; }
/* Pinned to the bottom so prices line up across a row whatever the copy above. */
.panel .price { margin-top: auto; padding-top: 20px; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.panel .price small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--faint); letter-spacing: 0; }
.panel.featured { border-color: rgba(200,240,0,0.4); background: linear-gradient(180deg, rgba(200,240,0,0.06), transparent 70%), var(--surface); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.stat { border-top: 1px solid var(--line-2); padding-top: 18px; }
.stat b { display: block; font-size: clamp(44px, 5vw, 64px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.stat span { display: block; margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--muted); }

.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 16px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-weight: 600; color: var(--text); }
.table td { color: var(--muted); }
.table td.r, .table th.r { text-align: right; white-space: nowrap; padding-left: 16px; }
.fine { font-size: 13px; line-height: 1.6; color: var(--faint); }

/* ── Footer (directory) ─────────────────────────────────── */
.foot { background: var(--bg-2); border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); }
.foot-in { max-width: 1024px; margin: 0 auto; padding: 32px var(--gutter) 24px; }
.foot-dir { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.foot-dir h4 { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.85); margin-bottom: 10px; }
.foot-dir ul { list-style: none; }
.foot-dir li { margin-bottom: 8px; }
.foot-dir a { color: var(--faint); }
.foot-dir a:hover { color: #fff; text-decoration: underline; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 18px; }
.foot-legal nav { display: flex; gap: 18px; }
.foot-legal a { color: var(--muted); }
.foot-legal a:hover { color: #fff; }
@media (max-width: 767px) { .foot-dir { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Scroll reveal ──────────────────────────────────────── */
/* Only hidden once site.js has run (it adds .js), so content never
   disappears if the script fails to load. */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Client logos ───────────────────────────────────────── */
.clients { padding: clamp(48px, 6vw, 72px) 0; border-bottom: 1px solid var(--line); }
.clients .eyebrow { text-align: center; color: var(--faint); }
.logos {
  list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px; margin-top: 32px;
}
.logos li { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.logos .mark { height: 96px; display: flex; align-items: center; justify-content: center; }
/* Crests are tall and OPSM is a wide wordmark: capping both sides keeps them
   the same visual weight. */
.logos img { max-height: 96px; max-width: 150px; width: auto; }
.logos span { font-size: 12px; line-height: 1.4; color: var(--faint); }
@media (max-width: 767px) {
  .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .logos .mark { height: 80px; }
  .logos img { max-height: 80px; max-width: 130px; }
}
