@font-face {
  font-family: "Alexana";
  src:  url("fonts/Alexana.woff2") format("woff2"),
        url("fonts/Alexana.ttf") format("truetype");
  font-display: swap;
}

* { box-sizing: border-box; }
html, body {
  height: 100%;
}
body {
  margin: 0;
  background: #0b0b10;
  color: #ffffff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  overflow: hidden;
}

:root {
  /* Controls overall blob size and canvas bleed */
  --blob: 90vmax; /* increase/decrease to scale gradients */
  --bleed: -20vmax; /* negative inset to avoid edges when animating */
  --color-2: #0071ab;
  --color-5: #028e72;
  --color-3: #ec9e20;
  --color-1: #ed6238;
  --color-4: #f6a2a9;
}

.center {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
  pointer-events: none;
}

.brand {
  font-family: "Alexana", system-ui, sans-serif;
  font-size: clamp(3rem, 12vw, 12rem);
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: lowercase;
  text-align: center;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(255,255,255,0.15);
  animation: neon-flicker 7.5s ease-in-out infinite;
}

/* Animated abstract blurry background */
.canvas {
  position: fixed;
  inset: var(--bleed); /* bleed beyond edges for smoother animation */
  z-index: 0;
  filter: blur(40px) saturate(120%);
  background: radial-gradient(var(--blob) var(--blob) at 20% 30%,  var(--color-5), transparent 60%),
              radial-gradient(calc(var(--blob) * 0.85) calc(var(--blob) * 0.85) at 80% 20%, var(--color-2), transparent 60%),
              radial-gradient(calc(var(--blob) * 0.92) calc(var(--blob) * 0.92) at 30% 80%, var(--color-3), transparent 60%),
              radial-gradient(calc(var(--blob) * 0.75) calc(var(--blob) * 0.75) at 75% 75%, var(--color-4), transparent 60%),
              radial-gradient(calc(var(--blob) * 1.35) calc(var(--blob) * 1.35) at 50% 50%, var(--color-1), transparent 65%);
  animation: drift 28s linear infinite alternate;
  /* Prevent flicker on some GPUs when animating large blurred fixed layers */
  backface-visibility: hidden;
  will-change: transform, filter;
  transform: translateZ(0);
  contain: paint;
}

/* Subtle animated low-contrast lines for abstract wave feel */
.canvas::before {
  content: "";
  position: absolute;
  inset: -10vmax;
  background-image:
    repeating-linear-gradient(-12deg, rgba(255,255,255,0.10) 0 2px, transparent 2px 60px),
    repeating-linear-gradient( 12deg, rgba(255,255,255,0.07) 0 1px, transparent 1px 40px);
  background-size: 150% 100%, 130% 100%;
  background-blend-mode: normal;
  mix-blend-mode: screen;
  opacity: 0.35;
  filter: blur(4px);
  animation: lines 24s linear infinite;
  pointer-events: none;
  backface-visibility: hidden;
  transform: translateZ(0);
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(38px) saturate(115%);
  }
  25% {
    transform: translate3d(-4%, -2%, 0) scale(1.05);
  }
  50% {
    transform: translate3d(3%, 2%, 0) scale(1.02);
    filter: blur(42px) saturate(125%);
  }
  75% {
    transform: translate3d(-2%, 3%, 0) scale(1.06);
  }
  100% {
    transform: translate3d(5%, -3%, 0) scale(1.03);
    filter: blur(40px) saturate(120%);
  }
}

/* Neon-like flicker with layered colored glows */
@keyframes neon-flicker {
  0% {
    text-shadow:
      0 0 6px rgba(255,255,255,0.35),
      0 0 14px rgba(255,255,255,0.2),
      0 0 26px rgba(0, 200, 255, 0.25),
      0 0 42px rgba(120, 0, 255, 0.18);
    opacity: 0.96;
  }
  7% { opacity: 0.88; }
  9% {
    text-shadow:
      0 0 2px rgba(255,255,255,0.15),
      0 0 6px rgba(255,255,255,0.12),
      0 0 14px rgba(0, 200, 255, 0.12),
      0 0 18px rgba(120, 0, 255, 0.10);
    opacity: 0.75;
  }
  10% { opacity: 0.95; }
  13% { opacity: 0.82; }
  14% {
    text-shadow:
      0 0 10px rgba(255,255,255,0.45),
      0 0 20px rgba(255,255,255,0.30),
      0 0 36px rgba(0, 200, 255, 0.35),
      0 0 60px rgba(120, 0, 255, 0.28);
  }
  22% { opacity: 0.90; }
  27% { opacity: 0.98; }
  28% {
    text-shadow:
      0 0 4px rgba(255,255,255,0.22),
      0 0 10px rgba(255,255,255,0.18),
      0 0 22px rgba(0, 200, 255, 0.20),
      0 0 36px rgba(120, 0, 255, 0.16);
  }
  33% { opacity: 0.94; }
  45% { opacity: 0.99; }
  50% {
    text-shadow:
      0 0 8px rgba(255,255,255,0.40),
      0 0 18px rgba(255,255,255,0.28),
      0 0 34px rgba(0, 200, 255, 0.32),
      0 0 58px rgba(120, 0, 255, 0.26);
  }
  62% { opacity: 0.90; }
  67% { opacity: 0.96; }
  72% {
    text-shadow:
      0 0 3px rgba(255,255,255,0.18),
      0 0 7px rgba(255,255,255,0.14),
      0 0 16px rgba(0, 200, 255, 0.16),
      0 0 28px rgba(120, 0, 255, 0.12);
  }
  82% { opacity: 0.93; }
  90% { opacity: 0.99; }
  100% {
    text-shadow:
      0 0 6px rgba(255,255,255,0.35),
      0 0 14px rgba(255,255,255,0.2),
      0 0 26px rgba(0, 200, 255, 0.25),
      0 0 42px rgba(120, 0, 255, 0.18);
    opacity: 0.97;
  }
}

@keyframes lines {
  0% {
    background-position: 0% 0%, 0% 0%;
  }
  50% {
    background-position: 50% 0%, -35% 0%;
  }
  100% {
    background-position: 120% 0%, -80% 0%;
  }
}

/* Gentle grain for depth */
.canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncA type='table' tableValues='0 0 0 0 0 0 0.05 0.1 0.12 0.14 0.16 0.18 0.18 0.18 0.19 0.2 0.2 0.2 0.2 0.2'/></feComponentTransfer></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.12;
  mix-blend-mode: overlay;
  pointer-events: none;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Decorative animated wave lines (no JS) */
.waves {
  position: fixed;
  inset: 0;
  z-index: 0; /* placed after .canvas in DOM so it renders above */
  pointer-events: none;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
  /* Create an isolated stacking context for blending to avoid flicker */
  isolation: isolate;
  mix-blend-mode: screen;
  contain: paint;
}

.waves-svg {
  transform: translateY(15%);
  width: 100%;
  height: 100%;
  opacity: 0.75;
  /* blend handled on parent to reduce per-element blending artifacts */
  /* transform: rotateZ(25deg); */
  backface-visibility: hidden;
  will-change: transform;
  contain: paint;
  shape-rendering: geometricPrecision;
}

.waves-svg path {
  fill: none;
  stroke-width: 14.25;
  vector-effect: non-scaling-stroke;
  transform-origin: 50% 50%;
  animation: swayLine 4s ease-in-out infinite alternate;
  backface-visibility: hidden;
  will-change: transform;
}

.wave-pack {
  animation: sway 8s ease-in-out infinite alternate;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  will-change: transform;
}

@keyframes sway {
  0% {
    transform: translate3d(-3%, 0, 0) skewX(-2deg) scaleX(1.01);
  }
  50% {
    transform: translate3d(1.5%, 0.4%, 0) skewX(1deg) scaleX(1.015);
  }
  100% {
    transform: translate3d(3%, -0.4%, 0) skewX(2deg) scaleX(1.02);
  }
}

/* Subtle per-line phase to desync the motion */
.wave-pack path:nth-child(1)  { animation-delay: 0s; opacity: 0.1; }
.wave-pack path:nth-child(2)  { animation-delay: 0.08s; opacity: 0.2; }
.wave-pack path:nth-child(3)  { animation-delay: 0.16s; opacity: 0.3; }
.wave-pack path:nth-child(4)  { animation-delay: 0.24s; opacity: 0.4; }
.wave-pack path:nth-child(5)  { animation-delay: 0.32s; opacity: 0.5; }
.wave-pack path:nth-child(6)  { animation-delay: 0.40s; opacity: 0.6; }
.wave-pack path:nth-child(7)  { animation-delay: 0.48s; opacity: 0.7; }
.wave-pack path:nth-child(8)  { animation-delay: 0.56s; opacity: 0.8; }
.wave-pack path:nth-child(9)  { animation-delay: 0.64s; opacity: 0.9; }
.wave-pack path:nth-child(10) { animation-delay: 0.72s; opacity: 0.7; }
.wave-pack path:nth-child(11) { animation-delay: 0.80s; opacity: 0.5; }
.wave-pack path:nth-child(12) { animation-delay: 0.88s; opacity: 0.3; }
.wave-pack path:nth-child(13) { animation-delay: 0.96s; opacity: 0.1; }

/* Slightly different timing for odd/even for extra organic feel */
/*
.wave-pack path:nth-child(odd)  { animation-duration: 7.6s; }
.wave-pack path:nth-child(even) { animation-duration: 8.4s; }
*/

@keyframes swayLine {
  0%   { transform: translateY(0) skewX(0deg); }
  50%  { transform: translateY(5px) skewX(0.5deg); }
  100% { transform: translateY(0) skewX(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .canvas { animation: none; }
  .canvas::before { animation: none; }
  .brand { animation: none; }
  .wave-pack { animation: none; }
}

