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

:root {
  --white: #f5f5f7;
  --near-white: #fbfbfd;
  --light-gray: #86868b;
  --dark: #1d1d1f;
  --near-black: #000;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--near-white);
  color: var(--dark);
  overflow-x: hidden;
}

.content {
  width: 100%;
}

section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5vw;
  position: relative;
}

.hero {
  flex-direction: column;
  text-align: center;
  background: linear-gradient(180deg, var(--near-white) 0%, var(--white) 100%);

  h1 {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--near-black);
    margin-bottom: 0.5em;
    line-height: 1.05;
    
    animation: scroll-fade linear both;
    animation-timeline: scroll();
    animation-range: 0vh 50vh;
  }
}

@keyframes scroll-fade {
  to {
    opacity: 0;
    scale: 0.9;
    filter: blur(10px);
  }
}

.tagline {
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--light-gray);
  letter-spacing: -0.01em;
  
  animation: scroll-fade-tagline linear both;
  animation-timeline: scroll();
  animation-range: 0vh 40vh;
}

@keyframes scroll-fade-tagline {
  to {
    opacity: 0;
    translate: 0 -30px;
  }
}

.scroll-section {
  background: var(--white);

  &:nth-child(even) {
    background: var(--near-white);
  }
}

.reveal-text {
  text-align: center;
  
  animation: scroll-reveal linear both;
  animation-timeline: view();
  animation-range: entry 0% cover 40%;

  h2 {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--near-black);
    margin-bottom: 0.4em;
    line-height: 1.1;
  }

  p {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: var(--light-gray);
    letter-spacing: -0.01em;
    max-width: 40ch;
    margin: 0 auto;
  }
}

@keyframes scroll-reveal {
  from {
    opacity: 0;
    scale: 0.8;
    filter: blur(20px);
  }
  to {
    opacity: 1;
    scale: 1;
    filter: blur(0);
  }
}

@supports (animation-timeline: scroll()) {
  .hero h1,
  .tagline,
  .reveal-text {
    opacity: 1;
  }
}

@supports not (animation-timeline: scroll()) {
  .hero h1 {
    animation: fade-in 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  }
  
  .tagline {
    animation: fade-in 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s both;
  }
  
  .reveal-text {
    opacity: 0;
    animation: fade-in 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    animation-timeline: auto;

    &:nth-child(1) {
      animation-delay: 0.5s;
    }
  }
  
  @keyframes fade-in {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --near-white: #000;
    --white: #111;
    --near-black: #f5f5f7;
    --dark: #f5f5f7;
    --light-gray: #a1a1a6;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;

    &::before,
    &::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }
}
