@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-22px) rotate(6deg); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(60px, -40px, 0) scale(1.12); }
  66% { transform: translate3d(-50px, 30px, 0) scale(0.94); }
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
  100% { box-shadow: 0 0 0 14px rgba(74, 222, 128, 0); }
}
@keyframes bar {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(1); }
}
@keyframes draw {
  to { stroke-dashoffset: 0; }
}
@keyframes scrollHint {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: none; }
}
@keyframes blink {
  50% { opacity: 0; }
}
@keyframes shimmer {
  to { background-position: 200% center; }
}

:root {
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Instrument Serif", ui-serif, Georgia, serif;
  --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;

  --color-night: #07060b;
  --color-ink: #f6efe4;
  --color-amber: #ffb454;
  --color-coral: #ff5e7e;
  --color-violet: #7c5cff;
}

html {
  scroll-behavior: smooth;
  background: var(--color-night);
}

body {
  margin: 0;
  background: var(--color-night);
  color: var(--color-ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--color-amber);
  color: #000;
}

/* Film grain */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-night); }
::-webkit-scrollbar-thumb { background: #2a2733; border-radius: 8px; }

/* Text helpers */
.text-gradient {
  background: linear-gradient(100deg, var(--color-amber), var(--color-coral) 55%, var(--color-violet));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
.text-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(246, 239, 228, 0.55);
}
.text-outline-hover {
  transition: color 0.5s, -webkit-text-stroke-color 0.5s;
}

/* Masked word reveal */
.mask-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding: 0 0.06em 0.16em 0;
  margin-bottom: -0.16em;
}
.mask-inner {
  display: inline-block;
  transform: translateY(118%) rotate(5deg);
  transform-origin: left bottom;
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}
.mask-root.in .mask-inner {
  transform: none;
}

/* Generic reveal */
.reveal {
  opacity: 0;
  transform: translateY(46px);
  filter: blur(10px);
  transition:
    opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.1s cubic-bezier(0.16, 1, 0.3, 1),
    filter 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
  filter: none;
}
.reveal-scale {
  transform: scale(0.92) translateY(40px);
}

/* Glass */
.glass {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Draw-in svg strokes */
.draw {
  stroke-dasharray: 2600;
  stroke-dashoffset: 2600;
}
.ready .draw {
  animation: draw 3.2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.hero-fade {
  opacity: 0;
}
.ready .hero-fade {
  animation: fadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.no-cursor-touch {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .no-cursor-touch {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .mask-inner { opacity: 1; transform: none; filter: none; }
  .draw { stroke-dashoffset: 0; }
  .hero-fade { opacity: 1; }
}
