/*
 * FitClub unified auth — cinematic skin.
 *
 * Standalone stylesheet for marketing/auth.html.  Borrows the design
 * tokens from cinematic.css (void background, violet system, hairlines,
 * Space Grotesk display type) without importing the home page's scroll
 * choreography.  No Webflow classes are used on this page.
 */

:root {
  --cauth-void: #0a0b0f;
  --cauth-text: #f4f3f8;
  --cauth-muted: rgba(214, 214, 224, 0.72);
  --cauth-line: rgba(255, 255, 255, 0.12);
  --cauth-line-soft: rgba(255, 255, 255, 0.07);
  --cauth-violet: #6a4cff;
  --cauth-violet-2: #8b79ff;
  --cauth-danger: #ff6b81;
  --cauth-ok: #58d6a3;
  --cauth-display: "Space Grotesk", "Geist", system-ui, sans-serif;
  --cauth-body: "Geist", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html.page-auth,
body.page-auth {
  margin: 0;
  padding: 0;
  background: var(--cauth-void);
  color: var(--cauth-text);
  font-family: var(--cauth-body);
  -webkit-font-smoothing: antialiased;
}

body.page-auth {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* Film grain, same recipe as the home page. */
.cauth-grain {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.9'/></svg>");
}

/* Soft violet glow anchoring the form column. */
.cauth-glow {
  position: fixed;
  left: 50%;
  bottom: -30vh;
  width: 90vw;
  max-width: 900px;
  height: 60vh;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(106, 76, 255, 0.16) 0%,
    rgba(106, 76, 255, 0.05) 45%,
    transparent 70%
  );
}

/* ── Top bar ─────────────────────────────────────────────────────── */

.cauth-top {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 4vw, 44px);
  border-bottom: 1px solid var(--cauth-line-soft);
}

.cauth-top__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--cauth-text);
}

.cauth-top__brand img {
  width: 32px;
  height: 32px;
  display: block;
}

.cauth-top__wordmark {
  font-family: var(--cauth-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cauth-top__side {
  display: flex;
  align-items: center;
  gap: 18px;
}

.cauth-top__back {
  color: var(--cauth-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cauth-top__back:hover {
  color: var(--cauth-text);
}

/* Language toggle host (site-i18n.js mounts into .navbar-button-s-block). */
.cauth-top .navbar-button-s-block {
  display: flex;
  align-items: center;
}

/* ── Main column ─────────────────────────────────────────────────── */

.cauth-main {
  position: relative;
  z-index: 6;
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(40px, 9vh, 96px) 24px 64px;
}

.cauth-col {
  width: 100%;
  max-width: 420px;
}

/* Step panes stack in one grid cell and crossfade. */
.cauth-steps {
  display: grid;
}

.cauth-step {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.34s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1),
    visibility 0.34s;
  pointer-events: none;
}

.cauth-step.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .cauth-step {
    transition: none;
    transform: none;
  }
}

/* ── Editorial header ────────────────────────────────────────────── */

.cauth-kicker {
  display: block;
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cauth-violet-2);
  overflow-wrap: anywhere;
}

.cauth-title {
  margin: 0 0 12px;
  font-family: var(--cauth-display);
  font-size: clamp(1.9rem, 5.4vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--cauth-text);
}

.cauth-sub {
  margin: 0 0 30px;
  color: var(--cauth-muted);
  font-size: 0.98rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.cauth-sub b {
  color: var(--cauth-text);
  font-weight: 600;
}

/* Plan chip: hairline badge under the kicker when ?plan= is present. */
.cauth-plan {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 26px;
  padding: 9px 14px;
  border: 1px solid var(--cauth-line);
  color: var(--cauth-text);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cauth-plan b {
  color: var(--cauth-violet-2);
  font-weight: 700;
}

.cauth-plan span {
  color: var(--cauth-muted);
  font-weight: 500;
  letter-spacing: 0.08em;
}

/* ── Fields ──────────────────────────────────────────────────────── */

.cauth-field {
  margin-bottom: 16px;
}

.cauth-field__wrap {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--cauth-line);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.cauth-field__wrap:focus-within {
  border-color: var(--cauth-violet);
  background: rgba(106, 76, 255, 0.05);
}

.cauth-field.is-error .cauth-field__wrap {
  border-color: var(--cauth-danger);
}

.cauth-input {
  flex: 1;
  min-width: 0;
  padding: 16px 16px;
  border: 0;
  background: transparent;
  color: var(--cauth-text);
  font-family: var(--cauth-body);
  font-size: 15px;
  line-height: 1.3;
  outline: none;
}

.cauth-input::placeholder {
  color: rgba(214, 214, 224, 0.45);
}

/* Chrome autofill on a dark page */
.cauth-input:-webkit-autofill,
.cauth-input:-webkit-autofill:hover,
.cauth-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--cauth-text);
  -webkit-box-shadow: 0 0 0 1000px #14151d inset;
  transition: background-color 9999s ease-out;
}

.cauth-field__trail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  align-self: stretch;
  flex: none;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--cauth-muted);
  cursor: pointer;
}

.cauth-field__trail svg {
  width: 19px;
  height: 19px;
}

.cauth-field__trail--static {
  cursor: default;
}

.cauth-field__trail.is-ok {
  color: var(--cauth-ok);
}

.cauth-field__trail.is-bad {
  color: var(--cauth-danger);
}

.cauth-field__error {
  margin-top: 7px;
  color: var(--cauth-danger);
  font-size: 12.5px;
  line-height: 1.45;
  white-space: pre-line;
  display: none;
}

.cauth-field.is-error .cauth-field__error {
  display: block;
}

/* Username fixed @ prefix */
.cauth-field__prefix {
  flex: none;
  padding-left: 16px;
  color: var(--cauth-muted);
  font-size: 15px;
}

.cauth-field__prefix + .cauth-input {
  padding-left: 4px;
}

/* ── Buttons ─────────────────────────────────────────────────────── */

.cauth-cta {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 6px 0 0;
  padding: 17px 28px;
  border: 0;
  background: var(--cauth-violet);
  color: #fff;
  font-family: var(--cauth-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.cauth-cta:hover,
.cauth-cta:focus-visible {
  background: #7d61ff;
}

.cauth-cta:disabled {
  opacity: 0.55;
  cursor: default;
}

.cauth-cta--ghost {
  background: transparent;
  border: 1px solid var(--cauth-line);
  color: var(--cauth-text);
}

.cauth-cta--ghost:hover,
.cauth-cta--ghost:focus-visible {
  background: transparent;
  border-color: var(--cauth-violet);
}

.cauth-cta--ghost svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ── Divider ─────────────────────────────────────────────────────── */

.cauth-or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--cauth-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cauth-or::before,
.cauth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--cauth-line-soft);
}

/* ── Role tiles ──────────────────────────────────────────────────── */

.cauth-roles {
  display: grid;
  gap: 12px;
}

.cauth-role {
  display: block;
  width: 100%;
  padding: 20px 20px 18px;
  border: 1px solid var(--cauth-line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--cauth-text);
  font-family: var(--cauth-body);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.cauth-role:hover,
.cauth-role:focus-visible {
  border-color: var(--cauth-violet);
  background: rgba(106, 76, 255, 0.06);
}

.cauth-role.is-selected {
  border-color: var(--cauth-violet);
  background: rgba(106, 76, 255, 0.1);
}

.cauth-role b {
  display: block;
  margin-bottom: 5px;
  font-family: var(--cauth-display);
  font-size: 1.14rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cauth-role span {
  display: block;
  color: var(--cauth-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Gender tiles reuse role tile skin, side by side and denser. */
.cauth-genders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cauth-genders .cauth-role {
  padding: 15px 16px;
  text-align: center;
}

.cauth-genders .cauth-role b {
  margin: 0;
  font-size: 0.98rem;
}

/* ── Small links / footer rows ───────────────────────────────────── */

.cauth-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  margin-top: 24px;
  color: var(--cauth-muted);
  font-size: 13px;
}

.cauth-links a,
.cauth-linkbtn {
  border: 0;
  padding: 0;
  background: none;
  color: var(--cauth-muted);
  font-family: var(--cauth-body);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.cauth-links a:hover,
.cauth-linkbtn:hover {
  color: var(--cauth-text);
}

.cauth-links .cauth-linkbtn--accent,
.cauth-linkbtn--accent {
  color: var(--cauth-violet-2);
  font-weight: 600;
}

.cauth-links__sep {
  color: rgba(214, 214, 224, 0.3);
}

/* Terms line under the final CTA. */
.cauth-terms {
  margin: 18px 0 0;
  color: rgba(214, 214, 224, 0.55);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.cauth-terms a {
  color: var(--cauth-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cauth-terms a:hover {
  color: var(--cauth-text);
}

/* ── Banners / notices ───────────────────────────────────────────── */

.cauth-banner {
  display: none;
  margin: 0 0 18px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 107, 129, 0.4);
  background: rgba(255, 107, 129, 0.07);
  color: var(--cauth-danger);
  font-size: 13.5px;
  line-height: 1.5;
}

.cauth-banner.is-visible {
  display: block;
}

.cauth-note {
  margin: 0 0 18px;
  padding: 13px 16px;
  border: 1px solid var(--cauth-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--cauth-muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.cauth-note b {
  color: var(--cauth-text);
}

/* ── Waiting / success states ────────────────────────────────────── */

.cauth-state {
  text-align: left;
}

.cauth-state .cauth-mark {
  display: block;
  width: 10px;
  height: 10px;
  margin-bottom: 26px;
  background: var(--cauth-violet);
}

.cauth-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--cauth-violet-2);
  border-radius: 50%;
  animation: cauth-spin 0.7s linear infinite;
  vertical-align: -2px;
}

@keyframes cauth-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Wheel date picker (used by FCAuth.openWheelDatePicker) ──────── */

.auth-wheel-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(4, 5, 9, 0.66);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-wheel-card {
  width: 100%;
  max-width: 360px;
  background: #12131a;
  border: 1px solid var(--cauth-line);
  overflow: hidden;
}

.auth-wheel-header {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--cauth-line-soft);
}

.auth-wheel-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--cauth-muted);
}

.auth-wheel-ok {
  background: none;
  border: none;
  padding: 8px 14px;
  font-family: var(--cauth-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cauth-violet-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.auth-wheel-ok:hover {
  opacity: 0.85;
}

.auth-wheel-body {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.1fr 1.1fr;
  height: 220px;
  overflow: hidden;
}

.auth-wheel-band {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 36px;
  pointer-events: none;
  border-top: 1px solid var(--cauth-line);
  border-bottom: 1px solid var(--cauth-line);
}

.auth-wheel-column {
  height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  text-align: center;
  cursor: grab;
  touch-action: pan-y;
}

.auth-wheel-column:active {
  cursor: grabbing;
}

.auth-wheel-column::-webkit-scrollbar {
  display: none;
}

.auth-wheel-spacer {
  height: 92px;
  pointer-events: none;
}

.auth-wheel-item {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  font-size: 19px;
  color: rgba(244, 243, 248, 0.45);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.18s ease;
  font-variant-numeric: tabular-nums;
}

.auth-wheel-item.is-selected {
  color: var(--cauth-text);
  font-weight: 500;
}

/* ── Small screens ───────────────────────────────────────────────── */

@media screen and (max-width: 767px) {
  .cauth-main {
    padding: 28px 20px calc(32px + env(safe-area-inset-bottom, 0px));
  }

  .cauth-input {
    font-size: 16px;
    padding: 16px 14px;
  }

  .cauth-cta {
    min-height: 48px;
  }

  .cauth-title {
    max-width: 14ch;
  }
}

@media screen and (max-width: 480px) {
  .cauth-top__wordmark {
    display: none;
  }

  .cauth-main {
    padding-top: 28px;
  }
}
