/* ============================================================
   Mosaic Security — mosaicsecurity.io
   Static stylesheet. No external fonts, no third-party requests.
   ============================================================ */

:root {
  --ink: #eef5ff;
  --muted: #9aaac2;
  --bg: #050914;
  --panel: #0a1222;
  --line: rgba(148, 183, 225, .17);
  --blue: #1779ff;
  --cyan: #28b7d5;
  --green: #18c592;
  --purple: #7568db;
  --max: 1180px;
  --radius: 22px;
  /* Hero H1 scale — 25% smaller than the original 3.4/7.7/7.3 ramp. */
  --h1: clamp(2.55rem, 5.78vw, 5.48rem);
  --h1-sm: 2.44rem;
  --h2: clamp(2.65rem, 6vw, 5.6rem);
}

* { box-sizing: border-box }
html { scroll-behavior: smooth }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none }
img { max-width: 100%; height: auto }
button, select { font: inherit }

:where(a, button, select, [tabindex]):focus-visible {
  outline: 2px solid #59bdff;
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link { position: fixed; left: 1rem; top: -4rem; background: #fff; color: #000; padding: .8rem 1rem; z-index: 100 }
.skip-link:focus { top: 1rem }

.ambient { position: fixed; border-radius: 50%; filter: blur(120px); opacity: .15; pointer-events: none; z-index: -1 }
.ambient-one { width: 600px; height: 600px; background: var(--blue); top: -250px; left: -250px }
.ambient-two { width: 500px; height: 500px; background: var(--green); right: -250px; top: 40vh }

/* ---------- Header ---------- */
.site-header {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0; height: 82px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(5, 9, 20, .76);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.brand { display: flex; align-items: center; gap: .8rem; font-weight: 650; letter-spacing: .18em; font-size: .88rem }
.brand small { display: block; color: #4f9dff; font-size: .58rem; letter-spacing: .28em; margin-top: .05rem }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center }

.site-header nav { display: flex; align-items: center; gap: 2rem; font-size: .9rem; color: #bec9d9 }
.site-header nav a:hover { color: #fff }
.nav-cta { padding: .7rem 1rem; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px }
.menu-toggle { display: none; background: none; border: 0; color: #fff; cursor: pointer }

/* ---------- Layout ---------- */
.section-pad, .hero { width: min(var(--max), calc(100% - 48px)); margin: auto }
.section-pad { padding-top: 140px; padding-bottom: 140px }

.hero {
  min-height: 100vh; padding-top: 160px;
  display: grid; grid-template-columns: 1.04fr .96fr;
  align-items: center; gap: 4rem; position: relative;
}

.eyebrow { text-transform: uppercase; letter-spacing: .17em; font-weight: 650; color: #49b1ff; font-size: .76rem; margin: 0 0 1.2rem }

.hero h1, .section-pad h2 { line-height: .98; letter-spacing: -.055em; margin: .15rem 0 1.6rem; max-width: 1000px }
.section-pad h2 { font-size: var(--h2) }
.hero h1 { font-size: var(--h1) }
h1 em { font-style: normal; background: linear-gradient(90deg, #5aa7ff, #28d6a5); background-clip: text; -webkit-background-clip: text; color: transparent }

.hero-lede { font-size: 1.16rem; max-width: 650px; color: #b6c3d5 }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; margin-top: 2.2rem; flex-wrap: wrap }

.button { display: inline-flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-radius: 999px; font-weight: 650 }
.primary { background: linear-gradient(105deg, #0d6cff, #0aa67f); box-shadow: 0 12px 40px rgba(15, 116, 255, .24) }
.button.light { background: #fff; color: #071326; white-space: nowrap }
.text-link { color: #c9d4e2; border-bottom: 1px solid #6a7d97; padding-bottom: .2rem }

/* ---------- Hero graph / logo ---------- */
.hero-visual { min-height: 570px; display: grid; place-items: center }
.graph-shell { width: min(470px, 90vw); aspect-ratio: 1; position: relative; display: grid; place-items: center }
.graph-shell::before {
  content: ""; position: absolute; inset: 8%;
  border: 1px solid rgba(74, 167, 255, .28); border-radius: 50%;
  box-shadow: inset 0 0 70px rgba(17, 121, 255, .08);
}

/* The logo is the centrepiece: contained, optically centred, never cropped. */
.graph-core {
  position: relative;
  width: 62%; aspect-ratio: 1;
  display: grid; place-items: center;
  filter: drop-shadow(0 0 55px rgba(26, 130, 255, .35));
}
.graph-core img {
  display: block;
  width: 100%; height: 100%;
  object-fit: contain; object-position: center;
}

.orbit { position: absolute; border: 1px dashed rgba(90, 190, 220, .3); border-radius: 50% }
.orbit-a { inset: 0; animation: spin 30s linear infinite }
.orbit-b { inset: 19%; animation: spin 18s linear infinite reverse }
@keyframes spin { to { transform: rotate(360deg) } }

.graph-node {
  position: absolute; padding: .52rem .76rem;
  background: #0a1527; border: 1px solid #214365; border-radius: 999px;
  font-size: .75rem; color: #c7dbf3; box-shadow: 0 8px 35px #000;
}
.node-1 { top: 5%; left: 10% }
.node-2 { right: 0; top: 32% }
.node-3 { bottom: 5%; right: 18% }
.node-4 { left: -2%; bottom: 28% }

.signal-strip { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 3rem }
.signal-strip span { padding: 1rem; text-align: center; color: #93a8c2; font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; border-right: 1px solid var(--line) }
.signal-strip span:last-child { border: 0 }

/* ---------- Problem ---------- */
.problem h2 span { color: #53657c }
.split-copy { display: grid; grid-template-columns: 1.2fr .8fr; gap: 4rem; align-items: start }
.big-copy { font-size: clamp(1.35rem, 2.3vw, 2.25rem); line-height: 1.35; margin: 0; color: #d7e1ee }
.question-card { border-left: 2px solid var(--green); padding: 1rem 0 1rem 2rem }
.question-card small { color: #6f829b; text-transform: uppercase; letter-spacing: .14em }
.question-card blockquote { font-size: 1.2rem; margin: 1rem 0 0 }

.section-heading { display: grid; grid-template-columns: 1.2fr .8fr; gap: 4rem; align-items: end; margin-bottom: 4rem }
.section-heading h2 { font-size: clamp(2.5rem, 5vw, 4.8rem); margin-bottom: 0 }
.section-heading > p { color: var(--muted); font-size: 1.08rem }

/* ---------- Capability states ---------- */
.state-explorer { background: linear-gradient(145deg, rgba(14, 27, 50, .95), rgba(8, 15, 29, .95)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden }
.state-tabs { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--line) }
.state-tabs button { background: none; border: 0; border-right: 1px solid var(--line); color: #7890ad; padding: 1.4rem; text-align: left; cursor: pointer }
.state-tabs button:last-child { border-right: 0 }
.state-tabs b { display: block; color: #dbe7f7; font-size: 1.4rem; margin-top: .2rem }
.state-tabs button[aria-selected="true"] { background: rgba(21, 119, 255, .13); color: #69b5ff; box-shadow: inset 0 -2px #2c8cff }

.state-panel { min-height: 330px; padding: 3.2rem; display: grid; grid-template-columns: 1fr 300px; gap: 3rem; align-items: center }
.state-number { font-size: .72rem; color: #5f7490 }
.state-panel h3 { font-size: clamp(1.8rem, 3vw, 3.2rem); margin: .3rem 0 .8rem; line-height: 1.05 }
.state-panel p:not(.eyebrow) { color: var(--muted); max-width: 600px }

.state-meter {
  --pct: 100%;
  height: 260px; border-radius: 50%; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: conic-gradient(var(--blue) var(--pct), #14243a 0);
  transition: background .5s ease;
}
.state-meter::before { content: ""; position: absolute; inset: 16px; background: #0a1324; border-radius: 50% }
.state-meter > * { position: relative }
.state-meter strong { font-size: 3.3rem }
.state-meter small { color: #7187a2 }

/* ---------- Engines ---------- */
.engine-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem }
.engine-card { padding: 2.2rem; background: rgba(10, 18, 34, .75); border: 1px solid var(--line); border-radius: var(--radius); min-height: 430px }
.engine-card > span { color: #4eb0ff; font-size: .76rem }
.engine-card h3 { font-size: 1.65rem; line-height: 1.1; margin: 2.5rem 0 1rem }
.engine-card p { color: var(--muted) }
.engine-card ul { list-style: none; padding: 1.5rem 0 0; margin: 1.5rem 0 0; border-top: 1px solid var(--line) }
.engine-card li { padding: .55rem 0; color: #c7d4e4 }
.engine-card li::before { content: "+"; color: var(--green); margin-right: .7rem }

/* ---------- What-if ---------- */
.whatif-shell { background: linear-gradient(120deg, #0c2241, #071320 65%, #063226); border: 1px solid rgba(74, 167, 255, .25); border-radius: 32px; padding: 4rem; display: grid; grid-template-columns: .78fr 1.22fr; gap: 4rem }
.whatif-intro h2 { font-size: clamp(2.5rem, 4vw, 4.3rem) }
.whatif-intro > p:last-child { color: #b0bfd1 }
.whatif-demo { background: rgba(3, 8, 16, .72); border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem }
.whatif-demo label { display: block; color: #8fa2ba; font-size: .82rem; margin-bottom: .6rem }
.whatif-demo select { width: 100%; background: #0b1728; color: #fff; border: 1px solid #28405e; border-radius: 9px; padding: 1rem }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); margin-top: 1.3rem; border: 1px solid var(--line) }
.result-grid div { background: #07111f; padding: 1.1rem }
.result-grid strong { display: block; font-size: 1.55rem; color: #59bdff }
.result-grid small { color: #8295ad }
.decision { margin-top: 1.2rem; padding: 1.1rem; background: rgba(26, 197, 146, .09); border-left: 2px solid var(--green) }
.decision small { display: block; text-transform: uppercase; letter-spacing: .15em; color: #65cdae }
.decision strong { display: block; margin-top: .35rem }

/* ---------- Scorecard ---------- */
.scorecard { background: #eaf3ff; color: #061127; border-radius: 30px; padding: 4rem; margin-top: 140px }
.scorecard-head { display: flex; justify-content: space-between; gap: 2rem }
.scorecard .eyebrow { color: #1763b5 }
.scorecard h2 { font-size: clamp(2.2rem, 4vw, 4rem) }
.scorecard-head > span { height: max-content; border: 1px solid #8ba7c7; border-radius: 99px; padding: .45rem .7rem; text-transform: uppercase; letter-spacing: .1em; font-size: .65rem }
.scorecard-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 1px; background: #b5c8df; border: 1px solid #b5c8df }
.scorecard-grid > div { background: #f6faff; padding: 1.4rem; min-height: 170px }
.scorecard-grid .spend { grid-row: span 2 }
.scorecard-grid small { color: #51657e }
.scorecard-grid strong { font-size: 2.15rem; display: block; margin: .6rem 0 }
.scorecard-grid p { color: #4f6176 }

.bar { display: block; height: 5px; background: #d4dfec; position: relative }
.bar::after { content: ""; display: block; width: var(--w, 0%); height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)) }
.bar.w82 { --w: 82% }
.bar.w64 { --w: 64% }
.bar.w57 { --w: 57% }

.metric.accent { grid-column: 2 / 5; background: #07182c; color: #fff }
.metric.accent small, .metric.accent p { color: #9db0c6 }

/* ---------- Waste ---------- */
.waste { text-align: center }
.waste h2 { margin-inline: auto }
.waste-grid { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 900px; margin: 3rem auto 2rem; border: 1px solid var(--line) }
.waste-grid span { padding: 1.5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 1.05rem }
.waste-grid span:nth-child(3n) { border-right: 0 }
.waste-grid span:nth-last-child(-n+3) { border-bottom: 0 }
.waste-close { color: var(--muted) }

/* ---------- Company ---------- */
.founder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem }
.founder { display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(10, 18, 34, .72) }
.founder-monogram { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #0c4daa, #1c89d3); font-weight: 700 }
.founder-monogram.green { background: linear-gradient(135deg, #087359, #20bd8f) }
.founder h3 { font-size: 1.8rem; margin: .2rem 0 .8rem }
.founder p:not(.eyebrow) { color: #adbbcd }
.founder small { color: #65b8ff }

/* ---------- Contact & footer ---------- */
.contact-shell { padding: 4rem; background: linear-gradient(105deg, #126ce4, #0e9d7c); border-radius: 30px; display: flex; align-items: end; justify-content: space-between; gap: 3rem }
.contact-shell h2 { font-size: clamp(2.5rem, 5vw, 5rem); max-width: 800px }
.contact-shell p { font-size: 1.1rem }

footer { width: min(var(--max), calc(100% - 48px)); margin: auto; padding: 2.6rem 0 3rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; color: #7f91a8; font-size: .85rem }
footer > p { text-align: center }
footer > div { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem }

/* ---------- Scroll reveal ----------
   Content is visible by default. It is only hidden once the inline head
   script confirms JavaScript is running, and a 2s failsafe in that same
   script adds .reveal-all so a failed app.js can never leave a blank page. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease }
.js .reveal.visible,
.js.reveal-all .reveal { opacity: 1; transform: none }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  .orbit { animation: none }
  .state-meter { transition: none }
  .js .reveal { opacity: 1; transform: none; transition: none }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .site-header { height: 72px }
  .menu-toggle { display: grid; gap: 6px; padding: 12px }
  .menu-toggle span { display: block; width: 24px; height: 1px; background: #fff }
  .site-header nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: #07101e; padding: 1.3rem 24px 2rem; flex-direction: column; align-items: flex-start; border-bottom: 1px solid var(--line) }
  .site-header nav.open { display: flex }
  .hero { grid-template-columns: 1fr; padding-top: 130px }
  .hero-visual { min-height: 430px }
  .signal-strip { grid-template-columns: 1fr 1fr }
  .signal-strip span:nth-child(2) { border-right: 0 }
  .section-heading, .split-copy, .whatif-shell { grid-template-columns: 1fr; gap: 2rem }
  .engine-grid { grid-template-columns: 1fr }
  .engine-card { min-height: 0 }
  .state-tabs { grid-template-columns: 1fr 1fr }
  .state-tabs button { border-bottom: 1px solid var(--line) }
  .state-panel { grid-template-columns: 1fr }
  .state-meter { width: 230px; height: 230px }
  .scorecard-grid { grid-template-columns: 1fr 1fr }
  .scorecard-grid .spend { grid-row: auto; grid-column: 1 / -1 }
  .metric.accent { grid-column: 1 / -1 }
  .founder-grid { grid-template-columns: 1fr }
  .contact-shell { flex-direction: column; align-items: flex-start }
  footer { grid-template-columns: 1fr; gap: 1.5rem }
  footer > p { text-align: left }
  footer > div { align-items: flex-start }
}

@media (max-width: 580px) {
  .section-pad, .hero { width: min(100% - 30px, var(--max)) }
  .section-pad { padding-top: 100px; padding-bottom: 100px }
  .hero h1 { font-size: var(--h1-sm) }
  .hero-visual { min-height: 350px }
  .graph-shell { width: 330px }
  .graph-node { font-size: .65rem }
  .state-tabs { grid-template-columns: 1fr }
  .state-panel { padding: 1.5rem }
  .whatif-shell, .scorecard, .contact-shell { padding: 1.6rem; border-radius: 20px }
  .result-grid { grid-template-columns: 1fr 1fr }
  .scorecard { margin-top: 100px }
  .scorecard-grid { grid-template-columns: 1fr }
  .metric.accent { grid-column: 1 }
  .waste-grid { grid-template-columns: 1fr }
  .waste-grid span { border-right: 0 !important; border-bottom: 1px solid var(--line) !important }
  .waste-grid span:last-child { border-bottom: 0 !important }
  .founder { grid-template-columns: 1fr }
  .button.light { white-space: normal }
}

/* ---------- 404 ---------- */
.error-page { min-height: 80vh; display: grid; place-content: center; text-align: center }
.error-page h1 { font-size: clamp(2.25rem, 6vw, 5.25rem); line-height: 1; margin: .5rem }
.error-page .error-lede { color: var(--muted) }
