@font-face {
  font-family: "Hooppa Display";
  src: url("/assets/fonts/barlow-condensed-latin-700-italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --orange: #cc4d0a;
  --black: #16181d;
  --cream: #f5f3ef;
  --white: #ffffff;
  --cream-soft: rgba(245, 243, 239, 0.86);
  --gutter: clamp(1rem, 5vw, 4rem);
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--black); outline-offset: 3px; }
.foot :focus-visible { outline-color: var(--cream); }

/* The orange first screen, with the court drawn behind it. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter) clamp(2.5rem, 8vh, 5rem);
  background: var(--orange);
}

.court {
  position: absolute;
  z-index: -1;
  right: -18%;
  bottom: 0;
  width: 150%;
  height: auto;
  fill: none;
  stroke: var(--white);
  stroke-width: 1.5;
  stroke-opacity: 0.32;
  vector-effect: non-scaling-stroke;
}
.court .line, .court .dash { vector-effect: non-scaling-stroke; }
/* The half of the free-throw circle inside the key is dashed (FIBA). */
.court .dash { stroke-dasharray: 9 8; }

@media (min-width: 900px) {
  .court { right: -10%; width: auto; height: 92%; max-width: 75%; }
}

/* The one moment: the court lines draw themselves once. */
@media (prefers-reduced-motion: no-preference) {
  .home .court .line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 1.6s cubic-bezier(0.3, 0.6, 0.2, 1) forwards;
  }
  .home .court .l2 { animation-delay: 0.35s; }
  .home .court .l3 { animation-delay: 0.7s; }
  .home .court .l4 { animation-delay: 0.9s; animation-duration: 1s; }
  .home .court .dash { opacity: 0; animation: appear 0.6s ease-out 1.4s forwards; }
}
@keyframes appear { to { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.top { padding: clamp(1.25rem, 4vh, 2rem) 0; }
.brand { display: inline-block; }
.brand img { display: block; width: auto; height: clamp(3.5rem, 16vw, 5.5rem); }

.hero-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 62rem;
  padding-top: clamp(1rem, 4vh, 3rem);
}

h1 {
  margin: 0 0 0.35em;
  font-family: "Hooppa Display", "Arial Narrow", sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(3.25rem, 13vw, 7.25rem);
  line-height: 0.88;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lead {
  margin: 0;
  max-width: 33rem;
  font-size: clamp(1.0625rem, 2.2vw, 1.1875rem);
  color: var(--cream-soft);
  text-wrap: pretty;
}

.back { margin: 1.5rem 0 0; font-weight: 600; }

/* The form */
.signup {
  display: grid;
  gap: 0.9rem;
  max-width: 26rem;
  margin-top: 2rem;
}
.field { display: grid; gap: 0.3rem; }
label { font-size: 0.9375rem; font-weight: 600; }

input {
  width: 100%;
  height: 3rem;
  padding: 0 0.875rem;
  border: 0;
  border-radius: 10px;
  background: var(--white);
  color: var(--black);
  font: inherit;
  font-size: 1rem;
}
input:focus-visible { outline-offset: 2px; }

button {
  height: 3.25rem;
  margin-top: 0.35rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 10px;
  background: var(--black);
  color: var(--white);
  font: inherit;
  font-weight: 650;
  font-size: 1.0625rem;
  cursor: pointer;
}
button:hover { background: #000; }
button:disabled { opacity: 0.6; cursor: progress; }
@media (min-width: 600px) { button { justify-self: start; } }

/* The result shows 12 px under the button, like in the app. */
.result { margin: -0.15rem 0 0; min-height: 0; }
.result:empty { display: none; }
.result.is-error {
  justify-self: start;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  background: var(--black);
  color: var(--white);
  font-size: 0.9375rem;
}
.hint { margin: 0; font-size: 0.875rem; color: var(--cream-soft); }

.done { margin-top: 2rem; max-width: 26rem; }
.done:focus { outline: none; }
.done h2 {
  margin: 0 0 0.25rem;
  font-family: "Hooppa Display", "Arial Narrow", sans-serif;
  font-style: italic;
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1;
}
.done p { margin: 0; color: var(--cream-soft); }

/* Hidden field for bots, off screen for people and screen readers. */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.foot {
  padding: 2rem var(--gutter) 2.5rem;
  background: var(--black);
  color: rgba(245, 243, 239, 0.7);
  font-size: 0.8125rem;
  line-height: 1.6;
}
.foot-inner { display: grid; gap: 1rem; max-width: 72rem; }
.foot p { margin: 0; max-width: 40rem; }
@media (min-width: 900px) {
  .foot-inner { grid-template-columns: minmax(0, 40rem) auto; justify-content: space-between; gap: 3rem; }
  .foot p:last-child { text-align: right; }
}
