/* Log in, sign up, forgot / reset password and the dashboard: they open as if
   on top of the homepage. Same top bar, same hero photo in the same place,
   same dimming, same light / dark choice. Loaded after cloud-pages.css; the
   values here mirror pages/home/home.css, so change them in both. */

@font-face {
  font-family: "Geist";
  src: url("/assets/home/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------------------------------------------------------------- tokens */
.auth {
  --lime: #9fd402; --lime-rgb: 159, 212, 2; --on-lime: #0d1400;
  --pink: #fa2993; --pink-rgb: 250, 41, 147;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 1240px; --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 69px;

  /* dark (the homepage's) */
  --bg: #070b10; --bg-rgb: 7, 11, 16;
  --text: #eef2f6; --muted: #9aa6b5;
  --line: rgba(255, 255, 255, 0.1);
  --glass: rgba(18, 24, 33, 0.58); --glass-edge: rgba(255, 255, 255, 0.12); --glass-hi: rgba(255, 255, 255, 0.08);
  --card: rgba(18, 24, 33, 0.62);
  --field: rgba(6, 9, 13, 0.7);
  --btn: rgba(255, 255, 255, 0.07);
  --link: #ff5aae; --lime-text: #b6e83a;
  --shadow-rgb: 0, 0, 0;
  --photo-opacity: 0.85;
  --scrim-1: 0.8; --scrim-2: 0.55; --scrim-3: 0.12; --scrim-4: 0.25;
  color-scheme: dark;
}
:root[data-theme="light"] .auth {
  --bg: #f3f6f1; --bg-rgb: 243, 246, 241;
  --text: #0c1219; --muted: #4b5664;
  --line: rgba(12, 18, 25, 0.12);
  --glass: rgba(255, 255, 255, 0.62); --glass-edge: rgba(255, 255, 255, 0.85); --glass-hi: rgba(255, 255, 255, 0.7);
  --card: rgba(255, 255, 255, 0.72);
  --field: rgba(255, 255, 255, 0.92);
  --btn: rgba(12, 18, 25, 0.06);
  --link: #c20f69; --lime-text: #4a6800;
  --bad: #c62828; --ok: #3d5200;
  --shadow-rgb: 22, 40, 20;
  --photo-opacity: 1;
  --scrim-1: 0.9; --scrim-2: 0.74; --scrim-3: 0.04; --scrim-4: 0.1;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .auth {
    --bg: #f3f6f1; --bg-rgb: 243, 246, 241;
    --text: #0c1219; --muted: #4b5664;
    --line: rgba(12, 18, 25, 0.12);
    --glass: rgba(255, 255, 255, 0.62); --glass-edge: rgba(255, 255, 255, 0.85); --glass-hi: rgba(255, 255, 255, 0.7);
    --card: rgba(255, 255, 255, 0.72);
    --field: rgba(255, 255, 255, 0.92);
    --btn: rgba(12, 18, 25, 0.06);
    --link: #c20f69; --lime-text: #4a6800;
    --bad: #c62828; --ok: #3d5200;
    --shadow-rgb: 22, 40, 20;
    --photo-opacity: 1;
    --scrim-1: 0.9; --scrim-2: 0.74; --scrim-3: 0.04; --scrim-4: 0.1;
    color-scheme: light;
  }
}

/* ---------------------------------------------------------------- page */
body.auth {
  padding: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
.auth-main { position: relative; z-index: 1; padding: 24px 16px 40px; }

/* the hero photo: below the top bar, the same box the homepage hero gives it */
.auth-photo, .auth-scrim {
  position: fixed; left: 0; right: 0; top: var(--nav-h);
  height: calc(100vh - var(--nav-h)); height: calc(100lvh - var(--nav-h));
}
.auth-photo { z-index: -2; width: 100%; object-fit: cover; object-position: 30% 60%; opacity: var(--photo-opacity); filter: saturate(1.1); }
.auth-scrim {
  z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(var(--bg-rgb), var(--scrim-1)) 0%, rgba(var(--bg-rgb), var(--scrim-2)) 40%, rgba(var(--bg-rgb), var(--scrim-3)) 75%, rgba(var(--bg-rgb), var(--scrim-4)) 100%),
    linear-gradient(180deg, rgba(var(--bg-rgb), 0.2) 0%, rgba(var(--bg-rgb), 0) 40%, var(--bg) 100%);
}
@media (max-width: 1023px), (max-width: 1199px) and (orientation: portrait) {
  .auth-scrim {
    background: linear-gradient(180deg,
      rgba(var(--bg-rgb), var(--scrim-1)) 0%, rgba(var(--bg-rgb), var(--scrim-2)) 46%,
      rgba(var(--bg-rgb), var(--scrim-3)) 62%, rgba(var(--bg-rgb), var(--scrim-3)) 82%, var(--bg) 100%);
  }
}

/* ---------------------------------------------------------------- top bar (as the homepage) */
.auth .nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(var(--bg-rgb), 0.55);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.auth .nav-in {
  max-width: var(--max); margin: 0 auto; height: 68px; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.auth .mark { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.auth .ball-o { display: inline-block; width: 0.92em; height: 0.92em; flex: none; vertical-align: -0.13em; margin: 0 0.05em 0 0.01em; overflow: visible; }
.auth .ball-o .shell { fill: var(--lime); stroke: var(--pink); stroke-width: 1.7; }
.auth .ball-o .holes { fill: var(--on-lime); }
.auth .mark .word { font-weight: 800; font-size: 26px; letter-spacing: -0.035em; }
.auth .mark .by { font-weight: 600; font-size: 14px; color: var(--muted); margin-left: 2px; }
.auth .club-logo { height: 34px; width: auto; flex: none; }
.auth .nav-right { display: flex; align-items: center; gap: 14px; }
.auth .nav-right nav { display: flex; align-items: center; gap: 14px; }

.auth .theme {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; padding: 0; border-radius: 999px; cursor: pointer;
  color: var(--text); background: var(--glass); border: 1px solid var(--line);
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.auth .theme:active { transform: scale(0.94); }
.auth .theme svg { grid-area: 1 / 1; width: 20px; height: 20px; fill: currentColor; transition: opacity .35s var(--ease), transform .55s var(--ease); }
.auth .theme .i-sun { color: var(--lime-text); }
.auth .theme[data-current="dark"] .i-moon,
.auth .theme[data-current="light"] .i-sun { opacity: 0; transform: rotate(-70deg) scale(0.5); }
@media (hover: hover) { .auth .theme:hover { border-color: rgba(var(--pink-rgb), 0.6); } }
.auth .theme:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }

@media (max-width: 767px) {
  .auth { --nav-h: 61px; }
  .auth .nav-right, .auth .nav-right nav { gap: 10px; }
  .auth .nav-in { height: 60px; gap: 10px; }
  .auth .mark { gap: 6px; }
  .auth .mark .word { font-size: 22px; }
  .auth .club-logo { height: 27px; }
  .auth .theme { width: 36px; height: 36px; }
  .auth .theme svg { width: 18px; height: 18px; }
}
@media (max-width: 389px) {
  .auth .nav-in { padding: 0 12px; }
  .auth .mark .word { font-size: 20px; }
  .auth .club-logo { height: 24px; }
}

/* Log in / Create account, as on the homepage */
.auth .nav .link { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--text); opacity: .85; white-space: nowrap; }
.auth .nav .link:hover { opacity: 1; }
.auth .nav .btn.lime {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 400; line-height: 1; font-family: inherit; text-decoration: none; white-space: nowrap;
  background: var(--lime); color: var(--on-lime) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 28px -10px rgba(var(--lime-rgb), 0.7);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.auth .nav .btn.lime:active { transform: translateY(1px) scale(0.98); }
@media (hover: hover) { .auth .nav .btn.lime:hover { transform: translateY(-1px); } }
.auth .nav .link:focus-visible, .auth .nav .btn:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
@media (max-width: 767px) {
  .auth .nav .link { font-size: 14px; }
  .auth .nav .btn.sm { display: none; } /* as on the homepage at phone width */
}
@media (max-width: 300px) { .auth .nav .link { display: none; } }

/* the dashboard's own buttons sit under the bar on phones, so the bar matches the homepage */
.auth .dash-bar { max-width: 960px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- cards and forms */
.auth .card {
  position: relative;
  background: linear-gradient(135deg, var(--glass-hi), transparent 55%), var(--card);
  border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 24px 60px -20px rgba(var(--shadow-rgb), 0.55);
}
@media (prefers-reduced-transparency: reduce) {
  .auth .card { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.auth a { color: var(--link); }
.auth input, .auth select { background: var(--field); color: var(--text); border-color: var(--line); }
.auth button:not(.primary):not(.theme), .auth .btn:not(.primary) { background: var(--btn); color: var(--text) !important; border-color: var(--line); }
.auth .tag { background: var(--btn); }

.auth .close, .auth .home-btn {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px;
  color: var(--text) !important; background: var(--btn); border: 1px solid var(--line);
  transition: border-color .2s, background-color .2s;
}
.auth .close { position: absolute; top: 12px; right: 12px; }
.auth .close svg, .auth .home-btn svg { width: 18px; height: 18px; fill: currentColor; }
@media (hover: hover) { .auth .close:hover, .auth .home-btn:hover { border-color: rgba(var(--pink-rgb), 0.6); } }
.auth .close:focus-visible, .auth .home-btn:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
