/* ==========================================================================
   Blackspire Group — site styles
   Palette, type scale and rules per the Blackspire visual identity.
   Light grounds are the default. Optic Teal carries the accent work.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --mineral-white: #F5F3EE;
  --warm-white: #FAFAF7;
  --charcoal: #1E2228;
  --void-black: #0D1117;
  --optic-teal: #0E9E8E;
  --optic-teal-deep: #0A7A6E;
  --instrument-amber: #C47B1A;
  --teal-tint: #E6F7F5;
  --amber-tint: #FDF3E3;
  --technical-gray: #8A9099;
  --rule: #E2DFD8;
  --rule-dark: #2A2F36;

  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1120px;
  --wrap-narrow: 760px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--mineral-white);
  -webkit-font-smoothing: antialiased;
}

body.content-dense { background: var(--warm-white); }

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

/* ---------- Type ---------- */

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 600; letter-spacing: -0.022em; }
h3 { font-size: 1.4rem; font-weight: 500; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1.15em; }
a { color: var(--optic-teal-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--charcoal); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--optic-teal-deep);
  margin: 0 0 1.1rem;
  display: block;
}
.eyebrow.gray { color: var(--technical-gray); }

.lede { font-size: 1.22rem; line-height: 1.6; color: #3A4048; }
.caption { font-size: 0.82rem; font-weight: 500; color: var(--technical-gray); line-height: 1.55; }
.mono { font-family: var(--mono); }

.decoder {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--technical-gray);
  max-width: 640px;
  margin: 0 0 2rem;
}

/* ---------- Header / nav ---------- */

header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245,243,238,0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
header.site .bar { display: flex; align-items: center; gap: 32px; height: 74px; }

.logo { display: flex; align-items: center; text-decoration: none; flex: none; }
.logo img { height: 26px; width: auto; display: block; }
.logo .fallback {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -0.03em;
  color: var(--charcoal);
  position: relative;
}
.logo .fallback::after {
  content: "";
  position: absolute; top: -7px; right: -11px;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 9px solid var(--optic-teal);
}

nav.main { display: flex; align-items: center; gap: 26px; margin-left: auto; }
nav.main a {
  font-size: 0.93rem; font-weight: 500; color: var(--charcoal);
  text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent;
}
nav.main a:hover { border-bottom-color: var(--optic-teal); }
nav.main a[aria-current="page"] { border-bottom-color: var(--optic-teal); }

/* The CTA in the nav is a button, not a nav link. `nav.main a` is more specific
   than `.btn-primary`, so without these it inherits Charcoal text and picks up
   the nav's hover underline. */
nav.main a.btn { border-bottom: 1.5px solid transparent; }
nav.main a.btn-primary,
nav.main a.btn-primary:hover { color: #fff; border-bottom-color: transparent; }
nav.main a.btn-primary:hover { background: var(--optic-teal-deep); }

.btn {
  display: inline-block;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 600;
  padding: 12px 22px; border-radius: 3px; text-decoration: none;
  border: 1.5px solid transparent; transition: background .15s, color .15s, border-color .15s;
  cursor: pointer;
}
.btn-primary { background: var(--optic-teal); color: #fff; }
.btn-primary:hover { background: var(--optic-teal-deep); color: #fff; }
.btn-secondary { background: transparent; color: var(--charcoal); border-color: var(--charcoal); }
.btn-secondary:hover { background: var(--charcoal); color: var(--mineral-white); }
.btn-on-dark { background: transparent; color: var(--mineral-white); border-color: rgba(245,243,238,0.5); }
.btn-on-dark:hover { background: var(--mineral-white); color: var(--charcoal); }
.btn-sm { padding: 9px 17px; font-size: 0.88rem; }

.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--rule); border-radius: 3px; padding: 8px 12px; font-family: var(--sans); font-weight: 600; font-size: 0.85rem; color: var(--charcoal); }

/* ---------- Sections ---------- */

section { padding: 92px 0; }
section.tight { padding: 62px 0; }
section.dark { background: var(--charcoal); color: var(--mineral-white); }
section.dark h2, section.dark h3 { color: var(--mineral-white); }
section.dark p { color: #C9CDD3; }
section.dark .eyebrow { color: #5FD3C4; }
section.tinted { background: var(--teal-tint); }
section.paper { background: var(--warm-white); }
.divider { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ---------- Hero ---------- */

.hero { padding: 108px 0 76px; }
.hero h1 { max-width: 15ch; margin-bottom: 0.35em; }
.hero .tagline {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 600; letter-spacing: -0.02em;
  color: var(--charcoal); margin: 0 0 1.1rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

/* ---------- Proof strip ---------- */

.proof {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--rule); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.proof .cell { background: var(--mineral-white); padding: 34px 28px; text-decoration: none; color: inherit; display: block; transition: background .15s; }
.proof .cell:hover { background: var(--teal-tint); }
.proof .fig { display: block; font-size: 2.6rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--charcoal); }
.proof .lbl { display: block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--optic-teal-deep); margin: 12px 0 10px; }
.proof .sub { font-size: 0.88rem; color: var(--technical-gray); line-height: 1.5; margin: 0; }
.proof .verify { font-size: 0.78rem; font-weight: 600; color: var(--optic-teal-deep); margin-top: 12px; display: block; }

/* ---------- Grids and cards ---------- */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 42px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 60px; align-items: start; }

.card {
  background: var(--warm-white);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 30px 28px;
}
.card h3 { font-size: 1.18rem; font-weight: 600; margin-bottom: 0.55em; }
.card p:last-child { margin-bottom: 0; }
.card .num {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 500;
  color: var(--optic-teal-deep); letter-spacing: 0.1em; display: block; margin-bottom: 14px;
}

.pull {
  border-left: 3px solid var(--optic-teal);
  padding: 6px 0 6px 28px;
  margin: 40px 0;
  font-size: 1.42rem;
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--charcoal);
}

.callout {
  background: var(--amber-tint);
  border-left: 3px solid var(--instrument-amber);
  padding: 22px 26px;
  margin: 32px 0;
  font-size: 0.95rem;
  line-height: 1.6;
}
.callout .hd {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--instrument-amber); font-weight: 500;
  display: block; margin-bottom: 8px;
}
.callout p:last-child { margin-bottom: 0; }

.label-strip {
  display: inline-block;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 500;
  background: var(--charcoal); color: var(--mineral-white);
  padding: 6px 12px; border-radius: 2px; margin-bottom: 18px;
}
.label-strip.amber { background: var(--instrument-amber); }
.label-strip.teal { background: var(--optic-teal); }

/* ---------- Video briefings ---------- */

.video-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.video-card video {
  display: block; width: 100%; aspect-ratio: 16 / 9;
  background: var(--void-black); object-fit: cover;
  border-bottom: 1px solid var(--rule);
}
.video-card .video-frame,
.video-card .video-facade {
  display: block; width: 100%; aspect-ratio: 16 / 9; border: 0;
  border-bottom: 1px solid var(--rule); background: var(--void-black);
}
.video-facade { position: relative; padding: 0; cursor: pointer; overflow: hidden; }
.video-facade img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.video-facade:hover img, .video-facade:focus-visible img { opacity: .85; }
.video-play {
  position: absolute; top: 50%; left: 50%; width: 68px; height: 48px;
  transform: translate(-50%, -50%); border-radius: 12px;
  background: rgba(13, 17, 23, .82); transition: background .2s;
}
.video-play::after {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-35%, -50%);
  border-style: solid; border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent var(--warm-white);
}
.video-facade:hover .video-play, .video-facade:focus-visible .video-play { background: var(--optic-teal); }
.video-facade:focus-visible { outline: 2px solid var(--optic-teal); outline-offset: -2px; }
.video-card .video-body { padding: 24px 28px 28px; }
.video-empty { color: var(--technical-gray); font-size: 0.95rem; max-width: 640px; }

/* ---------- Podcast briefings ---------- */

.podcast-card { display: flex; flex-direction: column; gap: 20px; }
.podcast-card .podcast-frame {
  display: block; width: 100%; height: 152px; border: 0; border-radius: 12px;
  background: var(--void-black);
}
.podcast-link { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- Tables ---------- */

table.data { width: 100%; border-collapse: collapse; font-size: 0.93rem; margin: 26px 0; }
table.data th {
  text-align: left; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 500; color: var(--technical-gray);
  padding: 0 16px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: bottom;
}
table.data td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data td.num { font-family: var(--mono); font-size: 0.86rem; white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }

/* ---------- Split compare ---------- */

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.compare > div { padding: 32px 30px; }
.compare .before { background: var(--warm-white); border-right: 1px solid var(--rule); }
.compare .after { background: var(--teal-tint); }
.compare h4 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; margin-bottom: 16px; }
.compare .before h4 { color: var(--technical-gray); }
.compare .after h4 { color: var(--optic-teal-deep); }
.compare ul { margin: 0; padding-left: 18px; }
.compare li { margin-bottom: 9px; font-size: 0.95rem; line-height: 1.5; }

/* ---------- Lists ---------- */

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 13px 0; border-bottom: 1px solid var(--rule); font-size: 0.98rem; }
ul.plain li:last-child { border-bottom: 0; }

ul.ticks { list-style: none; padding: 0; margin: 0 0 1.2em; }
ul.ticks li { position: relative; padding-left: 24px; margin-bottom: 10px; line-height: 1.55; }
ul.ticks li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 8px; height: 8px; background: var(--optic-teal); border-radius: 1px;
}

/* ---------- Scenario steps ---------- */

.steps { counter-reset: step; margin: 30px 0 0; }
.step { position: relative; padding: 0 0 28px 56px; border-left: 1px solid var(--rule); margin-left: 15px; }
.step:last-child { border-left-color: transparent; padding-bottom: 0; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: -15px; top: -4px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--mineral-white); border: 1.5px solid var(--optic-teal);
  color: var(--optic-teal-deep); font-family: var(--mono); font-size: 0.8rem; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
}
.step h4 { margin-bottom: 6px; }
.step p { margin-bottom: 0; font-size: 0.97rem; }

/* ---------- Forms ---------- */

form.enquiry { margin-top: 30px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--charcoal);
  padding: 12px 14px; border: 1px solid var(--rule); border-radius: 3px; background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--optic-teal); outline-offset: -1px; border-color: transparent; }
.field textarea { min-height: 130px; resize: vertical; }

/* ---------- CTA band ---------- */

.cta-band { background: var(--charcoal); color: var(--mineral-white); padding: 76px 0; }
.cta-band h2 { color: var(--mineral-white); max-width: 20ch; }
.cta-band p { color: #C9CDD3; max-width: 56ch; }

/* ---------- Footer ---------- */

footer.site { background: var(--charcoal); color: #C9CDD3; padding: 62px 0 34px; font-size: 0.92rem; }
footer.site a { color: #C9CDD3; text-decoration: none; }
footer.site a:hover { color: #fff; text-decoration: underline; }
footer.site .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; }
footer.site h5 {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--technical-gray); font-weight: 500; margin: 0 0 16px;
}
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin-bottom: 10px; }
footer.site .foot-tagline { color: var(--mineral-white); font-weight: 600; margin-bottom: 8px; }
footer.site .foot-decoder { color: var(--technical-gray); font-size: 0.85rem; line-height: 1.55; max-width: 34ch; }
footer.site .legal {
  margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--rule-dark);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--technical-gray);
}
footer.site .logo .fallback { color: var(--mineral-white); }

/* ---------- Q&A pages ---------- */

/* Questions are headings, not display type — and anchor jumps must clear the
   sticky header. */
.qa section h2 {
  font-size: clamp(1.28rem, 2.1vw, 1.62rem);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.3;
  margin-bottom: 0.65em;
}
.qa section h2 + p { margin-top: 0; }
:target, [id] { scroll-margin-top: 96px; }
.qa .plain li a { color: var(--charcoal); text-decoration: none; display: block; }
.qa .plain li a:hover { color: var(--optic-teal-deep); }

/* ---------- Utilities ---------- */

.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.mt-l { margin-top: 42px; } .mb-l { margin-bottom: 42px; }
.center { text-align: center; }
.maxw { max-width: 62ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .grid-hero, .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 32px; }
  .proof { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .compare .before { border-right: 0; border-bottom: 1px solid var(--rule); }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
  nav.main { display: none; }
  nav.main.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
    position: absolute; top: 74px; left: 0; right: 0;
    background: var(--mineral-white); border-bottom: 1px solid var(--rule); padding: 22px 28px;
  }
  .nav-toggle { display: block; }
  section { padding: 64px 0; }
  .hero { padding: 68px 0 52px; }
}

@media (max-width: 560px) {
  footer.site .cols { grid-template-columns: 1fr; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data thead { display: none; }
  table.data td { border-bottom: 0; padding: 4px 0; }
  table.data tr { border-bottom: 1px solid var(--rule); padding: 16px 0; display: block; }
}

@media print {
  header.site, .cta-band, nav.main { display: none; }
  body { background: #fff; }
}

/* ---------- Legal pages ---------- */

footer.site .legal a { color: var(--technical-gray); }
footer.site .legal a:hover { color: var(--mineral-white); }

.legal-doc { max-width: 72ch; }
.legal-doc h2 {
  font-size: clamp(1.2rem, 1.9vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 2.2em 0 0.6em;
}
.legal-doc ul { padding-left: 1.2em; }
.legal-doc li { margin-bottom: 0.6em; }
.legal-doc .caps { font-size: 0.92rem; letter-spacing: 0.01em; }
