:root {
  --bg-main: #f6f9ff;
  --ink-strong: #111329;
  --ink-soft: #2c3159;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink-strong);
  background: var(--bg-main);
}

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  padding: clamp(1.5rem, 2.8vw, 2.8rem);
}

.bg-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  will-change: transform;
}

.bg-gradient {
  z-index: -10;
  background:
    radial-gradient(circle at 18% 12%, rgba(206, 222, 255, 0.58), transparent 45%),
    radial-gradient(circle at 83% 18%, rgba(220, 214, 255, 0.5), transparent 44%),
    radial-gradient(circle at 50% 73%, rgba(213, 240, 255, 0.43), transparent 52%),
    linear-gradient(145deg, #f9fbff 0%, #f2f6ff 46%, #f8faff 100%);
}

.bg-shape {
  filter: blur(28px);
  opacity: 0.65;
}

.bg-shape::before {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.bg-shape--a::before {
  width: min(34vw, 33rem);
  aspect-ratio: 1;
  left: 10%;
  top: 8%;
  background: radial-gradient(circle at 30% 30%, rgba(188, 214, 255, 0.7), rgba(188, 214, 255, 0) 70%);
  animation: driftA 20s ease-in-out infinite alternate;
}

.bg-shape--b::before {
  width: min(30vw, 28rem);
  aspect-ratio: 1;
  right: 12%;
  top: 24%;
  background: radial-gradient(circle at 70% 35%, rgba(223, 198, 255, 0.6), rgba(223, 198, 255, 0) 70%);
  animation: driftB 24s ease-in-out infinite alternate;
}

.bg-shape--c::before {
  width: min(42vw, 40rem);
  aspect-ratio: 1;
  right: 18%;
  bottom: -12%;
  background: radial-gradient(circle at 50% 50%, rgba(186, 233, 255, 0.56), rgba(186, 233, 255, 0) 72%);
  animation: driftC 28s ease-in-out infinite alternate;
}

.bg-wave {
  z-index: -6;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.28) 0%,
    rgba(218, 230, 255, 0.4) 42%,
    rgba(240, 233, 255, 0.34) 78%,
    rgba(255, 255, 255, 0.22) 100%
  );
  mix-blend-mode: soft-light;
  opacity: 0.55;
  filter: blur(14px);
  animation: slowWave 26s ease-in-out infinite alternate;
}

.hero-text {
  z-index: 5;
  letter-spacing: 0.08em;
}

.hero-title {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  justify-self: start;
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 7.1rem);
  font-weight: 700;
  line-height: 0.9;
}

.hero-year {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  font-size: clamp(2rem, 6vw, 6.2rem);
  font-weight: 650;
  color: rgba(24, 29, 60, 0.9);
}

.centerpiece {
  grid-column: 1 / span 2;
  grid-row: 2;
  display: grid;
  place-items: center;
  z-index: 4;
  perspective: 900px;
}

/* JS mouse-follow transform target. No keyframe transform here to avoid conflicts. */
.sphere-scene {
  position: relative;
  width: min(48vw, 31rem);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Idle animation lives on child element only. */
.sphere-float {
  width: 100%;
  height: 100%;
  animation: idleFloat 8s ease-in-out infinite;
}

.sphere-core {
  width: 100%;
  height: 100%;
  animation: breathe 6.5s ease-in-out infinite;
  transform-origin: center;
}

.sphere-image {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 24px 30px rgba(108, 126, 186, 0.24));
  user-select: none;
  pointer-events: none;
}

.sphere-scene::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -8%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(120, 138, 197, 0.26), rgba(120, 138, 197, 0));
  filter: blur(18px);
  z-index: -1;
}

.meta-row {
  grid-column: 1 / span 2;
  grid-row: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 1rem;
  z-index: 6;
}

.meta {
  font-size: clamp(0.65rem, 1.1vw, 0.9rem);
  font-weight: 520;
  color: var(--ink-soft);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.meta-center {
  justify-self: center;
}

.meta-right {
  justify-self: end;
}

@keyframes idleFloat {
  0% {
    transform: translate3d(0, -1%, 0);
  }
  50% {
    transform: translate3d(0, 1.4%, 0);
  }
  100% {
    transform: translate3d(0, -1%, 0);
  }
}

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

@keyframes slowWave {
  from {
    transform: translate3d(0, 16%, 0) scale(1.02);
  }
  to {
    transform: translate3d(0, 10%, 0) scale(1.08);
  }
}

@keyframes driftA {
  from {
    transform: translate3d(-2%, -2%, 0);
  }
  to {
    transform: translate3d(4%, 2%, 0);
  }
}

@keyframes driftB {
  from {
    transform: translate3d(2%, -2%, 0);
  }
  to {
    transform: translate3d(-3%, 3%, 0);
  }
}

@keyframes driftC {
  from {
    transform: translate3d(0%, 1%, 0);
  }
  to {
    transform: translate3d(-3%, -2%, 0);
  }
}

@media (max-width: 900px) {
  .hero {
    padding: 1.2rem;
  }

  .hero-title,
  .hero-year {
    font-size: clamp(1.75rem, 14vw, 3.7rem);
  }

  .sphere-scene {
    width: min(72vw, 24rem);
  }

  .meta {
    letter-spacing: 0.13em;
  }
}

@media (max-width: 640px) {
  .meta-row {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 0.35rem;
  }

  .meta-left,
  .meta-right,
  .meta-center {
    justify-self: center;
  }
}
