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

/* ── Design tokens ── */
:root {
  --brand: #b5f486;
  --brand-dim: rgba(181, 244, 134, 0.12);
  --bg: rgb(10, 10, 9);
  --text-primary: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-tertiary: rgba(255, 255, 255, 0.35);
  --ease-draw: cubic-bezier(0.4, 0, 0.15, 1);
  --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);

  --draw-dur: 1s;

  /* Push-up starts halfway through drawing */
  --push-start: 1s;
  --push-dur: 3s;

  /* Text appears after push settles */
  --text-start: 1.5s;

  color-scheme: dark;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

/* ── Layout ── */
.hero {
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* The whole container pushes up */
.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: push-up var(--push-dur) var(--ease-out) var(--push-start) forwards;
}

@keyframes push-up {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-10vh);
  }
}

/* ── Logo ── */
.logo-block {
  position: relative;
  animation: logo-shrink var(--push-dur) var(--ease-out) var(--push-start)
    forwards;
}

@keyframes logo-shrink {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(0.7);
  }
}

.logo {
  width: 9rem;
}

/* ── SVG draw animation ── */
.logo-path {
  fill: transparent;
  stroke: var(--brand);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#left {
  stroke-dasharray: 560;
  stroke-dashoffset: 560;
  animation:
    draw var(--draw-dur) var(--ease-draw) 0s forwards,
    fill-in 0.6s ease-out 1.2s forwards;
}

#center {
  stroke-dasharray: 290;
  stroke-dashoffset: 290;
  animation:
    draw var(--draw-dur) var(--ease-draw) 1.2s forwards,
    fill-in 0.6s ease-out 2.4s forwards;
}

#right {
  stroke-dasharray: 430;
  stroke-dashoffset: 430;
  animation:
    draw var(--draw-dur) var(--ease-draw) 2.4s forwards,
    fill-in 0.6s ease-out 3.6s forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes fill-in {
  to {
    fill: var(--brand);
  }
}

/* ── Content ── */
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 34rem;
  gap: 0;
}

.content > * {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(15px);
  animation: rise 1.2s var(--ease-out) forwards;
}

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

.wordmark {
  animation-delay: var(--text-start);
}
.hero-content {
  animation-delay: calc(var(--text-start) + 0.15s);
}
.tagline {
  animation-delay: calc(var(--text-start) + 0.15s);
}
.details {
  animation-delay: calc(var(--text-start) + 0.3s);
}
.download-btn {
  animation-delay: calc(var(--text-start) + 0.5s);
}

/* ── Typography ── */
.wordmark {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--brand);
  margin-bottom: 1.5rem;
}

.tagline {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-secondary);
  text-align: center;
  text-wrap: balance;
  margin-bottom: 1rem;
}

.details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.25rem;
}

.description {
  font-size: 1.3rem;
  line-height: 1.25;
  color: var(--text-secondary);
  text-align: center;
}

.description.secondary {
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* ── Download button ── */
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem 0.625rem 0.875rem;
  background: white;
  color: #111;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0.625rem;
  transition:
    transform 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out),
    background-color 150ms ease;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.download-btn:hover {
  background: rgba(255, 255, 255, 0.93);
  transform: translateY(-1px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.download-btn:active {
  transform: scale(0.97) translateY(0);
  transition-duration: 80ms;
}

.download-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.download-btn img {
  width: 1.125rem;
  height: 1.125rem;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .wordmark {
    font-size: 2.2rem;
  }

  .tagline {
    font-size: 1.35rem;
  }

  .description {
    font-size: 1.05rem;
    line-height: 1.4;
    text-wrap: balance;
  }

  .desktop-br {
    display: none;
  }
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .hero-container {
    transform: translateY(-10vh);
  }

  .logo-block {
    transform: scale(0.7);
  }

  .logo-path {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    fill: var(--brand);
  }

  .content > * {
    opacity: 1;
    transform: none;
  }
}
