/* Colors and type come from branding/README.md. */
@font-face {
  font-family: "Sora";
  src: url("/assets/sora.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ninja-red: #E11D2E;
  --shadow: #0B0B0B;
  --steel: #2E2E2E;
  --fog: #E5E5E5;
  --muted: #A3A3A3;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 50% at 50% 20%, #1A1A1A 0%, transparent 70%),
    var(--shadow);
  color: var(--fog);
  font-family: "Sora", system-ui, sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  line-height: 1.6;
}

.page {
  flex: 1;
  width: 100%;
  padding: 2rem 1rem 3rem;
  text-align: center;
  /* The brush stroke reaches past the screen's edges on phones. */
  overflow-x: hidden;
  overflow-x: clip;
}

.page--short {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* The ninja leaps out of the brush stroke, as in the logo. */
.hero {
  position: relative;
  width: min(100%, 35rem);
  margin: 0 auto;
}

.hero--small {
  width: min(70%, 22rem);
}

.hero img {
  display: block;
  height: auto;
}

.swoosh {
  position: absolute;
  left: -18%;
  bottom: 4%;
  width: 136%;
  max-width: none;
  opacity: 0.9;
}

.ninja {
  position: relative;
  width: 100%;
  animation: arrive 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateX(-2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ninja {
    animation: none;
  }
}

.wordmark {
  margin: 1rem 0 0;
  font-size: clamp(2.5rem, 11vw, 4.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #FFFFFF;
  /* Squash the letters to 80% of their height. */
  display: inline-block;
  transform: scaleY(0.8);
  transform-origin: center;
}

.wordmark span {
  color: var(--ninja-red);
}

.wordmark--small {
  font-size: clamp(2rem, 8vw, 3.25rem);
}

.tagline {
  margin: 0.9rem 0 0;
  font-size: clamp(0.8rem, 3vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--muted);
  /* Letter spacing trails the last letter, so pull it back to stay centered. */
  margin-right: -0.4em;
}

.tagline span {
  margin: 0 0.5em;
}

.signup {
  max-width: 32rem;
  margin: 3rem auto 0;
}

.signup h2 {
  margin: 0;
  font-size: clamp(1.25rem, 4.5vw, 1.6rem);
  font-weight: 600;
  line-height: 1.3;
  color: #FFFFFF;
  text-wrap: balance;
}

.signup p {
  margin: 0.75rem 0 0;
  text-wrap: pretty;
}

.form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.form input,
.form button {
  font: inherit;
  font-size: 1rem;
  min-height: 3.25rem;
  border-radius: 0.5rem;
}

.form input {
  flex: 1;
  min-width: 0;
  padding: 0 1rem;
  border: 1px solid #4A4A4A;
  background: var(--steel);
  color: #FFFFFF;
  font-weight: 400;
}

.form input::placeholder {
  color: #8A8A8A;
}

.form button {
  padding: 0 1.4rem;
  border: 0;
  background: var(--ninja-red);
  color: #FFFFFF;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms, transform 150ms;
}

.form button:hover {
  background: #C8101F;
}

.form button:active {
  transform: translateY(1px);
}

.form input:focus-visible,
.form button:focus-visible,
.back:focus-visible {
  outline: 2px solid var(--fog);
  outline-offset: 2px;
}

.form input:focus-visible {
  border-color: var(--ninja-red);
}

@media (max-width: 30rem) {
  .form {
    flex-direction: column;
  }
}

.fine-print {
  font-size: 0.8rem;
  color: var(--muted);
}

.back {
  color: var(--fog);
  font-weight: 600;
  text-decoration-color: var(--ninja-red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.back:hover {
  color: #FFFFFF;
}

.footer {
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: #8A8A8A;
}

.footer p {
  margin: 0;
}

.visually-hidden,
.trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The trap stays off screen even for screen readers, unlike the label above. */
.trap {
  left: -9999px;
}
