/* clutchwatch landing page — guest gate. All copy lowercase by brand law. */

/* ── Auth-state gating ───────────────────────────────────────────────────
   While we resolve /api/me, hide the app chrome so guests never flash content
   and logged-in users never flash the landing. landing.js swaps the body class
   to v2-guest (show landing) or v2-authed (show app). */
body.v2-auth-checking .v2-content,
body.v2-auth-checking .v2-side-bar { visibility: hidden; }

#v2-landing { display: none; }
body.v2-guest #v2-landing { display: flex; }
body.v2-guest .v2-content,
body.v2-guest .v2-side-bar { display: none !important; }

/* ── Landing shell ───────────────────────────────────────────────────────
   The WHOLE page scrolls (header → modal → footer in normal flow); nothing is
   pinned. Background is the clutchhub arena (the app splash). */
#v2-landing {
  position: fixed;
  inset: 0;
  z-index: 9000;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background-color: #050505;
  /* Desktop = the landscape arena collage; mobile = the portrait clutchhub splash
     (overridden in the max-width:768px media query below). */
  background-image:
    linear-gradient(rgba(5, 5, 5, 0.66), rgba(5, 5, 5, 0.78)),
    url('/static/v2/img/landing-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  color: #fff;
  text-transform: lowercase;
}

/* Mobile: swap to the portrait arena splash (fits phones far better than the
   landscape collage). */
@media (max-width: 768px) {
  #v2-landing {
    background-image:
      linear-gradient(rgba(5, 5, 5, 0.66), rgba(5, 5, 5, 0.78)),
      url('/static/v2/img/splash.png');
  }
}

/* ── Header (in flow, not pinned, never overlaps the modal) ──────────────── */
.v2l-header {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
}

/* top-left brand badge — the cw_badge mark, scaled to header height */
.v2l-badge {
  height: 34px;
  width: auto;
  display: block;
}

/* top-right login — matches the app's primary login button (teal pill) */
.v2l-login {
  flex-shrink: 0;
  padding: 9px 20px;
  border-radius: 999px;
  background: #0d9488;
  border: 1px solid rgba(45, 212, 191, 0.6);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.2px;
  transition: background 0.15s ease;
}
.v2l-login:hover { background: #14b8a6; }
.v2l-login:active { background: #0f766e; }

/* ── Center modal — same chrome as the mobile app's main match panel ─────── */
.v2l-modal {
  width: 100%;
  max-width: 620px;
  margin: 24px auto 32px;
  /* App main-panel gradient at 0.2 opacity (arena reads through); light blur keeps the
     copy legible without darkening — remove backdrop-filter for pure 0.2. */
  background: linear-gradient(45deg,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(10, 10, 10, 0.2) 30%,
    rgba(26, 26, 26, 0.2) 70%,
    rgba(42, 42, 42, 0.2) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 40px 44px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-align: center;
}
.v2l-headline {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 14px;
  color: #fff;
}
.v2l-sub {
  font-size: 15px;
  line-height: 1.5;
  color: #2dd4bf;
  margin: 0 0 22px;
  font-weight: 500;
}
/* the middle block of copy is centered */
.v2l-body p {
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 14px;
  text-align: center;
}
.v2l-body p:last-of-type { margin-bottom: 0; }

/* store badges */
.v2l-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 28px;
}
.v2l-badges a { display: inline-flex; align-items: center; }
.v2l-badges img { width: auto; display: block; }
/* Apple's badge svg is tight; Google's png has built-in padding — size them so
   the actual buttons read the same height. */
.v2l-badges img.v2l-apple { height: 44px; }
.v2l-badges img.v2l-gp { height: 62px; margin: -8px 0; }

/* ── Footer (in flow at the very bottom — NOT pinned) ────────────────────── */
.v2l-footer {
  width: 100%;
  box-sizing: border-box;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.55);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  padding: 16px 32px;
  text-transform: lowercase;
}
.v2l-footer .v2l-foot-center { text-align: center; flex: 1; }
.v2l-footer a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
}
.v2l-footer a:hover {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
}
.v2l-footer .v2l-sep { margin: 0 8px; }

@media (max-width: 560px) {
  .v2l-modal { padding: 30px 22px; }
  .v2l-headline { font-size: 24px; }
  .v2l-badge { height: 30px; }
  .v2l-footer { justify-content: center; text-align: center; }
  .v2l-footer .v2l-foot-center { flex: 1 1 100%; order: 3; }
}
