/* ==========================================================================
   Kehar Solutions — design system
   Tokens first. Change brand colours here and the whole site follows.
   ========================================================================== */
:root {
  --bg: #060a14;
  --bg-2: #0a1020;
  --surface: #0f1729;
  --surface-2: #151f36;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #eef2f9;
  --muted: #9aa8c0;          /* 7.6:1 on --bg */
  --cyan: #6d9cf5;
  --violet: #c084fc;
  --amber: #f5b83d;          /* nod to Power BI yellow */
  --green: #34d399;
  --grad: linear-gradient(120deg, var(--cyan), var(--violet));
  --on-accent: #04101a;

  --font-display: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --wrap: 1180px;
  --section: clamp(4.5rem, 10vw, 8rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.02em; margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(109, 156, 245, 0.3); }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--section); position: relative; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--cyan); color: var(--on-accent); padding: .6rem 1rem; border-radius: 8px; z-index: 200; font-weight: 600; }
.skip:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan); display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--cyan); }
.h1 { font-size: clamp(2.5rem, 7.2vw, 5.1rem); font-weight: 700; letter-spacing: -0.035em; }
.h2 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); }
.h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); letter-spacing: -0.01em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 60ch; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.section-head { max-width: 44rem; margin-bottom: clamp(2.2rem, 5vw, 3.8rem); }
.section-head .lead { margin-top: 1.1rem; }

/* ---------- Buttons ---------- */
.btn {
  --pad: .95rem 1.55rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: var(--pad); min-height: 48px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .98rem; position: relative; isolation: isolate; white-space: nowrap;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, border-color .3s;
  touch-action: manipulation;
}
.btn svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { background: var(--grad); color: var(--on-accent); box-shadow: 0 8px 30px -8px rgba(109, 156, 245, 0.55); }
.btn-primary:hover { box-shadow: 0 12px 40px -6px rgba(192, 132, 252, 0.65); transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,.03); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--cyan); background: rgba(109, 156, 245, 0.07); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-sm { min-height: 44px; --pad: .6rem 1.2rem; font-size: .92rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  transition: background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { background: rgba(6, 10, 20, 0.78); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-color: var(--line); }
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: inline-flex; align-items: center; gap: .65rem; font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.02em; min-height: 44px; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo span em { font-style: normal; color: var(--muted); font-weight: 500; }
.nav-links { display: none; align-items: center; gap: .3rem; }
.nav-links a:not(.btn) { padding: .6rem .95rem; border-radius: 999px; color: var(--muted); font-size: .95rem; font-weight: 500; transition: color .25s, background .25s; min-height: 44px; display: inline-flex; align-items: center; }
.nav-links a:not(.btn):hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]:not(.btn)::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); margin-left: .5rem; box-shadow: 0 0 10px var(--cyan); }
.nav-links .btn { margin-left: .6rem; }
.burger { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(255,255,255,.04); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.burger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .4s var(--ease), opacity .3s; }
.burger span + span { margin-top: 5px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu {
  position: fixed; inset: 0; z-index: 90; background: rgba(6, 10, 20, 0.97); padding: calc(var(--header-h) + 1.5rem) var(--gutter) 2rem;
  display: flex; flex-direction: column; gap: .3rem; opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: opacity .35s, transform .45s var(--ease), visibility .35s;
}
.mobile-menu.open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu a:not(.btn) { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; padding: .7rem 0; border-bottom: 1px solid var(--line); min-height: 48px; }
.mobile-menu .btn { margin-top: 1.5rem; }
@media (min-width: 900px) { .nav-links { display: flex; } .burger, .mobile-menu { display: none; } }

/* ---------- Backgrounds ---------- */
.bg-grid { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%); opacity: .55; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; pointer-events: none; z-index: -1; will-change: transform; }
.orb-a { width: 520px; height: 520px; background: radial-gradient(circle, rgba(109,156,245,.55), transparent 70%); top: -140px; left: -160px; animation: drift 18s ease-in-out infinite alternate; }
.orb-b { width: 560px; height: 560px; background: radial-gradient(circle, rgba(192,132,252,.5), transparent 70%); top: 80px; right: -200px; animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate3d(60px, 40px, 0) scale(1.1); } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: calc(var(--header-h) + clamp(2.5rem, 7vw, 5.5rem)); padding-bottom: clamp(3.5rem, 8vw, 6rem); overflow: hidden; }
.hero-grid { display: grid; gap: clamp(2.5rem, 6vw, 4rem); align-items: center; }
.hero .lead { margin-top: 1.5rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.1rem; }
.hero-note { margin-top: 1.6rem; display: flex; align-items: center; gap: .7rem; font-size: .88rem; color: var(--muted); }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 2.2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1.02fr 1fr; } }

/* word split reveal for headings */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.split .w > span { display: inline-block; will-change: transform; }

/* ---------- Dashboard mock (hero visual) ---------- */
.dash {
  position: relative; border-radius: var(--r-lg); padding: 1.1rem; background: linear-gradient(160deg, rgba(21,31,54,.9), rgba(10,16,32,.92));
  border: 1px solid var(--line-strong); box-shadow: 0 40px 90px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02) inset, 0 0 80px -30px rgba(109,156,245,.35);
}
.dash-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; gap: .8rem; }
.dots { display: flex; gap: 6px; } .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.dash-title { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); letter-spacing: .06em; }
.dash-live { font-family: var(--font-mono); font-size: .68rem; color: var(--green); display: inline-flex; align-items: center; gap: .45rem; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.kpi { background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .7rem .8rem; min-width: 0; }
.kpi small { display: block; font-size: .66rem; color: var(--muted); font-family: var(--font-mono); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi b { display: block; font-family: var(--font-display); font-size: clamp(1.05rem, 2.6vw, 1.45rem); font-variant-numeric: tabular-nums; margin-top: .15rem; }
.kpi span { font-size: .7rem; color: var(--green); font-family: var(--font-mono); }
.chart-row { display: grid; gap: .6rem; margin-top: .6rem; grid-template-columns: 1.5fr 1fr; }
.panel { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .8rem; min-width: 0; }
.panel h4 { font-family: var(--font-mono); font-weight: 400; font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 118px; }
.bars i { flex: 1; border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, var(--amber), rgba(245,184,61,.25)); height: var(--h); transform-origin: bottom; }
.bars i:nth-child(3n) { background: linear-gradient(180deg, var(--cyan), rgba(109,156,245,.2)); }
.donut-wrap { display: grid; place-items: center; height: 118px; position: relative; }
.donut { width: 104px; height: 104px; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 11; stroke-linecap: round; }
.donut .track { stroke: rgba(255,255,255,.07); }
.donut-label { position: absolute; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.line-panel { margin-top: .6rem; }
.line-svg { width: 100%; height: 86px; overflow: visible; }
.line-svg .ln { fill: none; stroke: url(#lg); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.line-svg .ar { fill: url(#ag); }
.float-chip {
  position: absolute; display: flex; align-items: center; gap: .6rem; padding: .6rem .85rem; border-radius: 14px; font-size: .78rem;
  background: rgba(10, 16, 32, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line-strong);
  box-shadow: 0 18px 40px -14px rgba(0,0,0,.7); will-change: transform;
}
.float-chip svg { width: 18px; height: 18px; color: var(--cyan); flex: none; }
.float-chip b { display: block; font-size: .8rem; font-family: var(--font-display); }
.float-chip small { color: var(--muted); font-size: .7rem; }
.chip-1 { left: -4%; bottom: 16%; animation: bob 6s ease-in-out infinite; }
.chip-2 { right: -3%; top: -4%; animation: bob 7s ease-in-out -2s infinite; }
@keyframes bob { 50% { transform: translateY(-9px); } }
@media (max-width: 560px) { .chip-1 { left: 0; bottom: -18px; } .chip-2 { right: 0; top: -22px; } .float-chip { padding: .45rem .65rem; } .kpi small { font-size: .6rem; } }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); padding: 1.15rem 0; overflow: hidden; background: rgba(255,255,255,.015); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 3rem; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track, .marquee.paused .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--font-mono); font-size: .85rem; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 3rem; letter-spacing: .04em; }
.marquee-track span::after { content: "◆"; color: var(--cyan); font-size: .55rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.metric { padding: clamp(1.4rem, 3.5vw, 2.4rem); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric:nth-child(2n) { border-right: 0; } .metric:nth-last-child(-n+2) { border-bottom: 0; }
.metric b { display: block; font-family: var(--font-display); font-size: clamp(2.2rem, 5.5vw, 3.6rem); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.metric p { color: var(--muted); font-size: .92rem; margin-top: .7rem; }
@media (min-width: 860px) { .metrics { grid-template-columns: repeat(4, 1fr); } .metric { border-bottom: 0 !important; border-right: 1px solid var(--line) !important; } .metric:last-child { border-right: 0 !important; } }
.ph-tag { display: inline-block; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); border: 1px dashed rgba(245,184,61,.55); padding: .15rem .5rem; border-radius: 6px; vertical-align: middle; }
.ph-note { margin-top: 1rem; font-size: .8rem; color: var(--muted); }

/* ---------- Cards / bento ---------- */
.card {
  position: relative; background: linear-gradient(170deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.4rem, 3vw, 2rem); overflow: hidden; transition: transform .5s var(--ease), border-color .4s, box-shadow .5s;
}
.card::before { /* cursor spotlight */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(109,156,245,.13), transparent 60%);
}
@media (hover: hover) { .card:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); } .card:hover::before { opacity: 1; } }
.icon-box { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(109,156,245,.09); border: 1px solid rgba(109,156,245,.25); color: var(--cyan); margin-bottom: 1.3rem; }
.icon-box svg { width: 26px; height: 26px; }
.icon-box.v { background: rgba(192,132,252,.1); border-color: rgba(192,132,252,.3); color: var(--violet); }
.icon-box.a { background: rgba(245,184,61,.09); border-color: rgba(245,184,61,.3); color: var(--amber); }
.card p { color: var(--muted); margin-top: .7rem; font-size: .97rem; }
.card .more { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1.3rem; font-weight: 600; font-size: .92rem; color: var(--cyan); min-height: 44px; }
.card .more svg { width: 16px; height: 16px; transition: transform .35s var(--ease); } .card .more:hover svg { transform: translateX(4px); }
.bento { display: grid; gap: 1rem; }
@media (min-width: 720px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .bento { grid-template-columns: repeat(6, 1fr); } .bento > :nth-child(1) { grid-column: span 4; } .bento > :nth-child(2) { grid-column: span 2; } .bento > :nth-child(3), .bento > :nth-child(4), .bento > :nth-child(5) { grid-column: span 2; } .bento > :nth-child(6) { grid-column: span 6; } }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.2rem; }
.tag { font-family: var(--font-mono); font-size: .72rem; padding: .28rem .65rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); }

/* ---------- Automation flow ---------- */
.flow-wrap { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 980px) { .flow-wrap { grid-template-columns: 1fr 1.1fr; } }
.flow { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1rem, 3vw, 1.8rem); }
.flow svg { width: 100%; height: auto; overflow: visible; }
.node rect { fill: var(--surface-2); stroke: var(--line-strong); } .node text { fill: var(--text); font-family: var(--font-body); font-size: 13px; font-weight: 500; }
.node .sub { fill: var(--muted); font-size: 10.5px; font-family: var(--font-mono); font-weight: 400; }
.wire { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 1.6; }
.pulse-wire { fill: none; stroke: url(#fg); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 14 120; animation: flowdash 3.2s linear infinite; animation-play-state: paused; }
.flow.on .pulse-wire { animation-play-state: running; }
.pulse-wire:nth-of-type(2n) { animation-delay: -1.1s; } .pulse-wire:nth-of-type(3n) { animation-delay: -2.2s; }
@keyframes flowdash { to { stroke-dashoffset: -134; } }
.checklist li { display: flex; gap: .8rem; padding: .85rem 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.checklist li:last-child { border: 0; }
.checklist svg { width: 22px; height: 22px; color: var(--green); flex: none; margin-top: 2px; }
.checklist b { color: var(--text); font-weight: 600; }

/* ---------- Process ---------- */
.steps { position: relative; display: grid; gap: 1rem; counter-reset: s; }
.step { position: relative; padding: 1.5rem 1.5rem 1.5rem 4.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); counter-increment: s; }
.step::before { content: counter(s, decimal-leading-zero); position: absolute; left: 1.3rem; top: 1.4rem; font-family: var(--font-mono); font-size: 1.05rem; color: var(--cyan); }
.step p { color: var(--muted); font-size: .95rem; margin-top: .5rem; }
.step small { display: inline-block; margin-top: .9rem; font-family: var(--font-mono); font-size: .72rem; color: var(--amber); }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } .step { padding: 4.2rem 1.4rem 1.6rem; } .step::before { left: 1.4rem; top: 1.4rem; font-size: 1.5rem; } }

/* ---------- Case studies ---------- */
.case-grid { display: grid; gap: 1.1rem; }
@media (min-width: 760px) { .case-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .case-grid.three { grid-template-columns: repeat(3, 1fr); } }
.case .thumb { aspect-ratio: 16/10; border-radius: var(--r-md); margin: -.3rem -.3rem 1.4rem; background: linear-gradient(135deg, #0d1a33, #0a1020); border: 1px solid var(--line); position: relative; overflow: hidden; display: flex; align-items: flex-end; gap: 5px; padding: 1.2rem 1.2rem 0; }
.case .thumb i { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--c, var(--cyan)), transparent); height: var(--h); opacity: .85; transform-origin: bottom; transition: transform .6s var(--ease); }
@media (hover: hover) { .case:hover .thumb i { transform: scaleY(1.12); } }
.case .thumb .ph-tag { position: absolute; top: .8rem; right: .8rem; background: rgba(6,10,20,.8); }
.case .sector { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.case h3 { margin-top: .5rem; }
.result-row { display: flex; gap: 1.6rem; margin-top: 1.3rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.result-row b { display: block; font-family: var(--font-display); font-size: 1.55rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.result-row small { color: var(--muted); font-size: .78rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter { padding: .55rem 1.1rem; min-height: 44px; border-radius: 999px; background: transparent; border: 1px solid var(--line-strong); color: var(--muted); font-size: .9rem; font-weight: 500; transition: all .3s; }
.filter:hover { color: var(--text); border-color: var(--cyan); }
.filter[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.case[hidden] { display: none; }

/* ---------- Detail rows (services) ---------- */
.detail { display: grid; gap: 2rem; padding-block: clamp(2.5rem, 6vw, 4.5rem); border-top: 1px solid var(--line); align-items: start; }
@media (min-width: 900px) { .detail { grid-template-columns: .9fr 1.1fr; gap: 4rem; } .detail-sticky { position: sticky; top: calc(var(--header-h) + 24px); } }
.detail .num { font-family: var(--font-mono); color: var(--cyan); font-size: .85rem; margin-bottom: .8rem; display: block; }
.deliver { display: grid; gap: .8rem; }
@media (min-width: 600px) { .deliver { grid-template-columns: 1fr 1fr; } }
.deliver li { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.deliver b { display: block; font-family: var(--font-display); font-size: 1rem; font-weight: 600; margin-bottom: .25rem; }
.deliver span { color: var(--muted); font-size: .9rem; }

/* ---------- Engagement table ---------- */
.models { display: grid; gap: 1rem; }
@media (min-width: 860px) { .models { grid-template-columns: repeat(3, 1fr); } }
.model.featured { border-color: rgba(109,156,245,.45); background: linear-gradient(170deg, rgba(109,156,245,.08), var(--surface)); }
.model .badge { position: absolute; top: 1.2rem; right: 1.2rem; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-accent); background: var(--grad); padding: .25rem .6rem; border-radius: 999px; font-weight: 600; }
.model ul { margin-top: 1.2rem; } .model li { display: flex; gap: .6rem; padding: .45rem 0; color: var(--muted); font-size: .94rem; }
.model li svg { width: 18px; height: 18px; color: var(--cyan); flex: none; margin-top: 3px; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 1.35rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.02rem, 2vw, 1.2rem); min-height: 56px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 1px solid var(--line-strong); position: relative; transition: transform .4s var(--ease), background .3s; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; background: var(--text); transform: translate(-50%, -50%); }
.faq summary i::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .4s var(--ease); }
.faq details[open] summary i { background: rgba(109,156,245,.12); transform: rotate(180deg); } .faq details[open] summary i::after { transform: translate(-50%, -50%) rotate(0); }
.faq .ans { padding: 0 0 1.5rem; color: var(--muted); max-width: 62ch; }

/* ---------- CTA band ---------- */
.cta-band { border-radius: var(--r-lg); padding: clamp(2.2rem, 7vw, 5rem) clamp(1.4rem, 5vw, 4rem); text-align: center; position: relative; overflow: hidden; border: 1px solid var(--line-strong); background: radial-gradient(ellipse 80% 120% at 50% 130%, rgba(192,132,252,.35), transparent 60%), radial-gradient(ellipse 70% 100% at 10% -20%, rgba(109,156,245,.25), transparent 60%), var(--surface); }
.cta-band .lead { margin: 1.2rem auto 0; }
.cta-band .hero-cta { justify-content: center; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-top: calc(var(--header-h) + clamp(3rem, 8vw, 6rem)); padding-bottom: clamp(2rem, 5vw, 4rem); position: relative; overflow: hidden; }
.page-hero .lead { margin-top: 1.4rem; }

/* ---------- About ---------- */
.values { display: grid; gap: 1rem; } @media (min-width: 760px) { .values { grid-template-columns: repeat(3, 1fr); } }
.two-col { display: grid; gap: 2rem; } @media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; } }
.prose p + p { margin-top: 1.1rem; } .prose p { color: var(--muted); }
.team { display: grid; gap: 1rem; } @media (min-width: 700px) { .team { grid-template-columns: repeat(3, 1fr); } }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: var(--on-accent); margin-bottom: 1.2rem; font-size: 1.1rem; }
.stack-grid { display: flex; flex-wrap: wrap; gap: .6rem; }
.stack-grid span { padding: .6rem 1.1rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: .92rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 2rem; } @media (min-width: 940px) { .contact-grid { grid-template-columns: 1.15fr .85fr; gap: 3.5rem; } }
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .45rem; } .field.row { grid-template-columns: 1fr; } @media (min-width: 600px) { .field.row { grid-template-columns: 1fr 1fr; gap: 1.1rem; } }
.field label, .legend { font-size: .88rem; font-weight: 500; }
.field label .req { color: var(--amber); }
.input, select.input, textarea.input {
  width: 100%; min-height: 50px; padding: .8rem 1rem; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line-strong);
  color: var(--text); font: inherit; font-size: 1rem; /* 16px stops iOS zoom */ transition: border-color .25s, box-shadow .25s;
}
textarea.input { min-height: 140px; resize: vertical; }
.input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(109,156,245,.15); }
.input[aria-invalid="true"] { border-color: #f87171; }
.err { color: #fca5a5; font-size: .84rem; min-height: 1.1em; }
.help { color: var(--muted); font-size: .82rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; border: 0; padding: 0; margin: 0; }
.chips legend { padding: 0; margin-bottom: .6rem; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chips span { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .9rem; color: var(--muted); transition: all .25s; }
.chips input:checked + span { background: rgba(109,156,245,.14); border-color: var(--cyan); color: var(--text); }
.chips input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 2px; }
.form-status { padding: 1rem 1.2rem; border-radius: var(--r-sm); border: 1px solid rgba(52,211,153,.4); background: rgba(52,211,153,.08); color: #a7f3d0; font-size: .95rem; }
.form-status[hidden] { display: none; }
.side-list li { display: flex; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); } .side-list li:last-child { border: 0; }
.side-list svg { width: 22px; height: 22px; color: var(--cyan); flex: none; margin-top: 3px; }
.side-list b { display: block; font-family: var(--font-display); font-weight: 500; } .side-list span, .side-list a { color: var(--muted); font-size: .94rem; } .side-list a:hover { color: var(--cyan); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 4rem 2rem; background: var(--bg-2); }
.footer-grid { display: grid; gap: 2.5rem; } @media (min-width: 800px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer h4 { font-family: var(--font-mono); font-weight: 400; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.footer li a { display: inline-flex; min-height: 36px; align-items: center; color: var(--text); opacity: .85; transition: color .25s, opacity .25s; } .footer li a:hover { color: var(--cyan); opacity: 1; }
.footer-bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; color: var(--muted); font-size: .85rem; }

/* ---------- Motion safety / progressive enhancement ---------- */
/* Content is visible by default. Only hide for reveal if JS + GSAP are confirmed running. */
.js [data-reveal] { opacity: 0; }
.js .split { visibility: hidden; }
.js .split.ready { visibility: visible; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .split { visibility: visible; }
  .marquee-track { animation: none; }
}
@media (max-width: 720px) { .orb { filter: blur(60px); opacity: .38; } .orb-a, .orb-b { width: 340px; height: 340px; } }

/* ==========================================================================
   v2 THEME — inspired by the look of modern learning platforms:
   slate-950 base, emerald CTAs, blue highlight, violet banner, tinted
   gradient cards, colourful bento stat tiles, pill/segmented controls.
   ========================================================================== */
:root {
  --bg: #020617; --bg-2: #050b1d; --surface: #0f172a; --surface-2: #131d36;
  --line: rgba(148,163,184,.14); --line-strong: rgba(148,163,184,.28);
  --text: #f8fafc; --muted: #94a3b8;
  --cyan: #6d9cf5; --violet: #c084fc; --green: #4ade80; --amber: #f0b44c;
  --grad: linear-gradient(120deg, #6d9cf5, #c084fc);
  --on-accent: #052e16;
  --banner-h: 40px; --nav-h: 72px; --header-h: 72px;
  --r-md: 12px; --r-lg: 20px;
}
html.no-announce { --banner-h: 0px; }
html { scroll-padding-top: calc(var(--banner-h) + var(--nav-h) + 16px); }
body { background: var(--bg); }
.h1, .h2, .h3, h1, h2, h3 { font-family: var(--font-display); }
.grad-text { background: none; color: var(--cyan); -webkit-text-fill-color: currentColor; }
.split .w > span.grad-text { background: none; color: var(--cyan); }

/* Announcement bar */
.announce { position: fixed; inset: 0 0 auto 0; height: var(--banner-h); z-index: 120; display: flex; align-items: center; justify-content: center; gap: .8rem; padding: 0 3rem; background: linear-gradient(90deg, #b98cf2, #c9a4f8); color: #2e1065; font-size: .88rem; font-weight: 500; overflow: hidden; }
.announce span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.announce a { flex: none; background: #5b21b6; color: #fff; border-radius: 8px; padding: .22rem .7rem; font-weight: 600; font-size: .82rem; min-height: 28px; display: inline-flex; align-items: center; transition: background .25s; }
.announce a:hover { background: #4c1d95; }
.announce-x { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; background: transparent; color: #2e1065; display: grid; place-items: center; border-radius: 50%; }
.announce-x svg { width: 20px; height: 20px; }
html.no-announce .announce { display: none; }
@media (max-width: 640px) { .announce span { display: none; } .announce { justify-content: flex-start; padding-left: 1rem; } .announce::before { content: "Analytics maximizers"; font-weight: 600; } }

/* Header */
.site-header { top: var(--banner-h); height: var(--nav-h); background: rgba(2,6,23,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-header.scrolled { background: rgba(2,6,23,.92); }
.nav-links { gap: .15rem; }
.nav-links a:not(.btn) { border-radius: 10px; border: 1px solid transparent; font-weight: 500; }
.nav-links a[aria-current="page"]:not(.btn) { background: #151f38; border-color: var(--line-strong); color: var(--text); }
.nav-links a[aria-current="page"]:not(.btn)::after { display: none; }
.burger { border-radius: 12px; background: #151f38; border-color: var(--line-strong); }
.mobile-menu { padding-top: calc(var(--banner-h) + var(--nav-h) + 1.5rem); background: rgba(2,6,23,.98); }
.mobile-menu a:not(.btn) { font-size: 1.6rem; }
.hero { padding-top: calc(var(--banner-h) + var(--nav-h) + clamp(2.5rem, 7vw, 4.5rem)); }
.page-hero { padding-top: calc(var(--banner-h) + var(--nav-h) + clamp(2.8rem, 7vw, 5rem)); }

/* Buttons */
.btn { border-radius: 12px; }
.btn-primary { background: var(--green); color: #052e16; box-shadow: 0 10px 30px -12px rgba(74,222,128,.6); }
.btn-primary:hover { background: #6ee7a0; box-shadow: 0 14px 38px -10px rgba(74,222,128,.7); }
.btn-ghost { background: #131d36; border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--cyan); background: #18254a; }

/* Eyebrow becomes a pill badge */
.eyebrow { font-family: var(--font-body); font-size: .9rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text); padding: .5rem 1.15rem; border-radius: 999px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, rgba(49,46,129,.55), rgba(15,23,42,.85)); gap: .6rem; }
.eyebrow::before { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

/* Centered layout, like a landing page */
.section-head { margin-inline: auto; text-align: center; }
.section-head .lead { margin-inline: auto; }
.page-hero .wrap { text-align: center; }
.page-hero h1 { margin-inline: auto; text-transform: uppercase; font-size: clamp(2.1rem, 6vw, 3.9rem); letter-spacing: -.01em; max-width: 18ch !important; }
.page-hero .lead { margin-inline: auto; }
.bg-grid { display: none; }
.orb { opacity: .28; }
.orb-a { background: radial-gradient(circle, rgba(109,156,245,.6), transparent 70%); }
.orb-b { background: radial-gradient(circle, rgba(192,132,252,.55), transparent 70%); }

/* Hero: centred copy, dashboard beneath, floating glossy icons */
.hero .hero-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.hero .hero-grid > div:first-child { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.hero .h1 { max-width: 16ch; margin-inline: auto; font-size: clamp(2.4rem, 7vw, 4.7rem); }
.hero .lead { margin-inline: auto; }
.hero-cta, .hero-note { justify-content: center; }
.hero .hero-grid > div:last-child { width: 100%; max-width: 880px; margin-inline: auto; text-align: left; margin-top: clamp(.5rem, 3vw, 2rem); }
.floaters { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.floater { position: absolute; width: clamp(48px, 6vw, 76px); filter: drop-shadow(0 18px 24px rgba(0,0,0,.55)); animation: bob 7s ease-in-out infinite; }
.floater svg { width: 100%; height: auto; }
.f1 { left: 9%; top: 27%; transform: rotate(-12deg); } .f2 { right: 10%; top: 24%; animation-delay: -2s; transform: rotate(10deg); }
.f3 { left: 5%; top: 55%; animation-delay: -4s; transform: rotate(8deg); } .f4 { right: 6%; top: 52%; animation-delay: -1s; transform: rotate(-8deg); }
@media (max-width: 760px) { .f1 { left: 3%; top: 17%; } .f2 { right: 3%; top: 14%; } .f3, .f4 { display: none; } .floater { width: 42px; opacity: .85; } }

/* Gradient-tinted cards */
.card { background: linear-gradient(180deg, var(--tint, rgba(76,110,245,.2)) 0%, #020617 46%, #0f172a 100%); border-radius: 16px; border-color: var(--line); }
.bento > :nth-child(3n+2), .values > :nth-child(3n+2), .team > :nth-child(3n+2), .case-grid > :nth-child(3n+2) { --tint: rgba(168,85,247,.22); }
.bento > :nth-child(3n), .values > :nth-child(3n), .team > :nth-child(3n), .case-grid > :nth-child(3n) { --tint: rgba(34,197,94,.2); }
.models > :nth-child(1) { --tint: rgba(76,110,245,.24); } .models > :nth-child(2) { --tint: rgba(168,85,247,.28); } .models > :nth-child(3) { --tint: rgba(34,197,94,.22); }
.model.featured { border-color: rgba(192,132,252,.55); background: linear-gradient(180deg, rgba(168,85,247,.3) 0%, #020617 52%, #0f172a 100%); }
.model .badge { background: #c084fc; color: #3b0764; font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: .74rem; font-weight: 600; }
.card::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.07), transparent 60%); }
.icon-box { border-radius: 12px; }
.card .more { color: var(--green); }
.deliver li, .step, .stack-grid span, .flow, .detail { border-color: var(--line); }
.deliver li, .step, .flow { background: linear-gradient(180deg, rgba(76,110,245,.08), #0b1226); }
.ph-tag { color: #fbbf24; }

/* Bento stat tiles */
.metrics { border: 0; background: transparent; border-radius: 0; overflow: visible; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.metric { border: 0 !important; border-radius: 24px; padding: clamp(1.3rem, 3vw, 2rem); position: relative; overflow: hidden; min-height: 200px; display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate; color: #fff; }
.metric b { font-size: clamp(2.2rem, 5vw, 3.4rem); order: 2; }
.metric p { color: rgba(255,255,255,.85); font-weight: 500; font-size: 1rem; margin: 0 0 .5rem; order: 1; }
.metric::after { content: ""; position: absolute; z-index: -1; right: -36px; top: -36px; width: 150px; height: 150px; border-radius: 42%; border: 26px solid rgba(255,255,255,.14); transform: rotate(18deg); }
.metric:nth-child(1) { background: linear-gradient(135deg, #6d28d9, #a855f7); }
.metric:nth-child(2) { background: linear-gradient(135deg, #1f6b4b, #3f9b72); }
.metric:nth-child(3) { background: linear-gradient(160deg, #f0b44c, #a1601c); }
.metric:nth-child(4) { background: linear-gradient(160deg, #162447, #1e293b); } .metric:nth-child(4)::after { border-color: rgba(109,156,245,.55); border-radius: 30%; }
@media (min-width: 860px) { .metrics { grid-template-columns: repeat(4, 1fr); } .metric { border-right: 0 !important; min-height: 230px; } }

/* Segmented control (filters) */
.filters { display: flex; width: fit-content; max-width: 100%; margin-inline: auto; padding: .35rem; gap: .25rem; border: 1px solid var(--line); background: #0b1224; border-radius: 14px; overflow-x: auto; }
.filter { border: 0; border-radius: 10px; white-space: nowrap; color: var(--muted); }
.filter:hover { color: var(--text); background: rgba(255,255,255,.04); }
.filter[aria-pressed="true"] { background: var(--green); color: #052e16; font-weight: 600; }
.case-grid, .case .thumb { }
.case .thumb { background: linear-gradient(135deg, #0d1a33, #060b1c); }

/* Marquee / FAQ / forms */
.marquee { background: rgba(255,255,255,.02); }
.faq summary i { border-color: var(--line-strong); }
.input, select.input, textarea.input { background: #0b1224; border-radius: 12px; }
.chips input:checked + span { background: rgba(74,222,128,.14); border-color: var(--green); }
.chips span { border-radius: 10px; }
.form-status { border-color: rgba(74,222,128,.4); }

/* Dashboard mock */
.dash { border-radius: 20px; background: linear-gradient(170deg, #111b34, #070d20); box-shadow: 0 40px 90px -30px rgba(0,0,0,.85), 0 0 90px -30px rgba(109,156,245,.35); }
.bars i { background: linear-gradient(180deg, #f0b44c, rgba(240,180,76,.22)); }
.bars i:nth-child(3n) { background: linear-gradient(180deg, #4ade80, rgba(74,222,128,.2)); }
.dash-live { color: var(--green); }

/* CTA band: bold violet panel */
.cta-band { background: linear-gradient(135deg, #5b21b6 0%, #9333ea 55%, #c084fc 110%); border: 0; color: #fff; border-radius: 24px; box-shadow: 0 40px 80px -40px rgba(147,51,234,.6); }
.cta-band .lead { color: rgba(255,255,255,.88); }
.cta-band .eyebrow { background: rgba(2,6,23,.35); border-color: rgba(255,255,255,.3); }
.cta-band .btn-ghost { background: rgba(2,6,23,.4); border-color: rgba(255,255,255,.35); }
.footer { background: #020617; }
.avatar { background: linear-gradient(135deg, #4ade80, #6d9cf5); }
.pulse { background: var(--green); }
@media (max-width: 1000px) { .f1 { left: 3%; top: 17%; } .f2 { right: 3%; top: 15%; } .f3 { left: 3%; top: 60%; } .f4 { right: 3%; top: 58%; } }
.filters { flex-wrap: nowrap; }
.filter { flex: none; }

/* ---- Fixes: consistent section headers, even case cards, About tiles ---- */
.section-head .btn { margin-top: 1.6rem; }
.section-head > div { display: block; }
.case-grid { align-items: stretch; }
.case { display: flex; flex-direction: column; }
.case h3 { min-height: 3.4em; }            /* same title height across cards */
.case .result-row { margin-top: auto; }
.case p { margin-bottom: 1.3rem; }
.case .thumb { flex: none; }

/* About: 2x2 text tiles instead of cramped 4-up number tiles */
.metrics.metrics-2 { grid-template-columns: repeat(2, 1fr) !important; }
.metrics-2 .metric { min-height: 180px; padding: 1.4rem; }
.metrics-2 .metric b { font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.15; overflow-wrap: anywhere; }
.metrics-2 .metric p { font-size: .92rem; }
.two-col > * { min-width: 0; }
@media (max-width: 640px) { .announce::before { white-space: nowrap; font-size: .82rem; } .announce { gap: .5rem; padding-right: 2.8rem; } }

/* ==========================================================================
   Dashboards page: contents sidebar + click-through viewer
   ========================================================================== */
.dash-layout { display: grid; gap: 2rem; }
@media (min-width: 980px) { .dash-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 3rem; align-items: start; } }
.toc { position: sticky; top: calc(var(--banner-h) + var(--nav-h) + 16px); z-index: 5; background: rgba(2,6,23,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 16px; padding: 1rem; }
.toc-h { font-size: 1.15rem; margin-bottom: .6rem; }
.toc ol { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; }
.toc a:not(.btn) { display: block; padding: .6rem .8rem; border-radius: 10px; color: var(--muted); font-size: .92rem; font-weight: 500; border-left: 2px solid transparent; white-space: nowrap; min-height: 44px; display: flex; align-items: center; transition: color .25s, background .25s; }
.toc a:not(.btn):hover { color: var(--text); background: rgba(255,255,255,.04); }
.toc a.active { color: var(--cyan); border-left-color: var(--cyan); background: rgba(109,156,245,.08); }
.toc .btn { margin-top: .6rem; width: 100%; white-space: normal; text-align: center; }
@media (max-width: 979px) { .toc-h { display: none; } .toc .btn { display: none; } .toc { padding: .5rem; } }
@media (min-width: 980px) { .toc ol { display: block; } .toc a:not(.btn) { white-space: normal; padding: .8rem .9rem; } }

.dash-main { display: grid; gap: clamp(3rem, 7vw, 5.5rem); min-width: 0; }
.showcase-head { margin-bottom: 1.6rem; max-width: 62ch; }
.showcase-head .lead { margin-top: .9rem; }
.num-tag { font-family: var(--font-mono); color: var(--green); font-size: .85rem; display: block; margin-bottom: .6rem; }

.viewer { display: grid; gap: 1rem; min-width: 0; }
.viewer-tabs { display: flex; gap: .25rem; padding: .35rem; border: 1px solid var(--line); background: #0b1224; border-radius: 14px; overflow-x: auto; width: fit-content; max-width: 100%; scrollbar-width: thin; }
.viewer-tabs button { flex: none; border: 0; background: transparent; color: var(--muted); padding: .6rem 1rem; min-height: 44px; border-radius: 10px; font-weight: 500; font-size: .92rem; white-space: nowrap; transition: background .25s, color .25s; }
.viewer-tabs button:hover { color: var(--text); background: rgba(255,255,255,.05); }
.viewer-tabs button[aria-selected="true"] { background: var(--green); color: #052e16; font-weight: 600; }
.viewer-stage { border: 1px solid var(--line-strong); border-radius: 16px; overflow: hidden; background: #0b1226; box-shadow: 0 40px 80px -40px rgba(0,0,0,.9), 0 0 80px -40px rgba(109,156,245,.35); }
.browser-bar { display: flex; align-items: center; gap: .8rem; padding: .6rem .9rem; background: #0f172a; border-bottom: 1px solid var(--line); }
.browser-bar .dots { display: flex; gap: 6px; } .browser-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.browser-bar .url { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 8px; padding: .3rem .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expand { width: 44px; height: 44px; margin: -.4rem -.5rem -.4rem 0; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 10px; transition: color .25s, background .25s; }
.expand:hover { color: var(--text); background: rgba(255,255,255,.06); } .expand svg { width: 20px; height: 20px; }
.img-btn { display: block; width: 100%; padding: 0; border: 0; background: #f2f2f2; cursor: zoom-in; aspect-ratio: 2000 / 1125; }
.img-btn img { width: 100%; height: 100%; object-fit: contain; display: block; transition: opacity .22s ease; }
.img-btn img.is-swapping { opacity: 0; }
.viewer-foot { display: grid; gap: 1rem; align-items: center; }
@media (min-width: 760px) { .viewer-foot { grid-template-columns: 1fr auto; gap: 2rem; } }
.viewer-caption { color: var(--muted); font-size: .98rem; max-width: 68ch; }
.viewer-caption b { display: block; color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; margin-bottom: .25rem; }
.viewer-nav { display: flex; align-items: center; gap: .8rem; justify-self: start; }
@media (min-width: 760px) { .viewer-nav { justify-self: end; } }
.viewer-nav span { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); min-width: 4.5ch; text-align: center; }
#prev::before { content: "←"; margin-right: .3rem; } #next svg { width: 16px; height: 16px; }

.showcase-grid { display: grid; gap: 1rem; margin-top: 2.2rem; }
@media (min-width: 760px) { .showcase-grid { grid-template-columns: 1fr 1fr; } }
.showcase-grid .card:nth-child(1) { --tint: rgba(76,110,245,.22); } .showcase-grid .card:nth-child(2) { --tint: rgba(168,85,247,.22); }
.showcase-grid .checklist { margin-top: .8rem; }

.soon { text-align: center; padding: clamp(2rem, 6vw, 4rem); }
.soon-bars { display: flex; align-items: flex-end; justify-content: center; gap: 8px; height: 110px; margin-bottom: 1.4rem; opacity: .55; }
.soon-bars i { width: 22px; height: var(--h); border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--cyan), transparent); }
.soon p { margin-inline: auto; max-width: 46ch; }

#lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
#lightbox::backdrop { background: rgba(2,6,23,.94); }
#lightbox img { position: absolute; inset: 3.5rem 1rem 1rem; margin: auto; max-width: calc(100vw - 2rem); max-height: calc(100vh - 4.5rem); width: auto; height: auto; object-fit: contain; border-radius: 10px; background: #f2f2f2; }
.lb-close { position: absolute; top: .6rem; right: .8rem; z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-strong); background: #151f38; color: var(--text); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lb-close:hover { background: #1c2a4d; }
@media (prefers-reduced-motion: reduce) { .img-btn img { transition: none; } }
.toc ol { list-style: none; margin: 0; padding: 0; }
.dash-layout { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .dash-layout { grid-template-columns: 250px minmax(0, 1fr); } }
.dash-layout > *, .showcase, .viewer > * { min-width: 0; }
.toc ol { max-width: 100%; }

/* Viewer footer: Previous/Next sit directly under the image and never move.
   The caption below has a locked height (set in JS) so nothing shifts on page change. */
.viewer-foot { display: flex; flex-direction: column; gap: 1rem; align-items: stretch; }
.viewer-nav { order: -1; justify-self: auto; justify-content: space-between; gap: .8rem; }
.viewer-nav .viewer-count { flex: 1; text-align: center; }
.viewer-nav .btn { min-width: 8.5rem; }
.viewer-caption { max-width: 78ch; }
@media (min-width: 760px) { .viewer-foot { display: flex; } .viewer-nav { justify-self: auto; } }
.showcase + .showcase { padding-top: 0; }

/* Mobile polish for the Work page viewers */
.viewer-nav .viewer-count { white-space: nowrap; }
@media (max-width: 979px) { .toc { position: static; } }
@media (max-width: 480px) { .viewer-nav .btn { min-width: 0; padding-inline: 1rem; } }

/* Screenshot frame: no light strip can show around the image */
#logistics-dashboard .img-btn { background: #0f2a3c; }
.img-btn img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Home page: featured dashboards */
.work-grid { display: grid; gap: 1.1rem; }
@media (min-width: 760px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
.work-card { padding: clamp(1rem, 2.4vw, 1.4rem); display: flex; flex-direction: column; }
.work-card:nth-child(1) { --tint: rgba(76,110,245,.22); } .work-card:nth-child(2) { --tint: rgba(168,85,247,.22); }
.work-shot { border-radius: 12px; overflow: hidden; border: 1px solid var(--line-strong); aspect-ratio: 2000 / 1125; background: #0f2a3c; margin-bottom: 1.2rem; box-shadow: 0 24px 50px -28px rgba(0,0,0,.9); }
.work-shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s var(--ease); }
@media (hover: hover) { .work-card:hover .work-shot img { transform: scale(1.03); } }
.work-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.work-meta .sector { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.work-card h3 { margin-top: .6rem; }
.work-card .more { margin-top: auto; padding-top: 1rem; }
.stretch { color: inherit; }
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.stretch:focus-visible { outline: none; }
.stretch:focus-visible::after { outline: 3px solid var(--cyan); outline-offset: -3px; border-radius: 16px; }
@media (prefers-reduced-motion: reduce) { .work-shot img { transition: none; } }
