/* The Gainline — marketing site.
   Shares the app's typeface (Geist) and emerald/stone palette so the site and
   the app read as one product. */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --pitch: #113528;
  --pitch-line: #1d4a38;
  --chalk: #f4f2ea;
  --chalk-dim: #cfd8cf;
  --mint: #8fd6b1;

  --paper: #fafaf9;
  --card: #ffffff;
  --ink: #1c1917;
  --ink-soft: #57534e;
  --rule: #e0ddd8;
  --grass: #047857;
  --grass-deep: #065f46;
  --grass-wash: #ecf5f0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161412;
    --card: #1e1b18;
    --ink: #ece9e4;
    --ink-soft: #a8a29e;
    --rule: #2e2a26;
    --grass: #10a35f;
    --grass-deep: #0b7a47;
    --grass-wash: #1a2620;
  }
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Geist", system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--grass);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 40;
  background: var(--card);
  padding: 0.6rem 1rem;
  border-radius: 6px;
}

.eyebrow {
  font-family: "Geist Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 500;
}

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 3.6rem;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-size: 1.1rem;
  white-space: nowrap;
}

.wordmark__line {
  display: inline-block;
  width: 1.6rem;
  height: 0;
  border-top: 2px dashed var(--grass);
  transform: translateY(-0.28em);
}

.site-nav {
  display: none;
  gap: 1.4rem;
  margin-left: auto;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.site-nav a {
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--ink);
}

.site-header .btn {
  margin-left: auto;
}

@media (min-width: 720px) {
  .site-nav {
    display: flex;
  }
  .site-header .btn {
    margin-left: 0;
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.6rem 1.15rem;
  background: var(--grass);
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.btn:hover {
  background: var(--grass-deep);
}

.btn--chalk {
  background: var(--chalk);
  color: var(--pitch);
}
.btn--chalk:hover {
  background: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--chalk);
  border: 1px solid rgba(244, 242, 234, 0.45);
}
.btn--ghost:hover {
  background: rgba(244, 242, 234, 0.1);
}

/* ---------- hero ---------- */
.hero {
  background: var(--pitch);
  color: var(--chalk);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-top: 4rem;
  padding-bottom: 4.5rem;
}

@media (min-width: 860px) {
  .hero__inner {
    grid-template-columns: 11fr 9fr;
    gap: 3rem;
    padding-top: 5.5rem;
    padding-bottom: 6rem;
  }
}

.hero .eyebrow {
  color: var(--chalk-dim);
}

.hero h1 {
  margin: 0.9rem 0 0;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.04;
  font-weight: 820;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  color: var(--mint);
}

.hero__lede {
  margin: 1.4rem 0 0;
  max-width: 34rem;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--chalk-dim);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2.1rem;
}

.hero__diagram {
  width: 100%;
  height: auto;
  display: block;
}

/* The finished drawing is the default state, so the move still reads if the
   animation never runs — a reduced-motion visitor, a link-preview crawler, a
   headless screenshot. Hiding happens only where motion is welcome.

   Staged so it reads as a move being talked through: players appear, the ball
   is passed, then the run crosses the gainline. Delays live in CSS rather than
   style attributes so the Content-Security-Policy needs no 'unsafe-inline'. */
@media (prefers-reduced-motion: no-preference) {
  .hero__diagram [data-draw] {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 1.1s cubic-bezier(0.4, 0, 0.3, 1) forwards;
  }
  .hero__diagram [data-fade] {
    opacity: 0;
    animation: fade 0.6s ease forwards;
  }
  .hero__diagram [data-reveal] {
    clip-path: inset(0 100% 0 0);
    animation: reveal 1s cubic-bezier(0.4, 0, 0.3, 1) forwards;
  }

  .hero__diagram .anim-gainline { animation-delay: 0.15s; }
  .hero__diagram .anim-att-1 { animation-delay: 0.25s; }
  .hero__diagram .anim-att-2 { animation-delay: 0.37s; }
  .hero__diagram .anim-att-3 { animation-delay: 0.49s; }
  .hero__diagram .anim-def-1 { animation-delay: 0.5s; }
  .hero__diagram .anim-def-2 { animation-delay: 0.62s; }
  .hero__diagram .anim-pass { animation-delay: 0.85s; animation-duration: 0.5s; }
  .hero__diagram .anim-label { animation-delay: 0.9s; }
  .hero__diagram .anim-run { animation-delay: 1.35s; animation-duration: 0.9s; }
  .hero__diagram .anim-support { animation-delay: 1.7s; animation-duration: 0.8s; }
  .hero__diagram .anim-tip { animation-delay: 2.1s; }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes fade {
  to {
    opacity: 1;
  }
}
@keyframes reveal {
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* ---------- sections ---------- */
.section {
  padding: 4.5rem 0;
}

.section__head {
  max-width: 40rem;
}
.section__head .eyebrow {
  color: var(--grass);
}
.section__head h2 {
  margin: 0.7rem 0 0;
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  font-weight: 760;
  letter-spacing: -0.028em;
  line-height: 1.12;
  text-wrap: balance;
}
.section__head p {
  margin: 1rem 0 0;
  color: var(--ink-soft);
}

/* ---------- features ---------- */
.features {
  display: grid;
  gap: 1.1rem;
  margin-top: 2.6rem;
}

@media (min-width: 720px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

.feature {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.feature .eyebrow {
  color: var(--grass);
}
.feature h3 {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.feature--wide {
  grid-column: 1 / -1;
}

@media (min-width: 720px) {
  .feature--wide {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2.2rem;
    align-items: center;
  }
  .feature__text {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tag {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  background: var(--grass-wash);
  color: var(--grass);
  border-radius: 999px;
}

.feature__sketch {
  background: var(--pitch);
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1rem;
  width: 100%;
  height: auto;
}

@media (min-width: 720px) {
  .feature__sketch {
    margin-top: 0;
  }
}

/* ---------- demo ---------- */
.demo__grid {
  display: grid;
  gap: 2.8rem;
  margin-top: 2.4rem;
  align-items: center;
}

@media (min-width: 860px) {
  .demo__grid {
    grid-template-columns: 2fr 3fr;
  }
}

.ticks {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.ticks li {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  color: var(--ink-soft);
  font-size: 0.97rem;
}
.ticks li strong {
  color: var(--ink);
  font-weight: 650;
}
.ticks li::before {
  content: "";
  flex: none;
  width: 1.05rem;
  height: 0;
  border-top: 2px dashed var(--grass);
  transform: translateY(-0.22em);
}

/* The phone shows the app itself, which is light-themed — fixed colours by
   design, so it looks the same in both site themes. */
.phone {
  width: min(100%, 360px);
  margin: 0 auto;
  background: #1c1917;
  border-radius: 38px;
  padding: 10px;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.45);
}

.phone__screen {
  background: #fafaf9;
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone__notch {
  display: block;
  width: 74px;
  height: 8px;
  border-radius: 999px;
  background: #e7e5e4;
  margin: 0.55rem auto 0.3rem;
}

.phone__bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.5rem 1rem 0.55rem;
  border-bottom: 1px solid #e7e5e4;
}
.phone__bar h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1c1917;
  letter-spacing: -0.01em;
}
.phone__bar .tag {
  background: #ecf5f0;
  color: #047857;
}

.drill {
  padding: 0.75rem 0.75rem 0;
}
.drill svg {
  display: block;
  width: 100%;
  border-radius: 12px;
}

.drill__panel {
  padding: 0.7rem 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.drill__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drill__phase {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #047857;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.drill__progress {
  display: flex;
  gap: 0.3rem;
}
.drill__progress span {
  width: 1.1rem;
  height: 3px;
  border-radius: 2px;
  background: #e7e5e4;
  transition: background 0.3s;
}
.drill__progress span.is-played {
  background: #047857;
}

.drill__description {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.45;
  color: #44403c;
  min-height: 2.4em;
}

@keyframes kick-flash {
  0% { opacity: 0; }
  12% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}
.drill-kick-flash {
  animation: kick-flash 1.5s forwards;
}

/* ---------- clubs ---------- */
.clubs {
  background: var(--pitch);
  color: var(--chalk);
}
.clubs .section__head .eyebrow {
  color: var(--mint);
}
.clubs .section__head p {
  color: var(--chalk-dim);
}

.clubs__grid {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.4rem;
}

@media (min-width: 820px) {
  .clubs__grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.clubs .ticks li {
  color: var(--chalk-dim);
}
.clubs .ticks li strong {
  color: var(--chalk);
}
.clubs .ticks li::before {
  border-top-color: var(--mint);
}

.clubs__card {
  border: 1px dashed rgba(244, 242, 234, 0.35);
  border-radius: 8px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}
.clubs__card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 720;
  letter-spacing: -0.02em;
}
.clubs__card p {
  margin: 0;
  color: var(--chalk-dim);
  font-size: 0.97rem;
}

/* ---------- contact ---------- */
.contact__grid {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.4rem;
}

@media (min-width: 820px) {
  .contact__grid {
    grid-template-columns: 2fr 3fr;
  }
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-row {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 560px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  font-size: 0.88rem;
  font-weight: 600;
}

input,
textarea {
  font: inherit;
  font-size: 0.97rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 0.65rem 0.8rem;
  width: 100%;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--grass);
  outline-offset: -1px;
}

textarea {
  resize: vertical;
  min-height: 7.5rem;
}

/* Bot trap: a field a person never sees, so anything filling it is not human. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.form__status {
  font-size: 0.9rem;
  color: var(--grass);
  margin: 0;
  min-height: 1.3em;
}
.form__status[data-state="error"] {
  color: #b91c1c;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.2rem 0 3rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.site-footer .wordmark {
  font-size: 1rem;
}

/* ---------- error page ---------- */
.notfound {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  align-items: flex-start;
}
.notfound h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 780;
  letter-spacing: -0.03em;
}
.notfound p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 32rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .drill-kick-flash {
    animation: none;
  }
}
