/* Anton, self-hosted (latin + latin-ext) */
@font-face {
  font-family: "Anton";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/anton-24109950.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Anton";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/anton-2e689521.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0b0b0a;
  --paper: #f1efe9;
  --paper-2: rgba(241, 239, 233, 0.74);
  --paper-3: rgba(241, 239, 233, 0.56);
  --line: rgba(241, 239, 233, 0.32);
  --line-strong: rgba(241, 239, 233, 0.7);
  --accent: #c8232f;
  --accent-hover: #a91e28;
  --ok: #9fd7a4;
  --err: #ff8a8f;

  --display: "Anton", "Arial Narrow", sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

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

html { background: var(--ink); }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--accent);
}

::selection { background: var(--accent); color: var(--paper); }

a { color: inherit; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Page frame: photo behind, three rows over it */
.page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.hero {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
}

.scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 75% 70% at 50% 40%, rgba(11, 11, 10, 0) 0%, rgba(11, 11, 10, 0.2) 60%, rgba(11, 11, 10, 0.6) 100%),
    linear-gradient(to bottom, rgba(11, 11, 10, 0.45) 0%, rgba(11, 11, 10, 0) 18%, rgba(11, 11, 10, 0) 42%, rgba(11, 11, 10, 0.55) 68%, rgba(11, 11, 10, 0.92) 100%);
}

/* Top and bottom bars */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1rem, 2.6vw, 1.75rem) var(--gutter);
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.wordmark {
  font-family: var(--display);
  font-size: 1.375rem;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.links {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.25rem);
}

.links a {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding-block: 0.5rem;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 85% / 0 1px;
  transition: background-size 0.4s var(--ease-out);
}
.links a:hover { background-size: 100% 1px; }

.bar--bottom {
  padding-bottom: max(clamp(1rem, 2.6vw, 1.75rem), env(safe-area-inset-bottom));
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-3);
}

/* Centre stack */
.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: clamp(2rem, 6vh, 4rem) var(--gutter) clamp(0.5rem, 3vh, 2rem);
}

.title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(4.5rem, min(15vw, 20vh), 11.5rem);
  line-height: 0.86;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  text-shadow: 0 0.04em 0.4em rgba(0, 0, 0, 0.35);
}

.lede {
  margin: clamp(1rem, 2.4vh, 1.5rem) 0 0;
  max-width: 34ch;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.45;
  color: var(--paper-2);
  text-wrap: balance;
}

/* Signup */
.signup {
  width: min(31rem, 100%);
  margin-top: clamp(2.25rem, 5.5vh, 3.5rem);
}

.signup__prompt {
  margin: 0 0 0.875rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--paper);
}

.signup__row {
  display: flex;
}

.signup__input {
  flex: 1;
  min-width: 0;
  height: 3.25rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 0;
  background: rgba(11, 11, 10, 0.5);
  color: var(--paper);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
.signup__input::placeholder { color: var(--paper-3); opacity: 1; }
.signup__input:hover { border-color: var(--line-strong); }
.signup__input:focus { outline: none; border-color: var(--paper); background: rgba(11, 11, 10, 0.72); }
.signup__input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.signup[data-state="error"] .signup__input { border-color: var(--err); }

.signup__btn {
  flex: none;
  height: 3.25rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  color: var(--paper);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out);
}
.signup__btn:hover { background: var(--accent-hover); }
.signup__btn:active { background: var(--accent); }
.signup__btn:disabled { cursor: progress; opacity: 0.7; }

.signup__status {
  min-height: 1.5em;
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--paper-3);
}
.signup[data-state="error"] .signup__status { color: var(--err); }
.signup[data-state="ok"] .signup__status { color: var(--ok); }

/* Load sequence: the photo settles while the type resolves. Content is visible without it. */
@media (prefers-reduced-motion: no-preference) {
  .hero { animation: settle 2.4s var(--ease-out) both; }
  .title { animation: rise 1.1s var(--ease-out) 0.15s both; }
  .lede, .signup { animation: lift 0.9s var(--ease-out) both; }
  .lede { animation-delay: 0.45s; }
  .signup { animation-delay: 0.6s; }
  .bar { animation: fade 0.9s var(--ease-out) 0.8s both; }
}

@keyframes settle {
  from { transform: scale(1.07); filter: brightness(0.55); }
  to { transform: scale(1); filter: brightness(1); }
}
@keyframes rise {
  from { clip-path: inset(0 0 100% 0); transform: translateY(0.12em); }
  to { clip-path: inset(0 0 -10% 0); transform: none; }
}
@keyframes lift {
  from { opacity: 0; transform: translateY(0.75rem); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Phones */
@media (max-width: 34rem) {
  /* Pin the photo to the first screen so the barbell (47.6% down the photo) threads
     through the middle of the wordmark, as it does on desktop. */
  .hero { height: 100vh; height: 100svh; bottom: auto; }
  .main {
    --title-box: calc(4.5rem * 0.86);
    --top-bar: 3.375rem;
    justify-content: flex-start;
    padding-top: max(1rem, calc(47.6svh - var(--top-bar) - var(--title-box) / 2));
  }
  .title { font-size: 4.5rem; }
  .lede { margin-top: 0.875rem; }
  .signup { margin-top: 1.75rem; }
  .signup__row { flex-direction: column; gap: 0.625rem; }
  .signup__input { flex: none; width: 100%; border-right: 1px solid var(--line); }
  .signup__btn { width: 100%; }
  .bar--bottom { font-size: 0.6875rem; letter-spacing: 0.12em; }
}

/* Short phones: keep everything on one screen */
@media (max-width: 34rem) and (max-height: 44rem) {
  .main { --title-box: calc(3.75rem * 0.86); --top-bar: 3.125rem; padding-bottom: 0.25rem; }
  .title { font-size: 3.75rem; }
  .lede { margin-top: 0.5rem; font-size: 1rem; }
  .signup { margin-top: 1rem; }
  .signup__prompt { margin-bottom: 0.5rem; }
  .signup__row { gap: 0.5rem; }
  .signup__input, .signup__btn { height: 2.875rem; }
  .signup__status { margin-top: 0.5rem; }
  .bar { padding-top: 0.75rem; padding-bottom: 0.75rem; }
}

/* Short landscape screens */
@media (max-height: 34rem) and (min-width: 34rem) {
  .title { font-size: clamp(4rem, 22vh, 7rem); }
  .signup { margin-top: 1.5rem; }
}
