:root {
  --bg: #f7f5f2;
  --ink: #15131a;
  --muted: #6b6672;
  --accent-1: #ff6b4a;
  --accent-2: #ff3d7f;
  --accent-3: #7b5cff;
  --glow-opacity: 0.35;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b10;
    --ink: #f4f1ec;
    --muted: #9a94a3;
    --glow-opacity: 0.45;
  }
}

* { box-sizing: border-box; margin: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

main {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

h1 {
  max-width: 14ch;
  font-size: clamp(2.4rem, 9vw, 6.5rem);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.line { display: block; }

/* Each word rises out of a blur, one after another. */
.w {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translateY(0.45em);
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.1, 1) forwards;
}
.line:first-child .w:nth-child(1) { animation-delay: 0.15s; }
.line:first-child .w:nth-child(2) { animation-delay: 0.3s; }
.line:first-child .w:nth-child(3) { animation-delay: 0.45s; }
.line:first-child .w:nth-child(4) { animation-delay: 0.6s; }
.line:first-child .w:nth-child(5) { animation-delay: 0.75s; }
.line:first-child .w:nth-child(6) { animation-delay: 0.9s; color: var(--muted); }

@keyframes rise {
  to { opacity: 1; filter: blur(0); transform: none; }
}

/* "better." lands last, then keeps a slow shimmer and an underline that draws in. */
.better {
  margin-top: 0.12em;
  font-size: 1.25em;
}
.better .w {
  position: relative;
  padding-bottom: 0.08em;
  background: linear-gradient(100deg, var(--accent-1), var(--accent-2) 35%, var(--accent-3) 65%, var(--accent-1));
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transform: translateY(0.45em) scale(0.92);
  animation:
    rise 1.1s cubic-bezier(0.2, 0.7, 0.1, 1) 1.5s forwards,
    shimmer 6s linear 2.6s infinite;
}
.better .w::after {
  content: "";
  position: absolute;
  left: 0.02em;
  right: 0.3em;
  bottom: 0;
  height: 0.07em;
  border-radius: 1em;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-3));
  transform: scaleX(0);
  transform-origin: left;
  animation: draw 0.9s cubic-bezier(0.6, 0, 0.2, 1) 2.4s forwards;
}

@keyframes shimmer {
  to { background-position: -250% 0; }
}
@keyframes draw {
  to { transform: scaleX(1); }
}

/* Two soft blobs drifting behind the text. */
.glow {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  animation: fade 2s ease 1.2s forwards;
}
.glow span {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: var(--glow-opacity);
}
.glow span:first-child {
  background: radial-gradient(circle, var(--accent-1), transparent 65%);
  top: -20vmax;
  left: -15vmax;
  animation: drift-a 18s ease-in-out infinite alternate;
}
.glow span:last-child {
  background: radial-gradient(circle, var(--accent-3), transparent 65%);
  bottom: -25vmax;
  right: -20vmax;
  animation: drift-b 22s ease-in-out infinite alternate;
}
@keyframes fade { to { opacity: 1; } }
@keyframes drift-a { to { transform: translate(18vmax, 12vmax) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-16vmax, -10vmax) scale(0.9); } }

@media (prefers-reduced-motion: reduce) {
  .w, .better .w, .glow { animation: none; opacity: 1; filter: none; transform: none; }
  .better .w::after { animation: none; transform: none; }
  .glow span { animation: none; }
}
