/* ==========================================================================
   Clarity v2 — "Command Centre"
   A control-room aesthetic borrowed from Clarity's real client portal:
   deep navy, teal live-signal, mono telemetry labels. Logo orange = CTA/brand.
   ========================================================================== */

:root {
  /* Portal-derived control-room palette */
  --ink:      #0a111d;   /* page background (deep navy) */
  --ink-2:    #0c1420;   /* portal ink */
  --panel:    #101d2e;   /* card background */
  --panel-2:  #16273b;   /* raised panel */
  --line:     #22374f;   /* borders */
  --line-2:   #2c435e;
  --text:     #e8eff8;   /* primary text */
  --muted:    #8ea0b8;   /* secondary text */
  --faint:    #5f7185; /* placeholder text */

  /* Signal colours (state) */
  --signal:   #46e0c2;   /* teal — protected / live / active */
  --signal-d: #2bb8a0;
  --attention:#f2b45a;   /* amber — needs attention */
  --alert:    #f2766b;   /* red — threat / alert */
  --info:     #5aa6f2;   /* blue — informational */

  /* Brand (logo) */
  --brand:    #f49a3c;   /* orange — primary CTA / brand accent */
  --brand-d:  #e07f1c;
  --brand-blue:#3f8ec2;  /* steel-blue from the logo, brightened for on-dark legibility */
  --brand-blue-d:#2d6488;/* the logo's true steel-blue */

  /* Effects */
  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 9px;
  --shadow: 0 24px 60px -24px rgba(0,0,0,.7);
  --glow-signal: 0 0 0 1px rgba(70,224,194,.25), 0 0 30px -6px rgba(70,224,194,.4);
  --glow-brand: 0 12px 30px -10px rgba(244,154,60,.6);

  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1220px;
}

* , *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  background:
    radial-gradient(1000px 600px at 85% -5%, rgba(58,122,165,.18), transparent 60%),
    radial-gradient(800px 500px at 0% 100%, rgba(70,224,194,.08), transparent 55%),
    var(--ink);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 26px; }
.section { padding: 100px 0; position: relative; }
.section--tight { padding: 64px 0; }
.center { text-align: center; }

/* Mono eyebrow / telemetry label */
.tag {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--brand-blue); font-weight: 500;
}
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-blue);
  box-shadow: 0 0 0 0 rgba(63,142,194,.6); animation: pulse-b 2.6s infinite; }
.tag--teal { color: var(--signal); }
.tag--teal::before { background: var(--signal); box-shadow: 0 0 0 0 rgba(70,224,194,.6); animation: pulse 2.6s infinite; }
.tag--amber { color: var(--attention); }
.tag--amber::before { background: var(--attention); box-shadow: 0 0 0 0 rgba(242,180,90,.6); animation: pulse-a 2.6s infinite; }

@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(70,224,194,.55)} 70%{box-shadow:0 0 0 9px rgba(70,224,194,0)} 100%{box-shadow:0 0 0 0 rgba(70,224,194,0)} }
@keyframes pulse-b { 0%{box-shadow:0 0 0 0 rgba(63,142,194,.55)} 70%{box-shadow:0 0 0 9px rgba(63,142,194,0)} 100%{box-shadow:0 0 0 0 rgba(63,142,194,0)} }
@keyframes pulse-a { 0%{box-shadow:0 0 0 0 rgba(242,180,90,.55)} 70%{box-shadow:0 0 0 9px rgba(242,180,90,0)} 100%{box-shadow:0 0 0 0 rgba(242,180,90,0)} }

/* ---------- Typography ---------- */
h1,h2,h3,h4 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: -.02em; color: #fff; }
h1 { font-size: clamp(2.6rem, 5.5vw, 4.4rem); }
h2 { font-size: clamp(2rem, 3.8vw, 3rem); }
h3 { font-size: 1.3rem; }
.lead { font-size: 1.18rem; color: var(--muted); }
.display-num { font-family: var(--display); font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.text-signal { color: var(--signal); }
.text-brand { color: var(--brand); }
.section-head { max-width: 720px; margin: 0 auto 60px; text-align: center; }
.section-head h2 { margin-top: 14px; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 1.1rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px; font-weight: 600; font-size: .98rem; border: 1px solid transparent; transition: .22s; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--brand); color: #2a1800; box-shadow: var(--glow-brand); }
.btn--primary:hover { background: var(--brand-d); transform: translateY(-2px); }
.btn--signal { background: var(--signal); color: #04201b; box-shadow: var(--glow-signal); }
.btn--signal:hover { background: var(--signal-d); transform: translateY(-2px); }
.btn--ghost { background: rgba(255,255,255,.04); color: #fff; border-color: var(--line-2); }
.btn--ghost:hover { background: rgba(255,255,255,.09); border-color: var(--signal); }
.btn--portal { background: rgba(63,142,194,.12); color: var(--brand-blue); border-color: rgba(63,142,194,.45); }
.btn--portal:hover { background: rgba(63,142,194,.2); border-color: var(--brand-blue); color: #dbeafe; transform: translateY(-2px); }
.btn--lg { padding: 17px 32px; font-size: 1.04rem; }
.btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(10,17,29,.72);
  backdrop-filter: saturate(1.3) blur(16px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; height: 112px; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; flex: 1 1 0; }
.brand img { height: 94px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a { padding: 9px 14px; border-radius: 9px; font-size: .94rem; font-weight: 500; color: var(--muted); transition: .16s; }
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255,255,255,.05); }
.nav-right { display: flex; align-items: center; gap: 12px; flex: 1 1 0; justify-content: flex-end; }
.nav-right .btn { padding: 12px 18px; font-size: .9rem; }
.nav-right .btn svg { width: 16px; height: 16px; }
.nav-cta-mobile { display: none; }
/* free up header space on mid-size laptops before things get tight */
@media (max-width: 1160px) and (min-width: 901px) { .nav-phone { display: none; } }
.nav-phone { font-family: var(--mono); font-size: .9rem; color: var(--signal); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.nav-phone svg { width: 16px; height: 16px; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel); align-items: center; justify-content: center; color: #fff; }
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- Panels / cards ---------- */
.panel { background: linear-gradient(160deg, var(--panel), var(--ink-2)); border: 1px solid var(--line); border-radius: var(--radius); }
.card { background: linear-gradient(160deg, var(--panel), var(--ink-2)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; transition: .25s; position: relative; overflow: hidden; }
.card:hover { border-color: var(--line-2); transform: translateY(-4px); box-shadow: var(--shadow); }
.card .ic { width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 16px;
  background: rgba(70,224,194,.1); color: var(--signal); border: 1px solid rgba(70,224,194,.18); }
.card .ic svg { width: 23px; height: 23px; }
.card h3 { color: #fff; margin-bottom: 8px; font-size: 1.16rem; }
.card p { color: var(--muted); font-size: .96rem; }

/* ---------- Rings / gauges (from portal) ---------- */
.ring { position: relative; width: 200px; height: 200px; }
.ring svg { transform: rotate(-90deg); }
.ring .track { stroke: var(--line); }
.ring .meter { stroke: var(--signal); stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(70,224,194,.5));
  transition: stroke-dashoffset 1.6s cubic-bezier(.16,1,.3,1); }
.ring .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .pct { font-family: var(--display); font-size: 46px; font-weight: 600; line-height: 1; color: #fff; }
.ring .lvl { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--signal); margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 70px 0 30px; background: var(--ink-2); }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.footer-brand img { height: 44px; margin-bottom: 16px; }
.footer-brand p { color: var(--muted); font-size: .94rem; max-width: 320px; }
.footer-col h4 { font-family: var(--mono); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; font-weight: 500; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text); font-size: .94rem; opacity: .82; }
.footer-col a:hover { color: var(--signal); opacity: 1; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 24px; font-size: .84rem; color: var(--muted); flex-wrap: wrap; gap: 12px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav { height: 88px; }
  .brand img { height: 66px; }
  .nav-right { display: none; }
  .nav-toggle { display: flex; }
  /* surface the header CTAs inside the dropdown on mobile */
  .nav-cta-mobile { display: block; }
  .nav-links .nav-cta-mobile:first-child a { color: var(--brand-blue); font-weight: 600; }
  .nav-links .nav-cta-mobile + li:not(.nav-cta-mobile) { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
  /* Mobile dropdown menu (revealed by the hamburger) */
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; display: none;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 14px 20px 20px;
    background: rgba(10,17,29,.98); backdrop-filter: saturate(1.3) blur(16px);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 14px; font-size: 1.02rem; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 30px; }
  .section { padding: 74px 0; }
  .section--tight { padding: 52px 0; }
  .hero { padding: 40px 0 24px; }
}
@media (max-width: 560px) {
  .container { padding-inline: 18px; }
  .nav { height: 78px; }
  .brand img { height: 56px; }
  .nav-right .btn { display: none; }
  .footer-top { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .section { padding: 56px 0; }
  .btn--lg { padding: 15px 24px; font-size: 1rem; }
  .hero-cta { gap: 10px; }
  .hero-cta .btn { width: 100%; }
}
