:root {
  --ink: #1a2430;
  --ink-soft: #4a5a6a;
  --mist: #f3f7f9;
  --ice: #dceaf1;
  --glacier: #9ec4d4;
  --deep: #0f1a24;
  --accent: #2f6f82;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Outfit", "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.45, 0, 0.15, 1);
}

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

html,
body {
  min-height: 100%;
}

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

/* Soft white veil lifts on load */
.veil {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #f7fafb;
  pointer-events: none;
  animation: veil-lift 1.6s var(--ease-soft) forwards;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, #ffffff 0%, transparent 55%),
    linear-gradient(165deg, #eef5f8 0%, #e4eef3 42%, #d7e6ee 100%);
  animation: sky-shift 24s ease-in-out infinite alternate;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform, opacity;
  animation: drift 18s ease-in-out infinite;
}

.glow-a {
  width: min(55vw, 480px);
  height: min(55vw, 480px);
  top: 8%;
  left: 12%;
  background: radial-gradient(circle, #c5e0eb 0%, transparent 70%);
}

.glow-b {
  width: min(50vw, 420px);
  height: min(50vw, 420px);
  right: 8%;
  bottom: 12%;
  background: radial-gradient(circle, #b7d4e0 0%, transparent 70%);
  animation-delay: -7s;
  animation-duration: 22s;
}

.glow-c {
  width: min(40vw, 320px);
  height: min(40vw, 320px);
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #e8f4f8 0%, transparent 70%);
  opacity: 0.4;
  animation: breathe 10s ease-in-out infinite;
}

.motes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.motes span {
  position: absolute;
  bottom: -8%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--glacier) 70%, white);
  opacity: 0;
  animation: mote-rise linear infinite;
}

.motes span:nth-child(1) {
  left: 12%;
  animation-duration: 16s;
  animation-delay: 0s;
}
.motes span:nth-child(2) {
  left: 28%;
  width: 2px;
  height: 2px;
  animation-duration: 20s;
  animation-delay: 3s;
}
.motes span:nth-child(3) {
  left: 41%;
  animation-duration: 18s;
  animation-delay: 7s;
}
.motes span:nth-child(4) {
  left: 55%;
  width: 2px;
  height: 2px;
  animation-duration: 22s;
  animation-delay: 1.5s;
}
.motes span:nth-child(5) {
  left: 67%;
  animation-duration: 17s;
  animation-delay: 5s;
}
.motes span:nth-child(6) {
  left: 78%;
  width: 2px;
  height: 2px;
  animation-duration: 21s;
  animation-delay: 9s;
}
.motes span:nth-child(7) {
  left: 88%;
  animation-duration: 19s;
  animation-delay: 4s;
}
.motes span:nth-child(8) {
  left: 18%;
  width: 2px;
  height: 2px;
  animation-duration: 23s;
  animation-delay: 11s;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  gap: 1.1rem;
}

.mark {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 5.25rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--deep);
  animation:
    reveal-blur 1.4s var(--ease-out) 0.35s both,
    mark-settle 8s ease-in-out 2s infinite;
}

.rule {
  width: 3.5rem;
  height: 1px;
  margin: 0.15rem 0 0.1rem;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--accent) 55%, transparent),
    transparent
  );
  transform: scaleX(0);
  transform-origin: center;
  animation: draw-rule 1.1s var(--ease-out) 0.85s both;
}

.headline {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  animation:
    rise 1.2s var(--ease-out) 1s both,
    tracking 1.8s var(--ease-out) 1s both;
}

.lede {
  max-width: 28rem;
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  font-weight: 300;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-top: 0.35rem;
  animation: rise 1.25s var(--ease-out) 1.2s both;
}

.foot {
  position: fixed;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.25rem 1.5rem 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--ink-soft) 75%, transparent);
  animation: fade 1.6s ease 1.5s both;
}

@keyframes veil-lift {
  0% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes reveal-blur {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(22px);
    letter-spacing: 0.08em;
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
    letter-spacing: -0.02em;
  }
}

@keyframes mark-settle {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.92;
  }
}

@keyframes draw-rule {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tracking {
  from {
    letter-spacing: 0.5em;
  }
  to {
    letter-spacing: 0.28em;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(3%, -4%) scale(1.06);
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.28;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.5;
    transform: translate(-50%, -52%) scale(1.12);
  }
}

@keyframes sky-shift {
  from {
    filter: hue-rotate(0deg) saturate(1);
  }
  to {
    filter: hue-rotate(8deg) saturate(1.05);
  }
}

@keyframes mote-rise {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0) scale(0.6);
  }
  12% {
    opacity: 0.45;
  }
  70% {
    opacity: 0.25;
  }
  100% {
    opacity: 0;
    transform: translateY(-110vh) translateX(18px) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .veil,
  .atmosphere,
  .glow,
  .glow-c,
  .motes span,
  .mark,
  .rule,
  .headline,
  .lede,
  .foot {
    animation: none !important;
  }

  .veil {
    display: none;
  }

  .rule {
    transform: none;
    opacity: 1;
  }

  .mark,
  .headline,
  .lede,
  .foot {
    opacity: 1;
    filter: none;
    transform: none;
  }
}
