/* ============================================================================
   Prisma Capital — brand layer (Optical dark lab)
   Deep blue-black + a hairline optical grid + white light. Colour appears ONLY
   where light refracts (the 3D hero + thin spectral ticks), never as ambient
   gradients. Type: IBM Plex Sans (display/body) + IBM Plex Mono (data/labels).
   Loaded after style.css on strategy pages; its tokens win, so the whole site
   inherits this palette.
   ============================================================================ */

:root {
  --bg: #06080E;
  --bg-2: #0A0E18;
  --panel: #0E1320;
  --panel-2: #11172499;
  --line: #1B2230;
  --line-2: #2A3344;
  --text: #EAEEF6;
  --text-2: #AEB6C6;
  --muted: #6F7A8E;
  --beam: #FFFFFF;
  --accent: #5BC8FF;            /* single cool UI accent: links, focus, active */
  --accent-ink: #06121C;
  --green: #4ADE80;
  --red: #FB7185;

  /* compatibility aliases for style.css (strategy pages) */
  --card: var(--panel);
  --card-border: var(--line);
  --bg-deep: var(--bg);

  /* visible spectrum — refraction only */
  --sp-1: #FF2D2D; --sp-2: #FF7A1A; --sp-3: #FFD400; --sp-4: #4CD964;
  --sp-5: #18B6F6; --sp-6: #4C6EF5; --sp-7: #9B5CFF;
  --spectrum: linear-gradient(90deg, var(--sp-1), var(--sp-2), var(--sp-3), var(--sp-4), var(--sp-5), var(--sp-6), var(--sp-7));

  --font-display: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --nav-h: 66px;
  --maxw: 1180px;
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
::selection { background: rgba(91, 200, 255, .22); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.04; letter-spacing: 0; }

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

/* mono utility label — the "instrument" voice */
.mono, .eyebrow, .kicker, .field-tag {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--text-2); }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(74,222,128,.5); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(74,222,128,.5)} 70%{box-shadow:0 0 0 6px rgba(74,222,128,0)} 100%{box-shadow:0 0 0 0 rgba(74,222,128,0)} }

/* optical hairline grid background (radial-masked) */
.grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask: radial-gradient(ellipse 80% 70% at 50% 38%, #000 25%, transparent 80%);
          mask: radial-gradient(ellipse 80% 70% at 50% 38%, #000 25%, transparent 80%);
}

/* ============================ Buttons (one system) ============================ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-sans); font-weight: 500; font-size: 15px; line-height: 1;
  padding: 13px 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .18s var(--ease), background .18s, border-color .18s, color .18s, box-shadow .18s;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--text); color: var(--bg); font-weight: 600; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -14px rgba(234,238,246,.5); }
.btn-ghost { color: var(--text); background: transparent; border-color: var(--line-2); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: #fff; }
.btn-lg { padding: 15px 28px; font-size: 16px; }

.text-link { color: var(--accent); font-weight: 500; display: inline-flex; align-items: center; gap: 7px; }
.text-link svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.text-link:hover svg { transform: translateX(4px); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ============================ Navigation ============================ */
.nav { position: sticky; top: 0; z-index: 100; height: var(--nav-h); display: flex; align-items: center; padding: 0 28px; border-bottom: 1px solid transparent; transition: background .3s, border-color .3s, backdrop-filter .3s; }
.nav.scrolled { background: rgba(6,8,14,.72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--line); }
.nav-inner { width: 100%; max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 16px; }
.nav-brand { display: inline-flex; align-items: center; gap: 10px; }
.nav-logo { width: 26px; height: 26px; flex: none; }
.nav-wordmark { font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.nav-wordmark b { font-weight: 600; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 13px; border-radius: 8px; transition: color .15s, background .15s; }
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav-links a.active { color: var(--accent); }
.nav-cta { margin-left: 8px; padding: 9px 17px; font-size: 14px; }
.nav-toggle { display: none; margin-left: auto; width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line-2); color: var(--text); cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 20px; height: 20px; }

/* ============================ Hero (landing) ============================ */
.hero-lab { position: relative; min-height: calc(100dvh - var(--nav-h)); display: grid; align-items: center; overflow: hidden; }
.hero-stage { position: absolute; inset: 0; z-index: 0; }
#cube-stage { position: absolute; inset: 0; z-index: 0; }
#cube-stage canvas { display: block; width: 100% !important; height: 100% !important; }
/* darkens the cube on the copy side so the headline + lead are always legible */
.hero-scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 3%, rgba(6,8,14,.82) 30%, rgba(6,8,14,.18) 52%, transparent 66%); }
/* WebGL/refraction unavailable -> a still spectral wash so the area isn't empty */
#cube-stage.no-webgl { background:
  radial-gradient(40% 50% at 64% 34%, rgba(91,200,255,.10), transparent 70%),
  conic-gradient(from 200deg at 66% 36%, rgba(255,45,45,.05), rgba(255,212,0,.05), rgba(76,217,100,.05), rgba(24,182,246,.06), rgba(155,92,255,.06), transparent 70%); }
.hero-beam { position: absolute; top: -6%; right: 8%; width: 46%; height: 70%; z-index: 0; pointer-events: none;
  background: linear-gradient(213deg, rgba(255,255,255,.5), rgba(255,255,255,0) 42%);
  -webkit-mask: linear-gradient(213deg, #000, transparent 46%); mask: linear-gradient(213deg, #000, transparent 46%);
  filter: blur(2px); opacity: .5; }

.hero-lab .container { position: relative; z-index: 2; padding-top: 4vh; padding-bottom: 12vh; }
.hero-copy { max-width: 720px; }
.hero-lab h1 { font-family: var(--font-display); font-size: clamp(50px, 8.6vw, 116px); font-weight: 500; letter-spacing: .004em; line-height: .98; margin: 16px 0 0; }
.hero-lab .lead { color: var(--text-2); font-size: clamp(15.5px, 1.8vw, 18px); max-width: 520px; margin: 24px 0 0; }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 34px; }
.hero-metrics { display: flex; gap: 30px; flex-wrap: wrap; margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--line); max-width: 560px; }
.hero-metrics .m .v { font-family: var(--font-mono); font-size: 22px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.hero-metrics .m .l { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }

.hero-scroll { position: absolute; left: 28px; bottom: 22px; z-index: 2; display: inline-flex; align-items: center; gap: 9px; }
.hero-scroll .bar { width: 30px; height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
.hero-scroll .bar::after { content:""; position:absolute; left:0; top:0; height:100%; width:40%; background: var(--accent); animation: scan 2.4s var(--ease) infinite; }
@keyframes scan { 0%{transform:translateX(-100%)} 100%{transform:translateX(320%)} }

/* ============================ Sections ============================ */
.section { position: relative; padding: 104px 0; }
/* sections separated by space, not dividers (cleaner) */
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head .kicker { color: var(--accent); }
.section-head h2 { font-size: clamp(32px, 4.8vw, 56px); font-weight: 500; margin-top: 10px; }
.section-head p { color: var(--text-2); font-size: 17px; margin-top: 16px; }

/* How we work — feature trio with thin optical glyphs (not numbered: not a sequence) */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; }
.feature .gi { width: 30px; height: 30px; color: var(--accent); margin-bottom: 18px; opacity: .9; }
.feature .gi svg { width: 100%; height: 100%; }
.feature h3 { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.feature p { color: var(--muted); font-size: 14.5px; margin-top: 8px; }

/* Strategy cards */
.strat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.strat-card { position: relative; display: flex; flex-direction: column; background: rgba(255,255,255,.04); backdrop-filter: blur(20px) saturate(120%); -webkit-backdrop-filter: blur(20px) saturate(120%); border: 1px solid rgba(255,255,255,.09); border-radius: 16px; padding: 30px; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 24px 60px -34px rgba(0,0,0,.9); transition: transform .25s var(--ease), border-color .25s, background .25s; }
.strat-card:hover { transform: translateY(-5px); border-color: rgba(91,200,255,.4); background: rgba(255,255,255,.06); }
.strat-card .risk-badge { align-self: flex-start; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); }
.strat-card .risk-badge.high { color: #ffd0a8; border-color: rgba(255,122,26,.4); }
.strat-card .risk-badge.low { color: #a8e6c8; border-color: rgba(74,222,128,.4); }
.strat-card h3 { font-family: var(--font-display); font-size: clamp(25px, 3vw, 33px); font-weight: 600; margin: 14px 0 0; }
.strat-card .sub { color: var(--muted); font-size: 15px; margin-top: 11px; flex: 1; }
.strat-kpis { display: flex; gap: 26px; margin: 22px 0 4px; flex-wrap: wrap; }
.strat-kpis .v { font-family: var(--font-mono); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.strat-kpis .v.pos { color: var(--green); } .strat-kpis .v.neg { color: var(--red); }
.strat-kpis .l { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.strat-link { margin-top: 22px; }

/* Risk-spectrum band — the refraction metaphor, the one place colour is "earned" */
.spectrum-rail { max-width: 860px; }
.spectrum-bar { position: relative; height: 3px; border-radius: 999px; margin: 64px 0 16px; background: var(--spectrum); }
.spectrum-bar .node { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--text); }
.spectrum-bar .node.q { left: 60%; border-color: var(--accent); }
.spectrum-bar .node.r { left: 90%; border-color: var(--sp-7); }
.spectrum-bar .tag { position: absolute; top: -46px; transform: translateX(-50%); font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-align: center; white-space: nowrap; }
.spectrum-bar .tag small { display: block; color: var(--muted); font-size: 10.5px; letter-spacing: .08em; margin-top: 3px; }
.spectrum-bar .tag.q { left: 60%; color: var(--accent); } .spectrum-bar .tag.r { left: 90%; color: var(--sp-7); }
.spectrum-ends { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Contact CTA band */
.cta-band .cta-card { position: relative; border: 1px solid rgba(255,255,255,.09); border-radius: 18px; padding: 66px 32px; text-align: center; overflow: hidden; background: rgba(255,255,255,.03); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.cta-card h2 { font-size: clamp(26px, 4vw, 42px); max-width: 18ch; margin: 0 auto; }
.cta-card p { color: var(--text-2); font-size: 17px; max-width: 520px; margin: 16px auto 28px; }

/* ============================ Footer ============================ */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding: 56px 0 34px; }
.footer-brand .nav-brand { margin-bottom: 14px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 320px; }
.footer-col h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-2); font-size: 14.5px; padding: 5px 0; transition: color .15s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line); padding: 22px 0 40px; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer-bottom p { color: var(--muted); font-size: 12px; max-width: 720px; }

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

/* ============================ Strategy-page chrome (style.css adaptation) ============================ */
.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; margin: 4px 0 -8px; transition: color .15s; }
.back-link:hover { color: var(--accent); }
.back-link svg { width: 15px; height: 15px; }
body.strategy main { max-width: 1020px; }

/* ============================ Responsive ============================ */
@media (max-width: 900px) {
  .features { grid-template-columns: 1fr; }
  .strat-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .container { padding: 0 20px; }
  .nav { padding: 0 20px; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links { display: flex; flex-direction: column; gap: 2px; position: absolute; top: calc(var(--nav-h) - 4px); left: 20px; right: 20px; background: rgba(8,11,18,.97); backdrop-filter: blur(16px); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px; margin: 0; }
  .nav.open .nav-links a { padding: 12px 14px; font-size: 14px; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }
  .footer-inner { grid-template-columns: 1fr; gap: 26px; }
  .hero-beam { width: 70%; right: -6%; }
  .hero-scrim { background: linear-gradient(180deg, rgba(6,8,14,.35) 0%, rgba(6,8,14,.86) 46%, rgba(6,8,14,.96) 100%); }
}

/* ============================ Film grain ============================ */
.grain { position: fixed; inset: 0; z-index: 9; pointer-events: none; opacity: .055; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px; }

/* ============================ Instrument HUD (hero) ============================ */
.hud { position: absolute; z-index: 4; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hud b { color: var(--text-2); font-weight: 500; }
.hud-tr { top: calc(var(--nav-h) + 30px); right: 30px; text-align: right; display: grid; gap: 7px; }
.hud-cross { position: absolute; top: 40%; left: 51%; width: 13px; height: 13px; z-index: 4; opacity: .4; }
.hud-cross::before, .hud-cross::after { content: ""; position: absolute; background: var(--text-2); }
.hud-cross::before { left: 6px; top: 0; width: 1px; height: 13px; }
.hud-cross::after { top: 6px; left: 0; height: 1px; width: 13px; }
.hud-hint { position: absolute; left: 50%; transform: translateX(-50%); bottom: 26px; z-index: 4; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); opacity: .65; }
.hud-vert { position: absolute; left: 24px; bottom: 130px; z-index: 4; writing-mode: vertical-rl; font-family: var(--font-mono); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); opacity: .5; }
@media (max-width: 680px) { .hud-tr, .hud-cross, .hud-hint, .hud-vert { display: none; } }

/* ============================ Reduced motion / forced colors ============================ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
@media (forced-colors: active) {
  .hero-lab h1 .spectrum-word, .nav-wordmark b { -webkit-text-fill-color: currentColor; color: CanvasText; }
}
