/* ATHLENOMICS - the public page.
   Same palette as the admin panel, no framework, no build step. */

@font-face {
  font-family: "monogram";
  src: url("/fonts/monogram.ttf") format("truetype");
  font-weight: 400;
  font-display: block;
}

:root {
  --paper: #eeeae2;
  --ink: #2a2c33;
  --ink-dim: #5e6070;
  --signal: #a85a44;
  --deep-panel: #2e4a52;
  --accent: #f8d386;
  --good: #aadf8a;
  --bad: #ff8a80;
  --rule: rgba(42, 44, 51, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

/* monogram is a 1px-grid bitmap face: no antialiasing, integer sizes only. */
.mono {
  font-family: "monogram", ui-monospace, monospace;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  text-rendering: geometricPrecision;
  letter-spacing: 0.04em;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  margin: 24px 0 0;
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
  min-height: min(76vh, 620px);
  display: flex;
  align-items: flex-end;
  background: var(--deep-panel);
}

.hero-clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* The clip is decoration; the words must read whether or not it arrives. */
}

/* Ink on top of moving footage needs a floor under it, not a guess. */
.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(42, 44, 51, 0.92) 0%,
    rgba(42, 44, 51, 0.72) 38%,
    rgba(42, 44, 51, 0.18) 100%
  );
}

.hero-text {
  position: relative;
  padding: 32px 28px;
  color: var(--paper);
  max-width: 720px;
}

.wordmark {
  /* Integer multiples of monogram's 16px em: 64 on desktop, 40 on a phone. */
  font-size: 64px;
  line-height: 64px;
  margin: 0 0 16px;
  font-weight: 400;
}

.pitch {
  font-size: 20px;
  line-height: 1.45;
  margin: 0 0 24px;
  color: var(--paper);
  max-width: 34em;
}

.note {
  font-size: 13px;
  color: rgba(238, 234, 226, 0.72);
  margin: 16px 0 0;
}

/* ------------------------------------------------------------- buttons */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-block;
  font-size: 16px;
  line-height: 16px;
  padding: 14px 20px;
  border-radius: 10px;
  text-decoration: none;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
}

.button.primary {
  background: var(--accent);
  color: var(--ink);
}

.button.primary:hover {
  filter: brightness(0.96);
}

.button.secondary {
  background: transparent;
  color: var(--paper);
  border-color: rgba(238, 234, 226, 0.5);
}

.button.secondary:hover {
  border-color: var(--paper);
}

/* A link that goes nowhere yet should look like it. */
.button[href="#"] {
  opacity: 0.75;
  cursor: not-allowed;
}

/* -------------------------------------------------------------- signup */

.signup {
  margin: 28px 0;
  padding: 24px;
  border: 1px solid var(--rule);
  border-radius: 14px;
}

.label {
  display: block;
  font-size: 16px;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 10px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

input[type="email"] {
  flex: 1 1 240px;
  min-width: 0;
  font: inherit;
  font-size: 15px;
  padding: 13px 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

input[type="email"]:focus-visible {
  outline: 2px solid var(--deep-panel);
  outline-offset: 1px;
  border-color: var(--deep-panel);
}

.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.status {
  font-size: 13px;
  color: var(--ink-dim);
  margin: 10px 0 0;
  min-height: 1.2em;
}

.status[data-state="bad"] {
  color: var(--signal);
}

/* -------------------------------------------------------------- footer */

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 20px 0 40px;
  font-size: 12px;
  color: var(--ink-dim);
}

footer a {
  color: var(--ink-dim);
}

footer a:hover {
  color: var(--ink);
}

.credit {
  opacity: 0.8;
}

/* --------------------------------------------------------------- small */

@media (max-width: 640px) {
  .wordmark {
    font-size: 40px;
    line-height: 40px;
  }

  .pitch {
    font-size: 17px;
  }

  .hero {
    min-height: 68vh;
  }

  .hero-text {
    padding: 24px 18px;
  }
}

/* A looping clip is motion nobody asked for. Honour the preference: show the poster. */
@media (prefers-reduced-motion: reduce) {
  .hero-clip {
    display: none;
  }

  .hero {
    background-image: url("/press/hero.png");
    background-size: cover;
    background-position: center;
  }

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
