/* ═══════════════════════════════════════════════════════════
   OLIVIA — Design System
   Brand tokens, typography, layout, components
   ═══════════════════════════════════════════════════════════ */

/* ── BRAND TOKENS ── */
:root {
  --teal: #00D4AA;
  --violet: #7C5CFC;
  --pink: #FF6B9D;
  --orange: #FF6B35;
  --dark: #141414;
  --darker: #0A0A0A;
  --light: #FAFAFA;
  --white: #FFFFFF;
  --grey-100: #F4F4F5;
  --grey-200: #E4E4E7;
  --grey-300: #D4D4D8;
  --grey-400: #A1A1AA;
  --grey-500: #71717A;
  --grey-600: #52525B;
  --grey-700: #3F3F46;
  --grey-800: #27272A;
  --grey-900: #18181B;

  --gradient-brand: linear-gradient(90deg, #00D4AA, #7C5CFC, #FF6B9D);
  --gradient-brand-v: linear-gradient(180deg, #00D4AA, #7C5CFC);
  --gradient-subtle: linear-gradient(135deg, rgba(0,212,170,0.08), rgba(124,92,252,0.08));
  --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow-teal: 0 0 30px rgba(0,212,170,0.15);
  --shadow-glow-violet: 0 0 30px rgba(124,92,252,0.15);

  --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);
  --ease-spring-new: cubic-bezier(0.16,1,0.3,1);
  --ease-smooth: cubic-bezier(0.4,0,0.2,1);

  --nav-height: 72px;
  --section-gap: 160px;
  --container-max: 1280px;
  --container-wide: 1440px;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  background: var(--darker);
  color: var(--white);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: rgba(124,92,252,0.3);
  color: var(--white);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── TYPOGRAPHY ── */
.text-xs  { font-size: 0.75rem; line-height: 1.5; }
.text-sm  { font-size: 0.875rem; line-height: 1.5; }
.text-base { font-size: 1rem; line-height: 1.6; }
.text-lg  { font-size: 1.125rem; line-height: 1.6; }
.text-xl  { font-size: 1.25rem; line-height: 1.5; }
.text-2xl { font-size: 1.5rem; line-height: 1.4; }
.text-3xl { font-size: 1.875rem; line-height: 1.3; }
.text-4xl { font-size: 2.25rem; line-height: 1.2; }
.text-5xl { font-size: 3rem; line-height: 1.15; }
.text-6xl { font-size: 3.75rem; line-height: 1.1; }
.text-7xl { font-size: 4.5rem; line-height: 1.05; }
.text-8xl { font-size: 6rem; line-height: 1; }

.font-light  { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold   { font-weight: 700; }
.font-black  { font-weight: 900; }

.tracking-tight  { letter-spacing: -0.02em; }
.tracking-tighter { letter-spacing: -0.04em; }

.text-gradient {
  background-image: linear-gradient(90deg, #00D4AA, #7C5CFC, #FF6B9D) !important;
  background-size: 200% 200% !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
  animation: gradient-shift 6s ease infinite;
}

/* ── GRADIENT WORD (animated text highlight) ── */
.gradient-word {
  background-image: linear-gradient(90deg, #00D4AA, #7C5CFC, #FF6B9D, #00D4AA) !important;
  background-size: 300% 100% !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
  opacity: 1 !important;
  display: inline !important;
  animation: gradient-flow 8s ease infinite;
}
/* JS-driven viscous gradient position (always active, no CSS animation fallback needed) */
.gradient-word[data-gradient-x] {
  animation: none !important;
  background-position: var(--gx, 150%) 50%;
}
/* Propagate gradient to split-text inner spans (inline-block children
   can't inherit parent background-clip:text) */
.gradient-word .split-word-inner {
  background-image: linear-gradient(90deg, #00D4AA, #7C5CFC, #FF6B9D, #00D4AA) !important;
  background-size: 300% 100% !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
}
.gradient-word .split-word-inner,
.gradient-word[data-gradient-x] .split-word-inner {
  animation: none !important;
  background-position: var(--gx, 150%) 50%;
}
@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Section-specific gradient temperature overrides ── */

/* WARM — Enterprise (orange): orange → pink → orange */
.gradient-word.gradient-warm,
.gradient-word.gradient-warm .split-word-inner {
  background-image: linear-gradient(90deg, #FF6B35, #FF6B9D, #7C5CFC, #FF6B35) !important;
}

/* COOL — Build (teal): teal → violet → teal */
.gradient-word.gradient-cool,
.gradient-word.gradient-cool .split-word-inner {
  background-image: linear-gradient(90deg, #00D4AA, #7C5CFC, #00D4AA, #7C5CFC) !important;
}

/* VIOLET — Connect & Dashboard (violet): violet → teal → violet */
.gradient-word.gradient-violet,
.gradient-word.gradient-violet .split-word-inner {
  background-image: linear-gradient(90deg, #7C5CFC, #00D4AA, #7C5CFC, #00D4AA) !important;
}

/* PINK — Web3 (pink): pink → violet → pink */
.gradient-word.gradient-pink,
.gradient-word.gradient-pink .split-word-inner {
  background-image: linear-gradient(90deg, #FF6B9D, #7C5CFC, #FF6B9D, #7C5CFC) !important;
}

.text-muted { color: var(--grey-400); }
.text-subtle { color: var(--grey-500); }
.text-teal { color: var(--teal); }
.text-violet { color: var(--violet); }
.text-pink { color: var(--pink); }

/* ── LAYOUT ── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
}
.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 40px;
}

section {
  padding: var(--section-gap) 0;
  position: relative;
  z-index: 1; /* Ensure sections are below fixed nav elements */
}

.grid { display: grid; gap: 32px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 32px; }
.gap-xl { gap: 48px; }

/* ── NAVIGATION ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 99990; /* High but below theme toggle and hamburger */
  display: flex;
  align-items: center;
  padding: 0 40px;
  transition: all 0.4s var(--ease-out);
}
.nav.scrolled {
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-logo .cursor-bar {
  width: 3px;
  height: 24px;
  border-radius: 2px;
  background: var(--gradient-brand-v);
  animation: blink 1.2s ease-in-out infinite;
  margin-left: 1px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--grey-400);
  transition: color 0.3s ease;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-brand);
  transition: width 0.3s var(--ease-out);
  border-radius: 1px;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}
.nav-cta {
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--white);
  color: var(--dark);
  transition: all 0.3s var(--ease-out);
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255,255,255,0.15);
}

/* ── SUB-NAVIGATION (sticky pill bar below nav) ── */
.subnav-bar {
  position: fixed;
  top: var(--nav-height, 72px);
  left: 0;
  right: 0;
  z-index: 999;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.subnav-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 100%;
}
.subnav-pills::-webkit-scrollbar { display: none; }

.subnav-pill {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--grey-500);
  padding: 5px 14px;
  border-radius: 100px;
  white-space: nowrap;
  transition: color 0.25s ease, background 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.subnav-pill:hover {
  color: var(--grey-200);
  background: rgba(255,255,255,0.06);
}
.subnav-pill.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

/* Light mode */
html.light .subnav-bar {
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: rgba(0,0,0,0.06);
}
html.light .subnav-pill { color: #a1a1aa; }
html.light .subnav-pill:hover {
  color: #3f3f46;
  background: rgba(0,0,0,0.04);
}
html.light .subnav-pill.active {
  color: #141414;
  background: rgba(0,0,0,0.07);
}

/* Mobile: horizontal scroll, smaller pills */
@media (max-width: 768px) {
  .subnav-bar { justify-content: flex-start; }
  .subnav-pills { padding: 0 16px; gap: 4px; }
  .subnav-pill { font-size: 0.6875rem; padding: 4px 12px; }
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all 0.3s var(--ease-out);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--white);
  color: var(--dark);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,255,255,0.15);
}
.btn-gradient {
  background: var(--gradient-brand);
  background-size: 200% 200%;
  color: var(--white);
  animation: gradient-shift 4s ease infinite;
}
.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124,92,252,0.3);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.15);
}
.btn-outline:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.03);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--grey-400);
  padding: 10px 20px;
}
.btn-ghost:hover {
  color: var(--white);
}
.btn .arrow {
  transition: transform 0.3s var(--ease-out);
}
.btn:hover .arrow {
  transform: translateX(4px);
}

/* ── CARDS ── */
.card {
  background: var(--gradient-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 40px;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.card:hover::before {
  opacity: 1;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.1);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.5rem;
}
.card-icon.teal { background: rgba(0,212,170,0.1); color: var(--teal); }
.card-icon.violet { background: rgba(124,92,252,0.1); color: var(--violet); }
.card-icon.pink { background: rgba(255,107,157,0.1); color: var(--pink); }
.card-icon.orange { background: rgba(255,107,53,0.1); color: var(--orange); }

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.card-text {
  color: var(--grey-400);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ── SECTION HEADERS ── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin-bottom: 20px;
}
.section-label .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

.section-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--grey-400);
  max-width: 640px;
  line-height: 1.7;
}

/* ── DIVIDERS ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  margin: 0 auto;
  max-width: var(--container-max);
}

/* ── BADGES / TAGS ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255,255,255,0.05);
  color: var(--grey-300);
  border: 1px solid rgba(255,255,255,0.08);
}
.badge.teal  { background: rgba(0,212,170,0.1); color: var(--teal); border-color: rgba(0,212,170,0.2); }
.badge.violet { background: rgba(124,92,252,0.1); color: var(--violet); border-color: rgba(124,92,252,0.2); }
.badge.pink  { background: rgba(255,107,157,0.1); color: var(--pink); border-color: rgba(255,107,157,0.2); }

/* ── FOOTER ── */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}
.footer-brand .footer-logo {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.footer-brand p {
  color: var(--grey-500);
  font-size: 0.875rem;
  max-width: 280px;
  line-height: 1.7;
}
.footer-col h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-400);
  margin-bottom: 20px;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col a {
  font-size: 0.875rem;
  color: var(--grey-500);
  transition: color 0.3s ease;
}
.footer-col a:hover {
  color: var(--white);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--grey-600);
}
.footer-socials {
  display: flex;
  gap: 16px;
}
.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  color: var(--grey-500);
  transition: all 0.3s ease;
  font-size: 0.875rem;
}
.footer-socials a:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

/* ── ANIMATIONS ── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.12; }
}
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0,212,170,0.1); }
  50% { box-shadow: 0 0 40px rgba(0,212,170,0.2); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }

/* ── SPLIT TEXT WORD REVEAL ── */
[data-split-text] .split-word {
  display: inline;
}

/* ── BLUR TO SHARP REVEAL ── */
[data-blur-reveal] {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(24px) scale(0.97);
  transition: opacity 0.9s var(--ease-out), filter 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
[data-blur-reveal].blur-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

/* ── CARD SPOTLIGHT GLOW (smooth flowing linear gradient) ── */
[data-spotlight] {
  position: relative;
  overflow: hidden;
}
[data-spotlight]::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    var(--spot-angle, 135deg),
    rgba(0,212,170,0.08) 0%,
    rgba(124,92,252,0.06) 40%,
    rgba(255,107,157,0.05) 70%,
    transparent 100%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 1;
}
[data-spotlight]:hover::after {
  opacity: 1;
}

/* ── CARD HOVER LIFT ── */
[data-lift] {
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s ease;
}
[data-lift]:hover {
  transform: translateY(-12px) !important;
  box-shadow: 0 24px 64px rgba(0,212,170,0.08), 0 8px 32px rgba(0,0,0,0.4) !important;
  border-color: rgba(0,212,170,0.15) !important;
}

/* ── BUTTON RIPPLE ── */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0);
  animation: ripple-out 0.65s ease-out forwards;
  pointer-events: none;
  z-index: 2;
}
@keyframes ripple-out {
  to { transform: scale(4); opacity: 0; }
}

/* ── INFINITE MARQUEE ── */
.marquee-track {
  display: flex;
  gap: 48px;
  animation: marquee-scroll 35s linear infinite;
  width: max-content;
}
.marquee-track:hover {
  animation-play-state: paused;
}
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-container {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
}

/* ── SECTION LABEL LETTER SPACING ── */
[data-expand] {
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(12px);
  transition: letter-spacing 1s var(--ease-out), opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
[data-expand].expand-visible {
  letter-spacing: 0.16em;
  opacity: 1;
  transform: translateY(0);
}

/* ── 3D STAGGER ENTRANCE ── */
[data-3d-stagger] {
  perspective: 1200px;
}
[data-3d-stagger] > * {
  opacity: 0;
  transform: translateZ(-80px) rotateY(-8deg) translateY(30px);
  transition: all 0.8s var(--ease-spring);
}
[data-3d-stagger].stagger-visible > * {
  opacity: 1;
  transform: translateZ(0) rotateY(0deg) translateY(0);
}

/* ── BORDER GRADIENT FLOW (smooth linear, not spinning) ── */
[data-glow-border] {
  position: relative;
}
[data-glow-border]::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(90deg, #00D4AA, #7C5CFC, #FF6B9D, #00D4AA);
  background-size: 300% 100%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
  animation: border-flow 8s ease infinite;
}
[data-glow-border]:hover::before {
  opacity: 1;
}
@keyframes border-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── SCROLL PROGRESS BAR ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  transform: scaleY(0);
  transform-origin: top;
  background: linear-gradient(180deg, var(--teal), var(--violet), var(--pink), var(--teal));
  background-size: 100% 300%;
  animation: scroll-gradient-flow 4s ease infinite;
  z-index: 10001;
  pointer-events: none;
  border-radius: 0 2px 2px 0;
  will-change: transform;
}
@keyframes scroll-gradient-flow {
  0% { background-position: 0% 0%; }
  50% { background-position: 0% 100%; }
  100% { background-position: 0% 0%; }
}

/* ── SVG STROKE DRAW ── */
[data-draw] path,
[data-draw] circle,
[data-draw] rect,
[data-draw] line,
[data-draw] polyline,
[data-draw] polygon {
  transition: stroke-dashoffset 1.2s var(--ease-out);
}

/* Custom cursor removed */

/* ── PAGE TRANSITIONS ── */
body {
  animation: page-enter 0.5s var(--ease-out) both;
}
body.page-leaving {
  animation: page-leave 0.35s var(--ease-out) both;
}
@keyframes page-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes page-leave {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ── SECTION ALTERNATING BACKGROUNDS (Apple-style) ── */
.section-alt {
  background: #1E1E1E;
}
html.light .section-alt {
  background: #f5f5f7;
}

/* ── SCRAMBLE TEXT ── */
[data-scramble] {
  font-variant-numeric: tabular-nums;
}

/* ── FORM FOCUS GLOW ── */
input:focus, textarea:focus, select:focus {
  box-shadow: 0 0 0 3px rgba(0,212,170,0.15), 0 0 20px rgba(0,212,170,0.08);
}

/* ── WAVE TEXT ── */
.wave-char {
  display: inline-block;
  animation: wave-bounce 2.4s ease-in-out infinite;
  animation-play-state: paused;
}
.wave-active .wave-char {
  animation-play-state: running;
}
@keyframes wave-bounce {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-6px); }
  75% { transform: translateY(2px); }
}

/* ── SECTION BACKGROUNDS (cleaned — no images) ── */

/* Case study banners */
.cs-banner {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.cs-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10,10,10,0.9) 100%);
}
.cs-banner.dpd    { background-image: url('../assets/images/case-studies/dpd.webp'); }
.cs-banner.myclaim { background-image: url('../assets/images/case-studies/myclaim.webp'); }
.cs-banner.aone   { background-image: url('../assets/images/case-studies/aone.webp'); }
.cs-banner.trents { background-image: url('../assets/images/case-studies/trents.webp'); }

/* Timeline images */
.timeline-img {
  width: 100%;
  max-width: 600px;
  height: 200px;
  border-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,0.06);
  margin-top: 20px;
  opacity: 0.7;
  transition: opacity 0.6s ease;
}
.timeline-img:hover {
  opacity: 1;
}

/* ── LIGHT MODE OVERRIDES ──
   NOTE: theme.js inverts CSS vars (--dark→#FFF, --white→#141414, greys flipped)
   so ALL light-mode rules use EXPLICIT hex colours, never var(--dark) etc.
   ═══════════════════════════════════════════════════════════ */

/* Body & global text */
html.light { background: #FAFAFA; }
html.light body { background: #FAFAFA; color: #141414; }
.light { color: #141414; }
.light h1, .light h2, .light h3, .light h4, .light h5, .light h6 {
  color: #141414;
}
.light p { color: #52525B; }
.light a { color: #3F3F46; }

/* Light mode banner overlay */
.light .cs-banner::after {
  background: linear-gradient(180deg, transparent 40%, rgba(250,250,250,0.95) 100%);
}

/* Navigation */
.light .nav-links a { color: #71717A; }
.light .nav-links a:hover,
.light .nav-links a.active { color: #141414; }
.light .nav-logo .wordmark { color: #141414 !important; }

/* Section headers */
.light .section-label { color: #00D4AA; }
.light .section-title { color: #141414; }
.light .section-subtitle { color: #71717A; }

/* Card text */
.light .card-title,
.light .what-card h3,
.light .solution-card h3,
.light .case-card h3,
.light .channel-card h3,
.light .product-card h3,
.light .usecase-card h3,
.light .team-card h3,
.light .value-card h3,
.light .earn-card h3,
.light .roadmap-card h3,
.light .process-step h3,
.light .build-step h3 { color: #141414; }

.light .card-text,
.light .what-card p,
.light .solution-card p,
.light .case-card p,
.light .channel-card p,
.light .product-card p,
.light .usecase-card p,
.light .team-card p,
.light .value-card p,
.light .earn-card p,
.light .roadmap-card p,
.light .process-step p,
.light .build-step p { color: #52525B; }

.light .text-muted { color: #71717A; }
.light .text-subtle { color: #A1A1AA; }

/* Card link colors */
.light .what-card .card-link,
.light .card a { color: #3F3F46; }

/* Footer text */
.light .footer-brand p { color: #71717A; }
.light .footer-col h4 { color: #141414; }
.light .footer-col a { color: #71717A; }
.light .footer-col a:hover { color: #141414; }
.light .footer-bottom p { color: #A1A1AA; }
.light .footer-socials a {
  background: rgba(0,0,0,0.06);
  color: #71717A;
}
.light .footer-socials a:hover {
  background: rgba(0,0,0,0.1);
  color: #141414;
}

/* Forms */
.light .form-group label { color: #3F3F46; }
.light .form-group input,
.light .form-group textarea,
.light .form-group select {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.12);
  color: #141414;
}
.light .form-group input::placeholder,
.light .form-group textarea::placeholder { color: #A1A1AA; }
.light .form-group select option { background: #FAFAFA; color: #141414; }

/* Info cards */
.light .info-card { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.08); }
.light .info-card h3 { color: #141414; }
.light .info-card p { color: #52525B; }

/* Chat demo */
.light .chat-demo { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); }
.light .chat-header { background: rgba(0,0,0,0.02); border-bottom-color: rgba(0,0,0,0.06); }
.light .msg.user { background: #7C5CFC; color: white; }
.light .msg.agent { background: rgba(0,0,0,0.06); color: #3F3F46; }
.light .chat-input { border-top-color: rgba(0,0,0,0.06); }
.light .chat-input input { background: rgba(0,0,0,0.04); color: #141414; }
.light .chat-input input::placeholder { color: #A1A1AA; }

/* Channel cards */
.light .channel-card { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.08); }
.light .channel-card h3 { color: #141414; }

/* Feature items */
.light .feature-item h4 { color: #141414; }
.light .feature-item p { color: #52525B; }

/* Hero sections on all pages */
.light .conn-hero h1,
.light .hero h1,
.light .ent-hero h1,
.light .web3-hero h1,
.light .build-hero h1 { color: #141414; }
.light .conn-hero p,
.light .hero p,
.light .ent-hero p,
.light .web3-hero p,
.light .build-hero p { color: #71717A; }

/* Hero badge */
.light .hero-badge {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.12);
  color: #71717A;
}
.light .hero-scroll { color: #A1A1AA; }
.light .hero-scroll .scroll-line { background: linear-gradient(to bottom, #A1A1AA, transparent); }

/* Timeline images */
.light .timeline-img { border-color: rgba(0,0,0,0.08); }

/* Override inline white text for light mode */
.light [style*="color:var(--white)"],
.light [style*="color: var(--white)"],
.light [style*="color:#fff"],
.light [style*="color: #fff"],
.light [style*="color:white"],
.light [style*="color: white"],
.light [style*="color:#FFFFFF"],
.light [style*="color: #FFFFFF"] {
  color: #141414 !important;
}

/* Badges */
.light .badge { background: rgba(0,0,0,0.04); color: #52525B; border-color: rgba(0,0,0,0.08); }
.light .badge.teal { background: rgba(0,212,170,0.08); color: #00D4AA; border-color: rgba(0,212,170,0.15); }
.light .badge.violet { background: rgba(124,92,252,0.08); color: #7C5CFC; border-color: rgba(124,92,252,0.15); }
.light .badge.pink { background: rgba(255,107,157,0.08); color: #FF6B9D; border-color: rgba(255,107,157,0.15); }

/* Contract box */
.light .contract-box { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); }
.light .contract-box .copy-btn { color: #141414; }
.light .contract-box .copy-btn:hover { background: rgba(0,0,0,0.06); color: #141414; }

/* API visual */
.light .api-visual { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); }
.light .api-visual::before { background: rgba(0,0,0,0.03); border-bottom-color: rgba(0,0,0,0.06); }
.light .api-visual pre { color: #52525B; }
.light .api-visual .kw { color: #7C5CFC; }
.light .api-visual .str { color: #00D4AA; }
.light .api-visual .comment { color: #A1A1AA; }

/* Placeholders */
.light input::placeholder,
.light textarea::placeholder { color: #A1A1AA !important; }

/* ── LOGOS: remove white filter in light mode ── */
.light .trust-logos img,
.light .marquee-track img,
.light [class*="trust"] img[style*="filter"],
.light .marquee img {
  filter: brightness(0) !important;   /* black logos on light bg */
  opacity: 0.7 !important;
}

/* Outline button */
.light .btn-outline {
  border-color: rgba(0,0,0,0.2);
  color: #141414;
}
.light .btn-outline:hover {
  border-color: rgba(0,0,0,0.4);
  background: rgba(0,0,0,0.03);
}

/* Ghost button */
.light .btn-ghost { color: #71717A; }
.light .btn-ghost:hover { color: #141414; }

/* Primary button - light mode */
html.light .btn-primary { background: #00D4AA !important; color: white !important; }

/* Ecosystem section (light) handled in index.html inline styles */

/* Stat numbers and labels */
.light .stat-number,
.light .stat h3,
.light .metric-value { color: #141414; }
.light .stat-label,
.light .stat p,
.light .metric-label { color: #71717A; }

/* FAQ items */
.light .faq-item summary,
.light .faq-item h3 { color: #141414; }
.light .faq-item p { color: #52525B; }

/* Token/Web3 specific */
.light .token-banner { color: #141414; }
.light .tokenomics-visual { color: #141414; }
.light .alloc-item { color: #52525B; }

/* Roadmap */
.light .roadmap-card { color: #141414; }
.light .roadmap-card .roadmap-date { color: #71717A; }

/* CTA box */
.light .cta-box { border-color: rgba(0,0,0,0.08) !important; }
.light .cta-box h2 { color: #141414; }
.light .cta-box p { color: #52525B; }


/* ── RESPONSIVE ── */

/* Mobile-only elements - hidden on desktop */
.mobile-only { display: none; }

/* Hamburger Button - hidden on desktop */
.nav-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  flex-shrink: 0;
  position: relative;
  z-index: 999999 !important; /* Same as theme toggle - both clickable */
}
.nav-menu-btn:hover {
  background: rgba(255,255,255,0.1);
}
.light .nav-menu-btn {
  background: rgba(0,0,0,0.04);
  color: #141414;
}
.light .nav-menu-btn:hover {
  background: rgba(0,0,0,0.08);
}

@media (max-width: 1024px) {
  :root { --section-gap: 100px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .section-title { font-size: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --section-gap: 80px; --nav-height: 60px; }
  .container, .container-wide { padding: 0 16px; }
  .nav { padding: 0 16px; }
  .nav-inner { gap: 12px; }
  
  /* Show hamburger button and mobile-only elements */
  .nav-menu-btn { display: flex; }
  .mobile-only { display: block; }
  
  /* Hide nav CTA on mobile - will be in mobile menu */
  .nav-cta { display: none; }
  
  /* Hide desktop nav links - mobile menu overlay */
  .nav-links { 
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: linear-gradient(180deg, #0A0A0A 0%, #141414 100%) !important;
    flex-direction: column !important;
    padding: 24px !important;
    padding-top: 100px !important;
    gap: 0 !important;
    z-index: 99991 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Subtle gradient accent at top of menu */
  .nav-links::before {
    content: '';
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FF6B35, #7C5CFC, #00D4AA, #FF6B9D);
    opacity: 0.8;
  }
  
  /* Show mobile menu when .show is added */
  .nav-links.show {
    display: flex !important;
  }
  
  .nav-links li {
    width: 100% !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    list-style: none !important;
    position: relative;
  }
  
  .nav-links a {
    display: flex !important;
    align-items: center !important;
    padding: 20px 0 !important;
    padding-left: 16px !important;
    font-size: 1.25rem !important;
    font-weight: 500 !important;
    color: rgba(255,255,255,0.85) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
  }
  
  .nav-links a:hover {
    color: #FFFFFF !important;
  }
  
  .nav-links a::after {
    display: none !important;
  }
  
  /* Brand color indicators for each menu item */
  .nav-links li:nth-child(1) a::before { /* Enterprise - Orange */
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: #FF6B35;
    border-radius: 2px;
  }
  .nav-links li:nth-child(2) a::before { /* Connect - Violet */
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: #7C5CFC;
    border-radius: 2px;
  }
  .nav-links li:nth-child(3) a::before { /* Build - Teal */
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: #00D4AA;
    border-radius: 2px;
  }
  .nav-links li:nth-child(4) a::before { /* Web3 - Pink */
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: #FF6B9D;
    border-radius: 2px;
  }
  .nav-links li:nth-child(5) a::before, /* Our Story - Grey */
  .nav-links li:nth-child(6) a::before { /* Blog - Grey */
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
  }
  
  /* Active page highlighting - when link has inline color style */
  .nav-links a[style*="color:var(--orange)"] { color: #FF6B35 !important; }
  .nav-links a[style*="color:var(--violet)"] { color: #7C5CFC !important; }
  .nav-links a[style*="color:var(--teal)"] { color: #00D4AA !important; }
  .nav-links a[style*="color:var(--pink)"] { color: #FF6B9D !important; }
  
  /* Light mode mobile menu */
  .light .nav-links {
    background: linear-gradient(180deg, #FFFFFF 0%, #F8F8F8 100%) !important;
  }
  .light .nav-links::before {
    opacity: 1;
  }
  .light .nav-links li {
    border-bottom-color: rgba(0,0,0,0.06) !important;
  }
  .light .nav-links a {
    color: rgba(0,0,0,0.75) !important;
  }
  .light .nav-links a:hover {
    color: #141414 !important;
  }
  .light .nav-links li:nth-child(5) a::before,
  .light .nav-links li:nth-child(6) a::before {
    background: rgba(0,0,0,0.15);
  }
  
  /* Mobile CTA button in menu */
  .nav-links li.mobile-only {
    border-bottom: none !important;
    margin-top: 24px !important;
  }
  .nav-links li.mobile-only a::before {
    display: none !important;
  }
  .nav-links .mobile-cta {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-top: 8px !important;
    padding: 18px 32px !important;
    background: linear-gradient(90deg, #00D4AA, #7C5CFC) !important;
    color: #FFFFFF !important;
    border-radius: var(--radius-full) !important;
    text-align: center !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    box-shadow: 0 4px 20px rgba(0,212,170,0.3) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  }
  .nav-links .mobile-cta:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 25px rgba(0,212,170,0.4) !important;
  }
  /* Page-specific CTA colors (set via inline styles) */
  .nav-links .mobile-cta[style*="background:var(--orange)"] {
    background: #FF6B35 !important;
    box-shadow: 0 4px 20px rgba(255,107,53,0.3) !important;
  }
  .nav-links .mobile-cta[style*="background:var(--violet)"] {
    background: #7C5CFC !important;
    box-shadow: 0 4px 20px rgba(124,92,252,0.3) !important;
  }
  .nav-links .mobile-cta[style*="background:var(--teal)"] {
    background: #00D4AA !important;
    box-shadow: 0 4px 20px rgba(0,212,170,0.3) !important;
  }
  .nav-links .mobile-cta[style*="background:var(--pink)"] {
    background: #FF6B9D !important;
    box-shadow: 0 4px 20px rgba(255,107,157,0.3) !important;
  }
  .light .nav-links .mobile-cta {
    color: #FFFFFF !important;
  }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section-title { font-size: 1.75rem; }
  .text-7xl { font-size: 2.5rem; }
  .text-8xl { font-size: 3rem; }
/* Footer - 2x2 grid on mobile instead of single column */
  .footer-grid { 
    grid-template-columns: 1fr 1fr; 
    gap: 32px 24px;
  }
  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 8px;
  }
  .footer-brand p {
    max-width: 100%;
    margin: 0 auto;
  }
  .footer-col h4 {
    font-size: 0.75rem;
    margin-bottom: 14px;
  }
  .footer-col ul {
    gap: 10px;
  }
  .footer-col a {
    font-size: 0.8125rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  /* Hero adjustments */
  .hero h1 { font-size: 2rem; line-height: 1.2; }
  .hero p { font-size: 1rem; }
  
  /* Hero CTA buttons - force vertical layout with proper spacing */
  .hero-ctas { 
    display: flex !important;
    flex-direction: column !important; 
    gap: 20px !important;
    align-items: stretch !important;
  }
  .hero-ctas .btn { 
    width: 100% !important; 
    justify-content: center !important;
    margin: 0 !important;
  }
  
  /* Buttons */
  .btn { padding: 14px 24px; font-size: 0.9375rem; }
  .btn-lg { padding: 16px 28px; }
  
  /* Cards */
  .card { padding: 24px; }
  
  /* Subnav - ensure it's below theme toggle */
  .subnav-bar { height: 48px; z-index: 9990; }
  .subnav-pill { padding: 8px 16px; font-size: 0.8125rem; min-height: 36px; }
  
  /* Particles canvas on mobile - enable with performance optimizations */
  #particleCanvas { 
    display: block !important; 
    /* Lower z-index on mobile to prevent touch interference */
    z-index: 1 !important;
  }
  
  /* Hero scroll indicator - hide on mobile to prevent overlap with buttons */
  .hero-scroll {
  display: none !important;
  }
  
  /* Mobile: simplify animations for performance */
  [data-blur-reveal] { filter: blur(6px); }
  [data-3d-stagger] > * { transform: translateY(30px); }
  [data-3d-stagger].stagger-visible > * { transform: translateY(0); }
  [data-split-text] .split-word-inner { transform: translateY(100%); }
  .scroll-progress { width: 2px; }
  
  /* Mobile: ensure reveals trigger properly with lower threshold requirements */
  .reveal { opacity: 0; transform: translateY(20px); }
}

/* Tablet */
@media (max-width: 1024px) {
  /* Fix 2-column grids on tablets */
  .conn-hero .container,
  .build-hero .container,
  .ent-hero .container {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
}

/* Small phones */
@media (max-width: 480px) {
  :root { --section-gap: 60px; }
  .container, .container-wide { padding: 0 12px; }
  .nav { padding: 0 12px; }
  .section-title { font-size: 1.5rem; }
  .section-subtitle { font-size: 1rem; }
  .hero h1 { font-size: 1.75rem; }
  .card { padding: 20px; }
  .card-title { font-size: 1.125rem; }
  .footer { padding: 48px 0 24px; }
  
  /* Footer stays 2 columns but tighter */
  .footer-grid {
    gap: 24px 16px;
  }
  .footer-col h4 {
    font-size: 0.6875rem;
    margin-bottom: 10px;
  }
  .footer-col ul {
    gap: 8px;
  }
  .footer-col a {
    font-size: 0.75rem;
  }
  
  /* Ensure logo strip wraps */
  .logo-strip { flex-wrap: wrap; justify-content: center; gap: 16px; }
  .logo-strip img { height: 20px; }
}

/* Disable hover effects on touch devices */
@media (hover: none) {
  [data-spotlight]::after { display: none; }
  [data-lift]:hover { transform: none !important; box-shadow: var(--shadow-lg) !important; }
  [data-glow-border]::before { display: none; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
  }
  .reveal, [data-blur-reveal], [data-split-text] .split-word-inner, [data-3d-stagger] > *, [data-expand] {
    opacity: 1 !important; transform: none !important; filter: none !important;
  }
  .marquee-track { animation: none !important; }
  .scroll-progress { display: none; }
}
