/* ============================================================
   LOGIN MODULE — ATLETIKA · The Fantasy of Athletics
   Shared by the Maqueta (static mock) and the front-end /login.
   All classes prefixed login- to avoid collisions.
   ============================================================ */

.login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: #ffffff;
}

/* ===== Split grid: brand hero (left) + auth (right) ===== */

.login__grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* Each column keeps its own height: the login never stretches to follow
     the presentation panel. */
  align-items: start;
}

/* ---------------- Left panel (brand hero + how it works) ---------------- */

.login__left {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 48px;
  color: #fff;
  background: linear-gradient(165deg, #0f0f23 0%, #123a57 70%, #1a5276 115%);
}

/* track-lane stripes */
.login__left::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.045) 0,
    rgba(255, 255, 255, 0.045) 1px,
    transparent 1px,
    transparent 36px
  );
}

/* diagonal orange streak */
.login__left::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -22%;
  width: 70%;
  height: 160%;
  background: linear-gradient(200deg, transparent 40%, rgba(212, 86, 42, 0.28) 100%);
  transform: rotate(18deg);
}

.login__hero {
  position: relative;
  width: 100%;
  max-width: 720px;
}

.login__hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.login__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.login__brand-badge {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #d4562a, #e2724a);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(212, 86, 42, 0.35);
}

.login__brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
}

.login__brand-name .login__brand-accent {
  color: #e2724a;
}

.login__brand-name small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.34em;
  color: #fb923c;
  margin-top: 3px;
}

.login__wordmark {
  font-size: 58px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.02;
}

.login__wordmark-accent {
  color: #e2724a;
}

.login__tagline {
  display: inline-block;
  margin: 10px 0 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #fb923c;
}

.login__hero-title {
  max-width: none;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.45;
  color: #e2e8f0;
  margin-bottom: 22px;
}

/* ---------------- Auth (right) ---------------- */

.login__auth {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: #ffffff;
}

.login__auth-inner {
  width: 100%;
  max-width: 400px;
}

.login__welcome {
  margin-bottom: 28px;
}

.login__welcome-sub {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #d4562a;
  margin-bottom: 8px;
}

.login__welcome-title {
  font-size: 26px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.25;
}

.login__welcome-note {
  font-size: 14px;
  color: #64748b;
  margin-top: 10px;
  line-height: 1.55;
}

/* Language toggle (shared EN / ES) */
.login__lang {
  position: absolute;
  top: 22px;
  right: 24px;
  display: flex;
  gap: 6px;
}

.login__lang-btn {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #dbe3ed;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.login__lang-btn.is-active {
  background: #0f0f23;
  border-color: #0f0f23;
  color: #ffffff;
}

.login__field {
  margin-bottom: 18px;
}

.login__pass-wrap .login-page__input {
  padding-right: 44px;
}

.login__pass-wrap {
  position: relative;
}

.login__pass-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  color: #64748b;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.login__pass-toggle:hover {
  color: #334155;
  background: rgba(15, 23, 42, 0.06);
}

.login__pass-toggle.is-active {
  color: #d4562a;
}

.login__pass-toggle:focus-visible {
  outline: 2px solid #d4562a;
  outline-offset: 2px;
}

.login__error {
  display: none;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 12px;
}

.login__error.is-visible {
  display: block;
}

.login__forgot {
  text-align: right;
  margin-top: 11px;
}

.login__forgot-btn {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.login__forgot-btn:hover {
  color: #d4562a;
}

.login__btn.is-disabled,
.login__forgot-btn.is-disabled,
.login__btn-secondary.is-disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.login__forgot-btn.is-disabled:hover {
  color: #64748b;
}

.login__btn-secondary.is-disabled:hover {
  border-color: #cbd5e1;
  color: #334155;
  background: #ffffff;
}

.login__divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.login__divider::before,
.login__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.login__register-note {
  font-size: 14px;
  color: #64748b;
  text-align: center;
  margin-bottom: 14px;
}

.login__btn-secondary {
  width: 100%;
  padding: 13px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #334155;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.login__btn-secondary:hover {
  border-color: #d4562a;
  color: #d4562a;
  background: #fff7ed;
}

/* ===== How it works (in hero) ===== */

.login__how--hero {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  background: transparent;
  border: none;
  padding: 0;
}

.login__how--hero .login__how-head {
  text-align: left;
  margin-bottom: 14px;
}

.login__how--hero .login__how-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #d4562a;
  margin-bottom: 6px;
}

.login__how--hero .login__how-title {
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
}

.login__how--hero .login__how-sub {
  color: #cbd5e1;
  margin-top: 6px;
  font-size: 13px;
}

.login__steps {
  display: grid;
  gap: 16px;
}

.login__step {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.login__step-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(212, 86, 42, 0.1);
  color: #d4562a;
  margin-bottom: 12px;
}

.login__step-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #94a3b8;
  margin-bottom: 6px;
}

.login__step-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.login__step-text {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

/* ===== Solo auth page (no brand/hero panel -- Create League) ===== */
.login__auth--solo { width: 100%; }

/* Own note/sub text, deliberately NOT .login__welcome-sub/-note -- those
   get display:none under 768px on the login/register pages (correct
   there, since the blue hero panel already carries that context on
   mobile) which would silently swallow this page's own copy, including
   the generated invite code's share hint. */
.lg-page-note { font-size: 14px; color: #64748b; margin-top: 10px; line-height: 1.55; }

.lg-page-code {
  display: inline-block; font-size: 26px; font-weight: 800; letter-spacing: 0.15em;
  color: #1e293b; background: #fff; border: 1px solid var(--color-primary);
  border-radius: 10px; padding: 10px 20px; margin: 14px 0 4px;
}
.lg-page-hint { font-size: 12px; }
.lg-page-btn-link { margin-top: 16px; }
.lg-page-code-input { text-transform: uppercase; letter-spacing: 0.2em; text-align: center; font-weight: 700; }

/* ===== Footer ===== */

.login__footer {
  background: #0f0f23;
  color: #94a3b8;
  padding: 18px 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.login__footer strong {
  color: #e2e8f0;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.login__footer-accent {
  color: #fb923c;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.login__footer .login__footer-tag {
  color: #94a3b8;
  letter-spacing: 0.22em;
  font-weight: 600;
  font-size: 11px;
  margin-left: 14px;
}

/* ============================================================
   Responsive
   ============================================================ */

/* Tablet: rebalance columns */
@media (min-width: 769px) {
  .login__how--hero .login__steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1079px) and (min-width: 769px) {
  .login__grid {
    grid-template-columns: 44fr 56fr;
  }

  .login__left {
    padding: 44px 32px;
  }

  .login__wordmark {
    font-size: 50px;
  }

  .login__hero-title {
    font-size: 19px;
    margin-bottom: 18px;
  }

  .login__auth {
    padding: 40px 28px;
  }
}

/* Desktop: rebalance split 60/40 to give steps + welcome title more usable width */
@media (min-width: 1200px) {
  .login__grid {
    grid-template-columns: 3fr 2fr;
  }

  .login__left {
    padding: 40px 32px;
  }

  .login__auth-inner {
    max-width: 440px;
  }
}

/* Mobile: single column — compact brand header, login, then how it works */
@media (max-width: 768px) {
  .login__grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .login__left {
    display: contents;
  }

  /* Compact header: drop the decorative stripes/streak, its rotation
     would overflow horizontally once display: contents hoists it */
  .login__left::before,
  .login__left::after {
    display: none;
  }

  /* Compact brand header: identity only */
  .login__hero {
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    padding: 24px 24px 28px;
    text-align: center;
    background: linear-gradient(165deg, #0f0f23 0%, #123a57 70%, #1a5276 115%);
  }

  .login__hero-inner {
    max-width: 440px;
  }

  .login__brand,
  .login__hero-title {
    display: none;
  }

  .login__wordmark {
    font-size: 40px;
  }

  .login__tagline {
    font-size: 12px;
    letter-spacing: 0.3em;
    margin: 8px 0 0;
  }

  /* Login right after the brand header */
  .login__auth {
    order: 2;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 0;
    padding: 24px 24px 16px;
  }

  /* EN / ES: stable position inside the login block, before the title.
     Never overlaps the welcome title and never jumps between positions. */
  .login__lang {
    position: static;
    margin-bottom: 14px;
  }

  .login__welcome {
    text-align: center;
    margin-bottom: 14px;
  }

  .login__welcome-sub,
  .login__welcome-note {
    display: none;
  }

  .login__welcome-title .login__welcome-prefix {
    display: block;
  }

  .login__field {
    margin-bottom: 12px;
  }

  .login__divider {
    margin: 14px 0;
  }

  .login__register-note {
    margin-bottom: 8px;
  }

  /* The game + how it works right after login */
  .login__how--hero {
    order: 3;
    width: 100%;
    max-width: none;
    padding: 20px 24px 48px;
    background: #ffffff;
    color: #1e293b;
  }

  .login__how--hero .login__how-head {
    text-align: center;
    margin-bottom: 20px;
  }

  .login__how--hero .login__how-eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 10px;
  }

  .login__how--hero .login__how-eyebrow::before,
  .login__how--hero .login__how-eyebrow::after {
    content: "";
    flex: 1;
    max-width: 60px;
    height: 1px;
    background: #e2e8f0;
  }

  .login__how--hero .login__how-title {
    color: #1e293b;
  }

  .login__how--hero .login__how-sub {
    display: none;
  }

  .login__how--hero .login__steps {
    grid-template-columns: 1fr;
  }

  .login__footer {
    padding: 22px 24px;
    gap: 10px;
  }

  .login__footer-brand {
    flex: 1 1 0;
  }

  .login__footer-tag {
    white-space: nowrap;
  }

  .login__footer-copy {
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: auto;
  }
}

/* Mobile footer: progressive typography/spacing so the brand block and the
   copyright stay on the same row as long as reasonably possible */
@media (max-width: 600px) {
  .login__footer {
    gap: 8px;
  }

  .login__footer .login__footer-tag {
    letter-spacing: 0.18em;
  }
}

/* Mobile footer: tighter sides below 450 so the copyright stays on the
   same row as the brand block without shrinking typography */
@media (max-width: 450px) {
  .login__footer {
    padding: 22px 18px;
  }

  .login__footer .login__footer-tag {
    margin-left: 0;
  }

  .login__footer-copy {
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  .login__footer .login__footer-tag {
    font-size: 10.5px;
  }
}

@media (max-width: 385px) {
  .login__footer .login__footer-tag {
    font-size: 10px;
    letter-spacing: 0.15em;
  }

  .login__footer-copy {
    font-size: 10.5px;
  }
}

@media (max-width: 350px) {
  .login__footer {
    padding: 22px 14px;
    gap: 6px;
  }
}

/* Very small phones */
@media (max-width: 374px) {
  .login__wordmark {
    font-size: 34px;
  }

  .login__hero {
    padding: 20px 18px 24px;
  }
}

/* Short desktop/tablet screens: compress spacing only, never the step
   typography. The presentation panel grows with its content and the page
   scrolls naturally; the login column is never cut. */
@media (min-width: 769px) and (max-height: 1100px) {
  .login__left {
    padding: 24px 24px;
  }

  .login__brand {
    margin-bottom: 16px;
  }

  .login__wordmark {
    font-size: 46px;
  }

  .login__tagline {
    margin: 8px 0 14px;
  }

  .login__hero-title {
    font-size: 16px;
    margin-bottom: 18px;
  }

  .login__how--hero .login__how-head {
    margin-bottom: 10px;
  }

  .login__how--hero .login__steps {
    gap: 10px;
  }

  .login__how--hero .login__step {
    padding: 12px;
  }

  .login__how--hero .login__step-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 6px;
  }

  .login__auth {
    padding: 28px 32px;
  }

  .login__welcome {
    margin-bottom: 18px;
  }

  .login__field {
    margin-bottom: 14px;
  }

  .login__divider {
    margin: 18px 0;
  }

  .login__register-note {
    margin-bottom: 10px;
  }

  .login__footer {
    padding: 14px 40px;
  }
}

/* Short two-column screens: the login sits naturally near the top instead of
   being forced into a perfect vertical center. Nothing is sacrificed for a
   mathematical center: the column grows past 100vh when the content needs it. */
@media (min-width: 769px) and (max-height: 700px) {
  .login__auth {
    align-items: flex-start;
  }
}
