/* toughmudderphotos — styling from the Race Images design system (2026).
   Display: Oswald (the design system's nominated public-web face; Poster Gothic
   ATF is licensed and must not be embedded on public sites). Body: Lato.
   Signal Red #D7263D is the CTA. Mobile-first. */

@font-face { font-family: Oswald; src: url("/static/fonts/oswald-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Oswald; src: url("/static/fonts/oswald-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Oswald; src: url("/static/fonts/oswald-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: Lato; src: url("/static/fonts/lato-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Lato; src: url("/static/fonts/lato-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ri-red: #D7263D;
  --ri-red-tint: #DE4D60;
  --ri-red-shade: #B01F32;
  --ri-ink: #171614;
  --ri-paper: #F0FBFF;
  --ri-surface-dark: #212121;
  --display: Oswald, Impact, "Arial Narrow", sans-serif;
  --body: Lato, "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ri-paper);
  background: var(--ri-ink);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 7vw, 64px) 20px;
  text-align: center;
  background-color: var(--ri-ink);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
/* READY ("photos now live"): one celebratory action shot (DSC_3585), darkened so
   the headline + CTA stay legible. The first declaration is a universal JPEG
   fallback; the second upgrades to WebP via image-set() where supported. Phones
   get the 1080 crop, >=768px the full-res crop. The 3-stop scrim kills the bright
   sky up top and the button area at the bottom while letting her face breathe. */
.hero--ready {
  --scrim: linear-gradient(180deg, rgba(23,22,20,.64) 0%, rgba(23,22,20,.48) 46%, rgba(23,22,20,.82) 100%);
  background-color: #1d1210;
  background-position: center 42%;
  background-image: var(--scrim), url("/static/img/hero-ready-1080.jpg");
  background-image: var(--scrim), image-set(url("/static/img/hero-ready-1080.webp") type("image/webp"), url("/static/img/hero-ready-1080.jpg") type("image/jpeg"));
}
@media (min-width: 768px) {
  .hero--ready {
    background-image: var(--scrim), url("/static/img/hero-ready-1600.jpg");
    background-image: var(--scrim), image-set(url("/static/img/hero-ready-1600.webp") type("image/webp"), url("/static/img/hero-ready-1600.jpg") type("image/jpeg"));
  }
}

/* EVENT / UPLOADING ("we're out on course"): the crew portraits sit BEHIND the
   form as a subtle, slow cross-fade (.crew-bg). The scrim that keeps the form
   crisp lives on .crew-bg::after, so these just set the branded base colour. */
.hero--event     { background-color: #241a12; }
.hero--uploading { background-color: #1a1a1d; }

/* ---- Crew cross-fade background (event / uploading) ---------------------- */
.crew-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.crew-bg picture { display: contents; }
.crew-bg__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;   /* keep the crew's faces high, above the form */
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  will-change: opacity;
}
.crew-bg__img.is-active { opacity: 1; }
/* Deep scrim ABOVE the photos but BELOW .wrap (z-index:1): the form stays the
   focus and the white inputs keep full contrast over the busiest portraits. */
.crew-bg::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(23,22,20,.58) 0%, rgba(23,22,20,.74) 42%, rgba(23,22,20,.92) 100%);
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.tm-mark {
  width: clamp(96px, 26vw, 140px);
  height: auto;
  margin: 0 auto 18px;
  display: block;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.45));
}

.eyebrow {
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 13px;
  color: #fff;
  opacity: .85;
  margin: 0 0 6px;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

.display {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1.02;
  font-size: clamp(40px, 13vw, 72px);
  margin: 0 0 14px;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,.5), 0 1px 4px rgba(0,0,0,.55);
}

.lede {
  font-size: clamp(16px, 4.4vw, 19px);
  line-height: 1.5;
  color: var(--ri-paper);
  max-width: 30ch;
  margin: 0 auto 26px;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 16px 24px;
  border: 2px solid var(--ri-red);
  border-radius: 8px;
  background: var(--ri-red);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 20px;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, transform .05s ease;
}
.btn:hover { background: var(--ri-red-tint); border-color: var(--ri-red-tint); }
.btn:active { background: var(--ri-red-shade); border-color: var(--ri-red-shade); transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }

/* ---- Notify form --------------------------------------------------------- */
.notify { display: flex; flex-direction: column; gap: 12px; text-align: left; margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.channel { border: 0; padding: 0; margin: 0 0 2px; }
.channel legend {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em; font-size: 12px; color: #fff; opacity: .85; padding: 0; margin-bottom: 8px;
}
.seg {
  display: inline-flex; align-items: center; gap: 7px; margin-right: 18px;
  font-size: 16px; color: #fff; cursor: pointer;
}
.seg input { width: 20px; height: 20px; accent-color: var(--ri-red); }

.in {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  font-family: var(--body);
  font-size: 16px; /* 16px avoids iOS zoom-on-focus */
  color: var(--ri-ink);
  background: var(--ri-paper);
  border: 2px solid transparent;
  border-radius: 8px;
}
.in::placeholder { color: #8a8880; }
.in:focus-visible { outline: none; border-color: var(--ri-red); box-shadow: 0 0 0 3px rgba(215,38,61,.35); }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--ri-paper); cursor: pointer; }
.consent input { width: 22px; height: 22px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--ri-red); }

.fine { font-size: 12px; line-height: 1.5; color: rgba(240,251,255,.7); margin: 2px 0 0; }

.err {
  background: rgba(215,38,61,.16);
  border-left: 3px solid var(--ri-red);
  color: #fff;
  padding: 10px 13px;
  border-radius: 6px;
  font-size: 14px;
  margin: 0 0 4px;
}

/* ---- Footer -------------------------------------------------------------- */
.foot {
  flex: 0 0 auto;
  background: var(--ri-paper);
  color: var(--ri-ink);
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 16px;
}
.foot__by { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #6b6863; }
.foot__logo { height: 22px; width: auto; display: block; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- Admin (plain) ------------------------------------------------------- */
body.admin { background: var(--ri-paper); color: var(--ri-ink); display: block; }
.adminwrap { max-width: 680px; margin: 0 auto; padding: 28px 20px 60px; font-size: 15px; }
.adminwrap h1 { font-family: var(--display); text-transform: uppercase; letter-spacing: .03em; }
.adminwrap h2 { font-family: var(--display); text-transform: uppercase; letter-spacing: .04em; font-size: 18px; margin-top: 28px; }
.adminwrap code { background: #fff; border: 1px solid rgba(23,22,20,.12); border-radius: 5px; padding: 1px 6px; font-size: 13px; }
.adminwrap table { border-collapse: collapse; width: 100%; background: #fff; border: 1px solid rgba(23,22,20,.12); border-radius: 8px; overflow: hidden; }
.adminwrap th, .adminwrap td { text-align: left; padding: 9px 12px; border-top: 1px solid rgba(23,22,20,.08); }
.adminwrap th { width: 180px; color: #4a4845; font-weight: 700; }
.badge { font-family: var(--display); text-transform: uppercase; letter-spacing: .05em; padding: 2px 10px; border-radius: 999px; color: #fff; }
.badge--event { background: #8a6d3b; } .badge--uploading { background: #345; } .badge--ready { background: var(--ri-red); }
