/* ==========================================================
   The ATL Warriors — members PWA (frontend only)
   ========================================================== */

@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url("../assets/fonts/BarlowSemiCondensed-SemiBold.woff") format("woff"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-display: swap; src: url("../assets/fonts/BarlowSemiCondensed-Bold.woff") format("woff"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 800; font-display: swap; src: url("../assets/fonts/BarlowSemiCondensed-ExtraBold.woff") format("woff"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../assets/fonts/BarlowCondensed-Bold.woff") format("woff"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url("../assets/fonts/BarlowCondensed-ExtraBold.woff") format("woff"); }

:root {
  --bg: #070707;
  --gold: #bfa888;
  --gold-soft: #c9b593;
  --gold-dim: #a89a84;
  --cream: #fbfaf7;
  --cream-2: #e8dfcf;
  --line: #e7e0d4;
  --ink: #1b1a18;
  --white: #ffffff;

  --f-display: "Barlow Semi Condensed", "Arial Narrow", "DejaVu Sans Condensed", sans-serif;
  --f-cond: "Barlow Condensed", "Barlow Semi Condensed", "Arial Narrow", "DejaVu Sans Condensed", sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--white);
}

body {
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

img { display: block; max-width: 100%; user-select: none; -webkit-user-drag: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

.screen {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
}

/* ==========================================================
   SPLASH
   ========================================================== */

.splash {
  z-index: 50;
  display: grid;
  place-items: center;
}

.splash-glow {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 130vmin;
  height: 130vmin;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(191, 168, 136, .10), rgba(191, 168, 136, .035) 45%, rgba(191, 168, 136, 0) 70%);
  opacity: 0;
  animation: glowIn 2.4s ease-out .1s forwards;
}

.splash-center {
  position: relative;
  width: min(80vw, 460px);
  margin-top: -5vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-anim {
  position: relative;
  width: 100%;
  aspect-ratio: 978 / 447;
}

.logo-anim img,
.l-sheen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Arms: swing in from the sides, land, then give a little flex */
.l-arm--left  { transform-origin: 13% 86%; animation: armLeft  1.7s var(--ease-out) .15s both; }
.l-arm--right { transform-origin: 87% 86%; animation: armRight 1.7s var(--ease-out) .15s both; }

@keyframes armLeft {
  0%   { opacity: 0; transform: translateX(-12%) rotate(-16deg); filter: blur(6px); }
  50%  { opacity: 1; transform: none; filter: blur(0); }
  66%  { transform: rotate(-5deg) scale(1.02); }
  82%  { transform: rotate(1.2deg); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes armRight {
  0%   { opacity: 0; transform: translateX(12%) rotate(16deg); filter: blur(6px); }
  50%  { opacity: 1; transform: none; filter: blur(0); }
  66%  { transform: rotate(5deg) scale(1.02); }
  82%  { transform: rotate(-1.2deg); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}

/* Text: each line rises up out of an invisible mask line.
   --top/--bot = band of the line inside the image, --h = travel distance. */
.l-the      { --top: 3.5%;  --bot: 20.5%; --h: 17%; animation-delay: .5s; }
.l-atl      { --top: 23.6%; --bot: 66%;   --h: 42%; animation-delay: .64s; }
.l-warriors { --top: 69%;   --bot: 100%;  --h: 31%; animation-delay: .78s; }

.l-text { animation: lineRise 1s var(--ease-out) both; }

@keyframes lineRise {
  from {
    transform: translateY(var(--h));
    clip-path: inset(calc(var(--top) - var(--h)) 0 calc(100% - var(--bot) + var(--h)) 0);
  }
  to {
    transform: translateY(0);
    clip-path: inset(var(--top) 0 calc(100% - var(--bot)) 0);
  }
}

/* A single light sweep across the gold lettering */
.l-sheen {
  pointer-events: none;
  background: linear-gradient(110deg, transparent 38%, rgba(255, 246, 228, .95) 50%, transparent 62%);
  background-size: 300% 100%;
  background-repeat: no-repeat;
  background-position: 100% 0;
  -webkit-mask-image: url("../assets/img/logo-the.webp"), url("../assets/img/logo-atl.webp"), url("../assets/img/logo-warriors.webp");
          mask-image: url("../assets/img/logo-the.webp"), url("../assets/img/logo-atl.webp"), url("../assets/img/logo-warriors.webp");
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  opacity: 0;
  animation: sheen 1.15s ease-in-out 1.55s both;
}

@keyframes sheen {
  0%   { opacity: 1; background-position: 100% 0; }
  100% { opacity: 1; background-position: 0% 0; }
}

.splash-tagline {
  margin: 9% 0 0;
  padding-left: .24em; /* balances trailing letter-spacing */
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(10px, 3.2vw, 17px);
  letter-spacing: .24em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--gold);
  animation: tagIn 1.3s var(--ease-out) 1.3s both;
}

@keyframes tagIn {
  from { opacity: 0; letter-spacing: .5em; filter: blur(4px); }
  to   { opacity: 1; letter-spacing: .24em; filter: blur(0); }
}

.splash-progress {
  position: absolute;
  left: 50%;
  bottom: calc(11vh + var(--safe-b));
  width: min(56vw, 320px);
  height: 3px;
  border-radius: 3px;
  overflow: hidden;
  transform: translateX(-50%);
  background: rgba(191, 168, 136, .16);
  box-shadow: 0 0 0 1px rgba(191, 168, 136, .12);
  opacity: 0;
  animation: fadeIn .5s ease .35s forwards;
}

.splash-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a8916f, var(--gold-soft));
  transform-origin: left center;
  transform: scaleX(0);
  animation: load 2.1s cubic-bezier(.65, 0, .35, 1) .45s forwards;
}

@keyframes load    { to { transform: scaleX(1); } }
@keyframes fadeIn  { to { opacity: 1; } }
@keyframes glowIn  { to { opacity: 1; } }

.splash.is-leaving { animation: splashOut .75s cubic-bezier(.7, 0, .3, 1) forwards; pointer-events: none; }

@keyframes splashOut {
  to { opacity: 0; transform: scale(1.05); filter: blur(3px); }
}

/* ==========================================================
   Shared screen entrance
   ========================================================== */

.screen.enter .rise {
  animation: rise .8s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 70ms + 60ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ==========================================================
   LOGIN  (design "D5")
   The whole photo sits top-right at its real proportions. The logo,
   title and inputs are on the left; the inputs reach ~40px onto the
   photo. A full-width button + sign-up link sit near the bottom.
   Units: cqw / cqh = 1% of the stage width / height.
   ========================================================== */

.login-stage {
  position: relative;
  height: 100%;
  width: min(100%, 520px);          /* phones: full width; iPad / desktop: a phone-width column */
  margin: 0 auto;
  container-type: size;
  overflow: hidden;
}

/* The photo: as wide as 60.5% of the screen, but never so tall that it
   runs into the button area. */
.login-photo {
  --pw: min(60.56cqw, calc((100cqh - 170px) / 2.8174));
  position: absolute;
  top: 0;
  right: 0;
  width: var(--pw);
  height: auto;
  max-width: none;
  pointer-events: none;
}

.screen.enter .login-photo { animation: photoIn 1.2s var(--ease-out) both; }

@keyframes photoIn {
  from { opacity: 0; transform: translateX(5%); }
  to   { opacity: 1; transform: none; }
}

.login-body {
  /* same photo width as above, so the inputs can line up with it */
  --pw: min(60.56cqw, calc((100cqh - 170px) / 2.8174));
  --side: 5.6cqw;
  /* input width: from the left margin to 40px past where the picture starts */
  --fw: min(calc(100cqw - var(--pw) * .8515 + 40px - var(--side)), calc(100cqw - var(--side) * 2));
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: max(calc(var(--safe-t) + 18px), 14.8cqh) var(--side) calc(var(--safe-b) + max(16px, 3.6cqh));
  overflow-y: auto;
  scrollbar-width: none;
}
.login-body::-webkit-scrollbar { display: none; }

.login-logo { width: clamp(128px, 38cqw, 176px); margin-left: 2px; flex: none; }

.login-head { margin-top: clamp(28px, 10.8cqh, 110px); }

.eyebrow {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--gold);
}

.login-title {
  margin: 4px 0 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(44px, 12.7cqw, 58px);
  line-height: .9;
  white-space: nowrap;
  text-transform: uppercase;
}

.login-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: clamp(20px, 4.7cqh, 48px);
}

.field { display: block; width: var(--fw); margin-bottom: clamp(14px, 2.35cqh, 22px); }

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 500;
}

.field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font: 500 16px/1 var(--f-body); /* 16px stops iOS zoom-on-focus */
  color: #111;
  background-color: #d8d6d2;
  background-image: linear-gradient(#e2e0dc, #cfccc7);
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 10px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .18), 0 6px 18px rgba(0, 0, 0, .45);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: box-shadow .2s;
}

.field input:focus {
  background-color: #f1efeb;
  background-image: none;
  box-shadow: 0 0 0 3px rgba(191, 168, 136, .7), 0 6px 18px rgba(0, 0, 0, .45);
}

.field.is-invalid input { box-shadow: 0 0 0 3px rgba(214, 86, 74, .8); }
.field.shake { animation: shake .4s; }

@keyframes shake {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 48px; }

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 3px;
  width: 42px;
  height: 40px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  color: #161616;
}

.pw-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pw-toggle .i-eye-off { display: none; }
.pw-toggle[aria-pressed="true"] .i-eye { display: none; }
.pw-toggle[aria-pressed="true"] .i-eye-off { display: block; }

.forgot {
  width: var(--fw);
  margin: -4px 0 24px;               /* 24px = minimum gap above the button */
  padding: 6px 0;
  text-align: center;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-underline-offset: 3px;
}

/* full width, pushed to the bottom of the form area */
.btn-primary {
  position: relative;
  width: 100%;
  height: 56px;
  margin-top: auto;
  border-radius: 14px;
  background: var(--white);
  color: #0a0a0a;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .07em;
  text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  transition: transform .15s ease;
}

.btn-primary:active { transform: scale(.98); }
.btn-primary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.btn-spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid rgba(0, 0, 0, .15);
  border-top-color: #0a0a0a;
  opacity: 0;
}

.btn-primary.is-loading .btn-text { opacity: 0; }
.btn-primary.is-loading .btn-spinner { opacity: 1; animation: spin .7s linear infinite; }

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

.newhere {
  margin: 22px 0 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.newhere a { text-underline-offset: 4px; white-space: nowrap; }

.install-chip {
  align-self: center;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(191, 168, 136, .55);
  background: rgba(7, 7, 7, .7);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.install-chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================
   LEGAL LINE (login, join, more)
   ========================================================== */
.legal {
  margin: 30px 0 4px;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.6;
  letter-spacing: .02em;
  color: #6f6a62;
}
.legal p { margin: 0; }
.legal a { color: #8f877b; text-underline-offset: 3px; }
.legal .dot { margin: 0 6px; }
.legal--login { margin: 18px 0 0; font-size: 11px; }

/* ==========================================================
   iOS install sheet + toast
   ========================================================== */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  animation: fadeIn .25s ease both;
  opacity: 0;
}

.sheet {
  width: min(100%, 520px);
  padding: 10px 24px calc(var(--safe-b) + 24px);
  background: #121212;
  border: 1px solid rgba(191, 168, 136, .25);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  text-align: center;
  animation: sheetUp .45s var(--ease-out) both;
}

@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }

.sheet-grip { width: 40px; height: 4px; margin: 0 auto 18px; border-radius: 4px; background: #3a3a3a; }
.sheet-icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 15px; border: 1px solid #2a2a2a; }
.sheet h3 { margin: 0; font-family: var(--f-display); font-size: 24px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.sheet-lede { margin: 6px 0 18px; color: #bdbdbd; font-size: 15px; line-height: 1.45; }

.sheet-steps { list-style: none; margin: 0 0 6px; padding: 0; text-align: left; }
.sheet-steps li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid #222; font-size: 15px; line-height: 1.4; }
.step-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #111; font-weight: 700; font-size: 14px; }
.inline-ic { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; margin: 0 2px; fill: none; stroke: #4c9bff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btn-primary--dark { margin-top: 16px; height: 52px; font-size: 19px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-b) + 26px);
  z-index: 90;
  max-width: calc(100% - 40px);
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(22, 22, 22, .96);
  border: 1px solid rgba(191, 168, 136, .4);
  color: #f2f2f2;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .35s var(--ease-out);
}

.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================
   Reduced motion
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
  .l-arm, .l-text, .splash-tagline, .splash-glow {
    animation: fadeIn .6s ease both !important;
    opacity: 0;
    clip-path: none !important;
    filter: none !important;
    transform: none !important;
  }
  .l-sheen { display: none; }
  .screen.enter .rise,
  .screen.enter .login-photo { animation: fadeIn .4s ease both !important; opacity: 0; transform: none; }
  .splash.is-leaving { animation: fadeOut .4s ease forwards; }
  @keyframes fadeOut { to { opacity: 0; } }
}
