/* ============ Fonts ============ */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Barlow:wght@300;400;500;600&display=swap');

/* ============ Tokens ============ */
:root {
  --background: 213 45% 67%;
  --foreground: 0 0% 100%;
  --glass-bg: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.25);
  --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
  --glass-blur: 16px;
}

html, body {
  background: #000;
  color: #fff;
  font-family: 'Barlow', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-heading { font-family: 'Instrument Serif', serif; }
.font-body    { font-family: 'Barlow', sans-serif; }

/* ============ Liquid Glass ============ */
.liquid-glass {
  background: rgba(255, 255, 255, 0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}
.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.15) 20%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0.15) 80%,
    rgba(255, 255, 255, 0.45) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.liquid-glass-strong {
  background: rgba(255, 255, 255, 0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  border: none;
  box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.05),
    inset 0 1px 1px rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}
.liquid-glass-strong::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.2) 20%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0.2) 80%,
    rgba(255, 255, 255, 0.5) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* ============ Blur-in entrance ============ */
.blur-in {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(20px);
  transition: opacity 0.7s ease-out, filter 0.7s ease-out, transform 0.7s ease-out;
}
.blur-in.is-in {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* BlurText per-word stagger */
.blur-text { display: inline; }
.blur-text .bt-word {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(50px);
  transition:
    opacity 0.7s cubic-bezier(.2,.7,.2,1),
    filter  0.7s cubic-bezier(.2,.7,.2,1),
    transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.blur-text.is-in .bt-word {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}
/* italic words are spaced naturally; keep a regular space between */
.bt-space { display: inline-block; width: 0.28em; }

/* Section reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(8px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out, filter 0.8s ease-out;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Video helpers */
.video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fade-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(to bottom, #000 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}
.fade-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(to top, #000 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

/* Placeholder hero video bg (fallback when external video can't load) */
.hero-fallback {
  background:
    radial-gradient(60% 50% at 50% 40%, rgba(120,150,200,0.45), transparent 70%),
    radial-gradient(40% 35% at 70% 70%, rgba(80,90,130,0.4), transparent 70%),
    linear-gradient(180deg, #0a0d14 0%, #050608 100%);
}

/* Placeholder feature gif tile */
.gif-placeholder {
  position: relative;
  background: linear-gradient(135deg, #0d1320 0%, #1a2436 60%, #0d1320 100%);
  overflow: hidden;
}
.gif-placeholder::after {
  content: '';
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(30% 25% at 30% 40%, rgba(140,170,220,0.35), transparent 70%),
    radial-gradient(25% 20% at 70% 60%, rgba(90,120,180,0.4), transparent 70%);
  animation: drift 11s linear infinite;
  filter: blur(20px);
}
@keyframes drift {
  0%   { transform: translate(0,0) rotate(0deg); }
  50%  { transform: translate(6%, -4%) rotate(180deg); }
  100% { transform: translate(0,0) rotate(360deg); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #1a1a1a; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #2a2a2a; }

/* Selection */
::selection { background: rgba(255,255,255,0.2); color: #fff; }

/* Section sizing */
.section { position: relative; }

/* Hide native video controls/poster transition */
video { background: #000; }
