:root {
  color-scheme: dark;
  font-family: "Trebuchet MS", "Avenir Next Rounded", "Arial Rounded MT Bold", sans-serif;
  background: #071a38;
  color: #fff9e9;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  min-height: 100dvh;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  overflow: hidden;
  background: #071a38;
}

.hero__picture,
.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__picture {
  z-index: -3;
  background-image: url("assets/threadtoons-hero.jpg");
  background-position: center center;
  background-size: cover;
  transform: scale(1.012);
  animation: settle 1.4s cubic-bezier(.2,.75,.25,1) both;
}

.hero__shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(3, 14, 35, .92) 0%, rgba(4, 18, 40, .68) 36%, rgba(4, 18, 40, .08) 66%),
    linear-gradient(0deg, rgba(3, 12, 29, .74) 0%, transparent 34%),
    linear-gradient(180deg, rgba(1, 9, 24, .28) 0%, transparent 28%);
}

.brand {
  position: absolute;
  top: clamp(1rem, 3.8vh, 2.75rem);
  left: clamp(1.25rem, 4vw, 4.75rem);
  animation: rise .75s .1s ease-out both;
}

.brand__logo {
  display: block;
  width: clamp(10.5rem, 20vw, 18rem);
  height: auto;
  filter: drop-shadow(0 .65rem 1rem rgba(0, 0, 0, .32));
}

.welcome {
  position: absolute;
  left: clamp(1.5rem, 5vw, 5.75rem);
  top: 52%;
  width: min(37rem, 43vw);
  transform: translateY(-36%);
  animation: rise .85s .22s ease-out both;
}

.welcome__eyebrow {
  display: inline-flex;
  margin: 0 0 .9rem;
  padding: .48rem .82rem;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  background: rgba(5, 23, 50, .55);
  font-size: clamp(.76rem, 1.2vw, .96rem);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

h1 {
  max-width: 9ch;
  margin: 0;
  color: #fff9e9;
  font-size: clamp(3rem, 6.1vw, 6.7rem);
  font-weight: 900;
  line-height: .88;
  letter-spacing: -.055em;
  text-wrap: balance;
  text-shadow: 0 .08em .18em rgba(0, 0, 0, .3);
}

.welcome__copy {
  max-width: 35rem;
  margin: 1.25rem 0 1.65rem;
  color: rgba(255, 249, 233, .9);
  font-size: clamp(1rem, 1.45vw, 1.28rem);
  font-weight: 600;
  line-height: 1.5;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
}

.youtube-button {
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  min-height: 3.65rem;
  padding: .7rem 1.35rem .7rem .88rem;
  border: 2px solid rgba(255, 255, 255, .82);
  border-radius: 999px;
  background: #ff253d;
  box-shadow: 0 .85rem 2rem rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .35);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.youtube-button__icon {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
}

.youtube-button__icon svg {
  width: 100%;
  height: 100%;
}

.youtube-button:hover {
  background: #e9162e;
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, .38), inset 0 1px rgba(255, 255, 255, .35);
  transform: translateY(-3px) rotate(-.5deg);
}

.youtube-button:focus-visible {
  outline: 4px solid #ffd22e;
  outline-offset: 5px;
}

.small-note {
  position: absolute;
  right: clamp(1rem, 3vw, 3rem);
  bottom: clamp(.75rem, 2vw, 1.6rem);
  margin: 0;
  color: rgba(255, 255, 255, .76);
  font-size: clamp(.74rem, 1vw, .9rem);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .7);
}

@keyframes settle {
  from { opacity: .72; transform: scale(1.055); }
  to { opacity: 1; transform: scale(1.012); }
}

@keyframes rise {
  from { opacity: 0; translate: 0 1.2rem; }
  to { opacity: 1; translate: 0 0; }
}

@media (max-width: 720px) {
  .hero__picture {
    background-position: 58% center;
  }

  .hero__shade {
    background:
      linear-gradient(180deg, rgba(3, 14, 35, .5) 0%, transparent 28%),
      linear-gradient(0deg, rgba(3, 12, 29, .96) 0%, rgba(3, 12, 29, .72) 43%, transparent 72%);
  }

  .brand {
    left: 50%;
    transform: translateX(-50%);
  }

  .brand__logo {
    width: clamp(9.5rem, 43vw, 12.5rem);
  }

  .welcome {
    top: auto;
    right: 1.25rem;
    bottom: clamp(2rem, 5vh, 3.25rem);
    left: 1.25rem;
    width: auto;
    transform: none;
    text-align: center;
  }

  .welcome__eyebrow {
    margin-bottom: .7rem;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.75rem, 13vw, 4.3rem);
    line-height: .91;
  }

  .welcome__copy {
    max-width: 31rem;
    margin: .9rem auto 1.2rem;
    font-size: clamp(.95rem, 3.8vw, 1.08rem);
  }

  .small-note {
    display: none;
  }
}

@media (max-height: 650px) {
  .brand {
    top: .5rem;
  }

  .brand__logo {
    width: clamp(8.2rem, 17vw, 11rem);
  }

  .welcome__eyebrow {
    display: none;
  }

  .welcome__copy {
    margin: .65rem 0 .9rem;
  }

  .youtube-button {
    min-height: 3.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
