/* ═══════════════════════════════════════════════════════════
   Wipplinger Consulting — Shared Design System
   Premium dark-only foundation. Every page links here.
   ═══════════════════════════════════════════════════════════ */

/* Rainbow word — Apple-style animated gradient text, used sparingly as signature accent */
.rainbow-word {
  background-image: linear-gradient(92deg, #ff7a59 0%, #ffb14a 14%, #ffd84a 28%, #6fdb86 42%, #4ec6ee 56%, #4f7dff 70%, #a26bff 84%, #ff5aa0 100%);
  background-size: 220% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: rainbow-shift 9s linear infinite;
  font-weight: 500;
  display: inline-block;
}
@keyframes rainbow-shift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

:root {
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
  --font-mono: var(--font-sans);
  --container: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-pill: 999px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --accent: oklch(0.82 0.018 258);
  --accent-soft: oklch(0.82 0.018 258 / 0.14);
  --accent-fg: #0a0a0a;
  --silver: linear-gradient(135deg, oklch(0.96 0.005 258) 0%, oklch(0.78 0.018 258) 28%, oklch(0.94 0.010 258) 55%, oklch(0.62 0.020 258) 80%, oklch(0.88 0.012 258) 100%);
  --silver-text: linear-gradient(135deg, oklch(0.98 0.005 258) 0%, oklch(0.82 0.018 258) 30%, oklch(0.96 0.010 258) 55%, oklch(0.72 0.020 258) 80%, oklch(0.92 0.012 258) 100%);
  --bg: #050505; --bg-2: #0a0a0a;
  --surface: #0e0e0e; --surface-2: #161616; --surface-3: #1f1f1f;
  --border: rgba(255,255,255,0.08); --border-strong: rgba(255,255,255,0.14);
  --text: #f5f5f5; --text-dim: rgba(245,245,245,0.62); --text-faint: rgba(245,245,245,0.38);
  --glass: rgba(10,10,10,0.55);
  --shadow-lg: 0 30px 80px -20px rgba(0,0,0,0.65), 0 8px 24px -8px rgba(0,0,0,0.4);
  --shadow-pop: 0 16px 40px -12px rgba(0,0,0,0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }

body {
  font-family: var(--font-sans);
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01","cv11";
  letter-spacing: -0.005em;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -100px; left: 16px; padding: 10px 16px; background: var(--text); color: var(--bg); border-radius: 8px; z-index: 200; transition: top .2s; }
.skip-link:focus { top: 16px; }

/* Subtle grain on every page */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='3'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.container--narrow { max-width: 920px; }
.container--wide { max-width: 1440px; }
.section { padding: clamp(80px, 9vw, 140px) 0; position: relative; }
.section--tight { padding: clamp(56px, 6vw, 96px) 0; }
.section-divider { border-top: 1px solid var(--border); }

/* ─── Typography ─── */
.h-display { font-size: clamp(54px, 8.8vw, 132px); line-height: 0.92; letter-spacing: -0.04em; font-weight: 500; margin: 0; }
.h1 { font-size: clamp(40px, 5.6vw, 84px); line-height: 1.0; letter-spacing: -0.035em; font-weight: 500; margin: 0; }
.h2 { font-size: clamp(32px, 4.2vw, 60px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 500; margin: 0; }
.h3 { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 500; margin: 0; }
.lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--text-dim); letter-spacing: -0.005em; }
.mono { font-family: var(--font-sans); font-size: 12.5px; letter-spacing: 0.01em; text-transform: none; color: var(--text-dim); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-dim); }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
code { font-family: var(--font-sans); font-size: 0.92em; font-weight: 500; color: var(--accent); background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }

/* ─── Buttons ─── */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: var(--r-pill); font-weight: 500; font-size: 14.5px; letter-spacing: -0.005em; border: 1px solid transparent; cursor: pointer; transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); white-space: nowrap; position: relative; overflow: hidden; }
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--text); color: var(--bg); }
.btn--primary:hover { background: var(--accent); color: var(--accent-fg); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--text); }
.btn--accent { background: var(--silver); background-size: 200% 100%; background-position: 0% 50%; color: #0a0a0a; transition: background-position .6s var(--ease), filter .25s var(--ease), transform .25s var(--ease-out); }
.btn--accent:hover { background-position: 100% 50%; filter: brightness(1.05); }
.btn .arrow { display: inline-block; transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn--lg { padding: 16px 28px; font-size: 16px; }

/* ─── Chips ─── */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: var(--r-pill); border: 1px solid var(--border); font-size: 12.5px; font-weight: 500; color: var(--text-dim); background: var(--surface); }
.chip--mono { font-family: var(--font-sans); font-size: 12.5px; letter-spacing: 0; text-transform: none; font-weight: 500; }
.chip--accent { color: var(--accent); border-color: color-mix(in oklch, var(--accent) 30%, transparent); background: var(--accent-soft); }

/* ─── Navbar (pill, with mega-menu support) ─── */
.nav-wrap { position: fixed; top: 0; left: 0; right: 0; z-index: 50; pointer-events: none; }
.nav-wrap > * { pointer-events: auto; }
.nav-pill {
  margin: 18px auto 0; width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 4px; padding: 6px;
  border-radius: var(--r-pill);
  background: var(--glass); border: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.4);
  position: relative;
}
.nav-pill .nav-logo { padding: 0 14px 0 12px; display: flex; align-items: center; gap: 8px; }
.nav-pill .nav-items { position: relative; display: flex; }
.nav-indicator { position: absolute; inset: 0 auto 0 0; background: var(--surface-2); border-radius: var(--r-pill); transition: transform .4s var(--ease), width .4s var(--ease), opacity .25s var(--ease); pointer-events: none; opacity: 0; }
.nav-pill .nav-link, .nav-pill .nav-toggle { position: relative; z-index: 1; padding: 10px 16px; font-size: 14px; font-weight: 500; color: var(--text-dim); border-radius: var(--r-pill); cursor: pointer; transition: color .2s var(--ease); background: transparent; border: 0; font-family: inherit; display: inline-flex; align-items: center; gap: 6px; }
.nav-pill .nav-link:hover, .nav-pill .nav-toggle:hover, .nav-pill .nav-link.is-active { color: var(--text); }
.nav-pill .nav-toggle__caret { width: 8px; height: 8px; transition: transform .25s var(--ease); }
.nav-pill .nav-cta { margin-left: 6px; }
.nav-wordmark { height: 32px; width: auto; display: block; }
.nav-mobile-trigger { display: none; width: 36px; height: 36px; padding: 0; border-radius: var(--r-pill); border: 0; background: transparent; color: var(--text); cursor: pointer; align-items: center; justify-content: center; }
.nav-mobile-trigger svg { width: 18px; height: 18px; }

/* Mega-menu panel */
.nav-mega {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: clamp(560px, 70vw, 880px);
  background: rgba(10,10,10,0.85);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .35s var(--ease);
}
.nav-mega.is-open { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.nav-mega::before {
  content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px;
}
.nav-mega__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.nav-mega__item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); transition: background .2s var(--ease); cursor: pointer; }
.nav-mega__item:hover { background: var(--surface-2); }
.nav-mega__icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.02) 100%),
    rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    inset 0 -1px 0 rgba(0,0,0,0.20),
    0 4px 14px -4px rgba(0,0,0,0.5);
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .3s var(--ease-out), box-shadow .25s var(--ease);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav-mega__icon img { width: 22px; height: 22px; object-fit: contain; display: block; transition: transform .25s var(--ease-out); }
.nav-mega__item:hover .nav-mega__icon {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.05) 100%),
    rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.24);
  transform: scale(1.06) translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -1px 0 rgba(0,0,0,0.20),
    0 10px 26px -6px rgba(0,0,0,0.55);
}
.nav-mega__item:hover .nav-mega__icon img { transform: scale(1.08); }
.nav-mega__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nav-mega__title { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); }
.nav-mega__sub { font-size: 12.5px; color: var(--text-dim); line-height: 1.4; }
.nav-mega__foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.01em; text-transform: none; color: var(--text-faint); }
.nav-mega__foot a { color: var(--text-dim); transition: color .2s var(--ease); }
.nav-mega__foot a:hover { color: var(--text); }

@media (max-width: 880px) {
  .nav-pill .nav-items { display: none; }
  .nav-pill .nav-cta { display: none; }
  .nav-mobile-trigger { display: inline-grid; }
}

/* Mobile overlay menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(5,5,5,0.95);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
  padding: 24px var(--gutter);
  opacity: 0; pointer-events: none;
  transform: translateY(-10px);
  transition: opacity .35s var(--ease), transform .45s var(--ease);
}
.mobile-menu.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.mobile-menu__top { display: flex; justify-content: space-between; align-items: center; padding: 6px 0 22px; border-bottom: 1px solid var(--border); }
.mobile-menu__close { width: 36px; height: 36px; padding: 0; border-radius: var(--r-pill); border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.mobile-menu__list { list-style: none; padding: 22px 0; margin: 0; display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.mobile-menu__list > li { padding: 0; }
.mobile-menu__link { display: flex; justify-content: space-between; align-items: center; padding: 18px 4px; font-size: 28px; font-weight: 500; letter-spacing: -0.025em; color: var(--text); border-bottom: 1px solid var(--border); }
.mobile-menu__link .arrow { color: var(--text-faint); font-size: 22px; transition: transform .2s var(--ease), color .2s var(--ease); }
.mobile-menu__link:hover .arrow, .mobile-menu__link:focus-visible .arrow { transform: translateX(4px); color: var(--text); }
.mobile-menu__sub { list-style: none; padding: 8px 0 16px 4px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.mobile-menu__sub a { font-size: 14px; color: var(--text-dim); padding: 8px 0; display: block; }
.mobile-menu__cta { padding: 22px 0 8px; }

/* ─── Footer ─── */
.footer { padding: 0 0 32px; margin-top: clamp(80px, 9vw, 120px); position: relative; overflow: hidden; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 32px; padding-bottom: clamp(48px, 6vw, 72px); border-bottom: 1px solid var(--border); margin-bottom: clamp(48px, 6vw, 72px); }
.footer-top__title { font-size: clamp(28px, 3.8vw, 48px); font-weight: 500; letter-spacing: -0.025em; line-height: 1.05; margin: 12px 0 0; text-wrap: balance; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.01em; text-transform: none; color: var(--text-faint); font-weight: 500; margin: 0 0 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.footer-col li a, .footer-col li { color: var(--text-dim); transition: color .2s var(--ease); }
.footer-col li a:hover { color: var(--text); }
.footer-base { margin-top: clamp(48px, 6vw, 72px); padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; font-size: 12.5px; color: var(--text-faint); flex-wrap: wrap; }
.footer-base .mono { color: var(--text-faint); }

/* ─── Section head pattern ─── */
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 56px; position: relative; }
.section-head .lead { max-width: 480px; }
@media (max-width: 720px) { .section-head { grid-template-columns: 1fr; gap: 16px; } }
.section-head::before { content: ""; position: absolute; top: -28px; left: 0; width: 0; height: 1px; background: var(--text); transition: width 1.2s var(--ease-out) 0.2s; opacity: 0.6; }
.section-head.reveal.is-in::before, .section-head.is-in::before { width: 48px; }

/* ─── Breadcrumb ─── */
.crumbs { padding-top: clamp(110px, 14vw, 160px); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.01em; text-transform: none; color: var(--text-faint); }
.crumbs li::after { content: "/"; margin-left: 8px; color: var(--text-faint); }
.crumbs li:last-child::after { content: ""; }
.crumbs a { color: var(--text-dim); transition: color .2s var(--ease); }
.crumbs a:hover { color: var(--text); }
.crumbs .current { color: var(--text); }

/* ─── Data table ─── */
.data-table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.data-table thead { background: var(--surface-2); }
.data-table th { text-align: left; padding: 16px 20px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.01em; text-transform: none; color: var(--text-faint); font-weight: 500; border-bottom: 1px solid var(--border); }
.data-table td { padding: 16px 20px; border-bottom: 1px solid var(--border); font-size: 14.5px; color: var(--text-dim); vertical-align: top; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: var(--surface-2); color: var(--text); }
.data-table td strong, .data-table td.label { color: var(--text); font-weight: 500; }
.data-table td.num { font-family: var(--font-mono); color: var(--accent); white-space: nowrap; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ─── Generic content prose (for legal pages, blog later) ─── */
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 500; letter-spacing: -0.02em; margin: 56px 0 18px; line-height: 1.2; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: clamp(18px, 1.8vw, 22px); font-weight: 500; letter-spacing: -0.015em; margin: 40px 0 14px; color: var(--text); }
.prose p { font-size: 16px; line-height: 1.7; color: var(--text-dim); margin: 0 0 16px; }
.prose p strong { color: var(--text); font-weight: 500; }
.prose a { color: var(--accent); transition: opacity .2s var(--ease); border-bottom: 1px solid color-mix(in oklch, var(--accent) 35%, transparent); }
.prose a:hover { opacity: 0.85; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; color: var(--text-dim); }
.prose li { margin-bottom: 6px; line-height: 1.6; }
.prose blockquote { border-left: 2px solid var(--accent); padding: 6px 0 6px 18px; margin: 22px 0; color: var(--text); font-size: 17px; font-style: italic; }

/* ─── Premium animation primitives ───
   Custom cursor, reveals, mask animations, view transitions.
   Performance-first: transform/opacity only, GPU-accelerated. */

/* Custom cursor (hidden on touch / coarse pointers) */
.cursor, .cursor-dot { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 1000; mix-blend-mode: difference; will-change: transform; }
.cursor { width: 32px; height: 32px; border: 1px solid rgba(255,255,255,0.45); border-radius: 50%; transition: width .25s var(--ease-out), height .25s var(--ease-out), border-color .2s var(--ease), background-color .2s var(--ease); transform: translate(-50%, -50%); }
.cursor-dot { width: 4px; height: 4px; background: #ffffff; border-radius: 50%; transform: translate(-50%, -50%); }
body.is-hover-link .cursor { width: 64px; height: 64px; border-color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.08); }
body.is-hover-link .cursor-dot { opacity: 0; }
body.is-dragging .cursor { width: 48px; height: 48px; background: var(--accent); border-color: var(--accent); mix-blend-mode: normal; }
@media (pointer: coarse), (hover: none) { .cursor, .cursor-dot { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .cursor, .cursor-dot { display: none !important; } }
@media (max-width: 760px) { .cursor, .cursor-dot { display: none !important; } }

/* Reveal — fade up */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); will-change: opacity, transform; }
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* Reveal — clip mask (premium magazine feel) */
.reveal-mask { display: inline-block; overflow: hidden; }
.reveal-mask > * { display: inline-block; transform: translateY(110%); transition: transform 1s var(--ease-out); will-change: transform; }
.reveal-mask.is-in > * { transform: translateY(0); }

/* Stagger helper — set --i: 0,1,2... on children */
.stagger > * { --d: calc(var(--i, 0) * 80ms); transition-delay: var(--d); }

/* Mark — animated underline accent */
.mark { position: relative; display: inline-block; }
.mark::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.06em; height: 0.28em; background: var(--accent-soft); border-bottom: 2px solid var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease-out); z-index: -1; }
.mark.is-in::after, .reveal.is-in .mark::after { transform: scaleX(1); }

/* Page-load entrance for hero blocks */
.hero-enter { opacity: 0; transform: translateY(20px); animation: hero-enter 1s var(--ease-out) forwards; }
@keyframes hero-enter { to { opacity: 1; transform: none; } }
.hero-enter--d1 { animation-delay: 0.05s; }
.hero-enter--d2 { animation-delay: 0.18s; }
.hero-enter--d3 { animation-delay: 0.32s; }
.hero-enter--d4 { animation-delay: 0.46s; }
.hero-enter--d5 { animation-delay: 0.6s; }
.hero-enter--d6 { animation-delay: 0.74s; }

/* Live pulse dot */
.dot--live { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,0.15); animation: live-pulse 2s var(--ease) infinite; display: inline-block; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Generic blink */
@keyframes blink { 50% { opacity: 0; } }

/* Number-count target */
[data-countup] { font-variant-numeric: tabular-nums; }

/* Page transition (View Transitions API) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: fade-out .3s var(--ease) forwards; }
::view-transition-new(root) { animation: fade-in .4s var(--ease-out) forwards; }
@keyframes fade-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* Focus visible */
.btn:focus-visible, .nav-link:focus-visible, .nav-toggle:focus-visible, .nav-mega__item:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero-enter, .reveal, .reveal-mask > * { opacity: 1 !important; transform: none !important; }
}

/* Selection */
::selection { background: var(--accent); color: var(--accent-fg); }

/* ─── Spline 3D Integration ─────────────────────────────────
   <spline-viewer> embedded scenes with lazy-loading,
   mobile fallback, reduced-motion respect, animated placeholder. */
.spline-slot { position: relative; width: 100%; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-2); aspect-ratio: 16/10; isolation: isolate; border: 1px solid var(--border); }
.spline-slot--hero      { aspect-ratio: 16/9;  max-width: 1140px; margin-inline: auto; }
.spline-slot--wide      { aspect-ratio: 21/9; }
.spline-slot--square    { aspect-ratio: 1/1; }
.spline-slot--portrait  { aspect-ratio: 3/4; }
.spline-slot--phone     { aspect-ratio: 9/16; max-width: 340px; }

.spline-slot spline-viewer { position: absolute; inset: 0; width: 100% !important; height: 100% !important; background: transparent !important; display: block !important; z-index: 3; }
.spline-slot iframe.spline-iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; background: transparent; border: 0; display: block; z-index: 3; }
.spline-slot .spline-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }

/* Animated placeholder — shows while runtime loads or when no URL set */
.spline-slot__placeholder { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background:
  radial-gradient(60% 60% at 50% 50%, color-mix(in oklch, var(--accent) 28%, transparent), transparent 70%),
  radial-gradient(40% 40% at 70% 35%, color-mix(in oklch, #a26bff 22%, transparent), transparent 60%),
  radial-gradient(50% 50% at 25% 75%, color-mix(in oklch, #4ec6ee 18%, transparent), transparent 65%),
  var(--bg-2);
  overflow: hidden;
}
.spline-slot__placeholder::before { content: ""; width: 42%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.55) 0%, color-mix(in oklch, var(--accent) 80%, transparent) 35%, color-mix(in oklch, var(--accent) 20%, transparent) 65%, transparent 100%); filter: blur(1px); animation: spline-orb-float 8s ease-in-out infinite; box-shadow: 0 30px 80px -20px color-mix(in oklch, var(--accent) 50%, transparent); }
.spline-slot__placeholder::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.04) 0%, transparent 60%); mix-blend-mode: overlay; }
@keyframes spline-orb-float { 0%, 100% { transform: scale(1) translate(0,0); filter: blur(1px); } 50% { transform: scale(1.06) translate(2%, -3%); filter: blur(0.5px); } }
.spline-slot__placeholder-label { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.01em; text-transform: none; color: var(--text-faint); opacity: 0.4; }

/* When a real <spline-viewer> is present + loaded, hide the placeholder */
.spline-slot.is-loaded .spline-slot__placeholder { opacity: 0; transition: opacity .6s var(--ease-out); pointer-events: none; }

/* Mobile + reduced motion: hide spline embed entirely, keep placeholder/fallback */
@media (pointer: coarse), (max-width: 760px), (prefers-reduced-motion: reduce) {
  .spline-slot spline-viewer, .spline-slot iframe.spline-iframe { display: none !important; }
  .spline-slot.is-loaded .spline-slot__placeholder { opacity: 1; }
}

/* When iframe is in DOM and loaded, fade out placeholder */
.spline-slot:has(iframe.spline-iframe) .spline-slot__placeholder { animation: spline-fade-out 1.6s ease-in-out 1.2s forwards; }
@keyframes spline-fade-out { to { opacity: 0; pointer-events: none; } }
@media (pointer: coarse), (max-width: 760px), (prefers-reduced-motion: reduce) {
  .spline-slot:has(iframe.spline-iframe) .spline-slot__placeholder { animation: none; opacity: 1; }
}
