:root {
  --bg-deep: #050208;
  --bg-mid: #0c0614;
  --ink: #f2eaf8;
  --muted: #b5a8c7;
  --accent: #e85aa8;
  --accent-soft: #f0a0d0;
  --accent-glow: rgba(180, 60, 160, 0.4);
  --line: rgba(242, 234, 248, 0.12);
  --font-body: "Manrope", system-ui, sans-serif;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-deep);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Atmosphere */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.sky__gradient {
  position: absolute;
  inset: -8%;
  background:
    radial-gradient(ellipse 85% 50% at 50% 110%, rgba(232, 90, 168, 0.28), transparent 58%),
    radial-gradient(ellipse 55% 45% at 15% 20%, rgba(110, 40, 180, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 30%, rgba(160, 50, 200, 0.16), transparent 50%),
    linear-gradient(180deg, #020105 0%, #0a0614 38%, #160820 68%, #1a0818 100%);
  animation: breathe 36s ease-in-out infinite;
}

.sky__stars {
  position: absolute;
  inset: 0;
}

.sky__stars--a {
  opacity: 0.55;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent),
    radial-gradient(1px 1px at 28% 32%, #e8d0ff, transparent),
    radial-gradient(1.5px 1.5px at 61% 14%, #fff, transparent),
    radial-gradient(1px 1px at 78% 28%, #f5c8e8, transparent),
    radial-gradient(1px 1px at 88% 8%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 42% 8%, #eef, transparent);
  animation: twinkle-a 7s ease-in-out infinite, drift 52s linear infinite;
}

.sky__stars--b {
  opacity: 0.4;
  background-image:
    radial-gradient(1px 1px at 6% 48%, #d8c0ff, transparent),
    radial-gradient(1.5px 1.5px at 95% 42%, #fff, transparent),
    radial-gradient(1px 1px at 52% 60%, #f0d0ff, transparent),
    radial-gradient(1px 1px at 33% 72%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 70% 55%, #e8c0f0, transparent),
    radial-gradient(1px 1px at 18% 8%, #fff, transparent);
  animation: twinkle-b 9s ease-in-out infinite, drift 64s linear infinite reverse;
}

.sky__twinkles {
  position: absolute;
  inset: 0;
}

.sky__twinkle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 2px;
  height: 2px;
  margin: -1px 0 0 -1px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 3px 1px rgba(255, 220, 255, 0.45);
  opacity: 0.2;
  transform: scale(1);
  transition: none;
}

.sky__twinkle.is-flash {
  animation: star-flash 0.45s ease-out;
}

.sky__twinkle--bright {
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  box-shadow:
    0 0 4px 1px rgba(255, 230, 255, 0.7),
    0 0 10px 2px rgba(232, 90, 168, 0.25);
}

.sky__twinkle--bright::before,
.sky__twinkle--bright::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 1px;
  opacity: 0;
}

.sky__twinkle--bright.is-flash::before,
.sky__twinkle--bright.is-flash::after {
  animation: star-spark-flash 0.45s ease-out;
}

.sky__twinkle--bright::before {
  width: 10px;
  height: 1px;
  transform: translate(-50%, -50%);
}

.sky__twinkle--bright::after {
  width: 1px;
  height: 10px;
  transform: translate(-50%, -50%);
}

.sky__horizon {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -12%;
  height: 42%;
  background: radial-gradient(ellipse 70% 100% at 50% 100%, var(--accent-glow), transparent 70%);
  filter: blur(32px);
  animation: glow-drift 28s ease-in-out infinite;
}

.sky__meteor {
  position: absolute;
  top: 12%;
  left: -10%;
  width: 120px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 230, 255, 0.15) 30%,
    rgba(255, 255, 255, 0.95) 72%,
    #f0a0d0 100%
  );
  box-shadow:
    0 0 6px 1px rgba(255, 200, 255, 0.55),
    0 0 14px 2px rgba(232, 90, 168, 0.35);
  opacity: 0;
  transform: rotate(-28deg) translate3d(0, 0, 0);
  will-change: transform, opacity;
}

.sky__meteor.is-shooting {
  animation: meteor-shoot 1.35s ease-out forwards;
}

@keyframes drift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-36px);
  }
}

@keyframes twinkle-a {
  0%,
  100% {
    opacity: 0.35;
  }
  40% {
    opacity: 0.7;
  }
  70% {
    opacity: 0.45;
  }
}

@keyframes twinkle-b {
  0%,
  100% {
    opacity: 0.25;
  }
  35% {
    opacity: 0.55;
  }
  65% {
    opacity: 0.35;
  }
}

@keyframes star-flash {
  0% {
    opacity: 0.2;
    transform: scale(1);
  }
  40% {
    opacity: 0.75;
    transform: scale(1.35);
  }
  100% {
    opacity: 0.2;
    transform: scale(1);
  }
}

@keyframes star-spark-flash {
  0%,
  100% {
    opacity: 0;
  }
  40% {
    opacity: 0.45;
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.92;
  }
}

@keyframes glow-drift {
  0%,
  100% {
    transform: translateX(-4%) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translateX(5%) scale(1.08);
    opacity: 1;
  }
}

@keyframes blink {
  0%,
  84%,
  100% {
    transform: scaleY(0);
    opacity: 0;
  }
  87% {
    transform: scaleY(1);
    opacity: 1;
  }
  90% {
    transform: scaleY(1);
    opacity: 1;
  }
  93.5% {
    transform: scaleY(0);
    opacity: 0;
  }
}

@keyframes meteor-shoot {
  0% {
    opacity: 0;
    transform: rotate(var(--meteor-rot, -28deg)) translate3d(0, 0, 0) scaleX(0.35);
  }
  8% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(var(--meteor-rot, -28deg)) translate3d(115vw, 55vh, 0) scaleX(1);
  }
}

/* Header */
.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  min-height: 1rem;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* Hero — brand first, unified centered mark (locked splash stage) */
.hero {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: clamp(2rem, 8vh, 4rem) 1.5rem clamp(2rem, 6vh, 3rem);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero__mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 720px);
  text-align: center;
}

/*
 * Splash stage lock: lids + logo share one fixed-aspect box (1000×400).
 * Percentages map to source art, not intrinsic image layout quirks.
 */
.hero__logo-wrap {
  --stage-w: 1000;
  --stage-h: 400;
  --lid-w: 5.9%;
  --lid-h: 7.6%;
  --lid-top: 26.85%;
  --lid-l-left: 12.1%;
  --lid-r-left: 21.2%;
  --lid-l-rot: 39deg;
  --lid-r-rot: -39deg;

  position: relative;
  width: 100%;
  aspect-ratio: var(--stage-w) / var(--stage-h);
  line-height: 0;
  isolation: isolate;
  overflow: visible;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.hero__logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: fill;
  object-position: center;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.hero__lid {
  position: absolute;
  width: var(--lid-w);
  height: var(--lid-h);
  top: var(--lid-top);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  pointer-events: none;
  transform-origin: 50% 50%;
  will-change: transform;
}

.hero__lid-inner {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleY(0);
  transform-origin: 50% 0%;
  opacity: 0;
  animation: blink 16s ease-in-out infinite;
  will-change: transform, opacity;
}

.hero__lid img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

/* Match measured top-edge tilt of each eye (source PNG space) */
.hero__lid--l {
  left: var(--lid-l-left);
  transform: rotate(var(--lid-l-rot));
}

.hero__lid--r {
  left: var(--lid-r-left);
  transform: rotate(var(--lid-r-rot));
}

.hero__lid--r .hero__lid-inner {
  animation-delay: 0.05s;
}

.hero__tagline {
  margin: 1.35rem 0 0;
  font-family: var(--font-body);
  font-weight: 200;
  font-size: clamp(1.5rem, 3.2vw, 1.875rem);
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: rgba(242, 234, 248, 0.88);
  max-width: 100%;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1.5rem;
  margin-top: auto;
  flex-shrink: 0;
  background: #000;
  position: relative;
  z-index: 1;
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.25rem;
}

.site-footer__brand {
  display: inline-block;
  margin: 0;
  line-height: 0;
}

.site-footer__brand img {
  width: min(110px, 32vw);
  height: auto;
}

.site-footer__copy {
  margin: 0;
  font-size: 0.7rem;
  color: var(--muted);
}

/* Reveal motion */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .sky__stars,
  .sky__twinkle,
  .sky__twinkle.is-flash,
  .sky__twinkle--bright::before,
  .sky__twinkle--bright::after,
  .sky__horizon,
  .sky__gradient,
  .hero__lid-inner {
    animation: none;
  }

  .sky__meteor {
    display: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
