/* ═══════════════════════════════════════════════════════════
   Crew Invite Banner — injected at top of splash page
   for ?joinCrew= links. Sits inline so the full splash
   page remains scrollable underneath.
   ═══════════════════════════════════════════════════════════ */

/* ── Banner section — flows naturally above .splash-hero ── */
.invite-banner-section {
  position: relative;
  z-index: 10;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 16px;
}

.invite-banner-inner {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0 40px;
}

/* ── Loading state ── */
.invite-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

/* ── Banner image (crew cover photo) ── */
.invite-banner-img {
  width: 100%;
  max-width: 400px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: -30px;
  z-index: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.invite-banner-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

/* ── Main invite card — frosted glass ── */
.invite-banner-section .invite-card {
  position: relative;
  z-index: 1;
  width: 100%;
  background: rgba(18,22,36,.75);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 36px 28px 28px;
  text-align: center;
  box-shadow:
    0 4px 24px rgba(0,0,0,.3),
    0 0 0 1px rgba(255,255,255,.03) inset;
}

/* ── Crew emoji ── */
.invite-emoji {
  font-size: 56px;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.3));
  animation: invite-emoji-pop .6s cubic-bezier(.34,1.56,.64,1);
}
@keyframes invite-emoji-pop {
  0% { opacity: 0; transform: scale(0.5) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Invited by line ── */
.invite-invited-by {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}

/* ── Crew name ── */
.invite-crew-name {
  font-size: clamp(24px, 6vw, 32px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #fff 30%, rgba(255,255,255,.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Tagline ── */
.invite-tagline {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 20px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Members section ── */
.invite-members {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.invite-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
}

.invite-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(18,22,36,.9);
  overflow: hidden;
  margin-left: -8px;
  position: relative;
  background: linear-gradient(135deg, rgba(124,156,255,.3), rgba(167,139,250,.3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  transition: transform .2s ease;
}
.invite-avatar:first-child { margin-left: 0; }
.invite-avatar:hover { transform: scale(1.1); z-index: 2; }

.invite-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.invite-avatar-initials {
  text-transform: uppercase;
}

.invite-avatar-more {
  background: rgba(255,255,255,.1);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.invite-member-count {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* ── Linked event badge ── */
.invite-event {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}
.invite-event-icon { font-size: 14px; }
.invite-event-name { color: var(--accent); }

/* ── Join CTA ── */
.invite-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: center;
  background: rgba(18,12,28,.88);
  color: #fff;
  border: 1px solid rgba(255,179,71,.2);
  border-radius: 14px;
  padding: 16px 28px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all .4s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 0 6px rgba(255,179,71,.08), 0 4px 16px rgba(0,0,0,.4);
}

/* Holographic wash — same as splash CTA */
.invite-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background:
    radial-gradient(ellipse 120% 80% at 20% 50%, rgba(255,179,71,.12), transparent 50%),
    radial-gradient(ellipse 100% 80% at 80% 50%, rgba(255,126,179,.10), transparent 50%),
    radial-gradient(ellipse 80% 60% at 50% 80%, rgba(168,180,248,.08), transparent 50%);
  background-size: 200% 200%;
  animation: invite-cta-wash 6s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}
@keyframes invite-cta-wash {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.invite-cta:hover {
  border-color: rgba(255,179,71,.35);
  box-shadow: 0 0 20px rgba(255,179,71,.15), 0 4px 16px rgba(0,0,0,.4);
  transform: translateY(-1px);
}
.invite-cta:active {
  transform: translateY(0) scale(0.98);
}

.invite-cta-sub {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 0;
  font-weight: 500;
}

/* ── Branding footer ── */
.invite-branding {
  margin-top: 32px;
  text-align: center;
  padding: 0 10px;
  opacity: .7;
  transition: opacity .3s;
}
.invite-branding:hover { opacity: 1; }

.invite-brand-logo {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
}
.invite-brand-vita {
  background: linear-gradient(90deg, #ffb347 0%, #f5944a 20%, #ff7eb3 40%, #e87bc8 55%, #c98ef0 72%, #a8b4f8 88%, #5ce0d6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.invite-brand-blurb {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 340px;
  margin: 0 auto;
}

/* ── Scroll hint — nudges visitors to scroll down ── */
.invite-scroll-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  opacity: .6;
  animation: invite-scroll-bounce 2.5s ease-in-out infinite;
}
.invite-scroll-hint svg {
  opacity: .7;
}
@keyframes invite-scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ── Mobile responsive ── */
@media (max-width: 480px) {
  .invite-banner-inner {
    padding: 40px 0 28px;
  }
  .invite-banner-section .invite-card {
    padding: 28px 20px 24px;
    border-radius: 16px;
  }
  .invite-emoji { font-size: 48px; }
  .invite-crew-name { font-size: 24px; }
  .invite-banner-img img { height: 140px; }
  .invite-avatar { width: 32px; height: 32px; }
}

@media (max-width: 360px) {
  .invite-banner-section .invite-card {
    padding: 24px 16px 20px;
  }
  .invite-cta {
    padding: 14px 20px;
    font-size: 15px;
  }
}

@media (max-height: 600px) {
  .invite-banner-inner {
    padding-top: 20px;
  }
  .invite-emoji { font-size: 40px; margin-bottom: 8px; }
}

/* ═══════════════════════════════════════════════════════════
   Friend Invite Banner — shown for ?ref= / ?fc= referral links.
   Similar pattern to crew invite but simpler/smaller.
   ═══════════════════════════════════════════════════════════ */
.friend-invite-banner {
  padding: 100px 24px 30px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,107,157,.06) 0%, transparent 100%);
  animation: friendInviteFadeIn .6s cubic-bezier(.16,1,.3,1) both;
}
@keyframes friendInviteFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.friend-invite-inner {
  max-width: 400px;
  margin: 0 auto;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border-light, #2a3650);
  border-radius: 20px;
  padding: 28px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.friend-invite-avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--vita-i, #ff6b9d);
  box-shadow: 0 0 20px rgba(255,107,157,.2);
}
.friend-invite-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.friend-invite-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--vita-v, #ffb347), var(--vita-i, #ff6b9d));
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

.friend-invite-text h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text, #f0f2f8);
  margin-bottom: 6px;
}
.friend-invite-name {
  background: linear-gradient(135deg, var(--vita-v, #ffb347), var(--vita-i, #ff6b9d));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.friend-invite-text p {
  font-size: 14px;
  color: var(--muted, #7b8ba5);
  margin-bottom: 20px;
  line-height: 1.5;
}

.friend-invite-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--vita-i, #ff6b9d), var(--vita-t, #c471ed));
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s ease;
  box-shadow: 0 4px 16px rgba(255,107,157,.25);
}
.friend-invite-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 6px 24px rgba(255,107,157,.35);
}

@media (max-width: 480px) {
  .friend-invite-banner { padding: 80px 16px 20px; }
  .friend-invite-inner { padding: 24px 18px; }
  .friend-invite-avatar { width: 60px; height: 60px; }
  .friend-invite-text h3 { font-size: 16px; }
  .friend-invite-cta { padding: 12px 22px; font-size: 14px; }
}

/* ═══════════════════════════════════════════════════════════
   Crew Invite Landing Page — full-page crew-specific invite
   shown when a guest visits /crew/CODE directly.
   Google Docs "Request Access" style.
   ═══════════════════════════════════════════════════════════ */

.crew-invite-landing {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 40px;
  overflow: hidden;
}

/* Ambient glow background */
.crew-invite-landing-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 30% 20%, rgba(102,126,234,.12), transparent 60%),
    radial-gradient(ellipse 60% 50% at 70% 70%, rgba(168,85,247,.10), transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(236,72,153,.06), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Blurred banner image bg */
.cil-banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(40px) brightness(0.3);
  opacity: 0.5;
  z-index: 0;
}

/* Gradient overlay behind card */
.cil-gradient-bg {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  z-index: 0;
}

/* Main card */
.crew-invite-landing-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  text-align: center;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  padding: 40px 32px 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 40px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.04) inset;
}

/* Loading state */
.crew-invite-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

/* Emoji */
.cil-emoji {
  margin-bottom: 16px;
  line-height: 1;
}

/* Crew name */
.cil-crew-name {
  font-size: 28px;
  font-weight: 800;
  color: var(--text, #f0f2f8);
  margin: 0 0 8px;
  line-height: 1.2;
}

/* Tagline */
.cil-tagline {
  font-size: 14px;
  color: var(--muted, #7b8ba5);
  margin: 0 0 20px;
  line-height: 1.5;
}

/* Members section */
.cil-members-section {
  margin-bottom: 20px;
}

.cil-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 8px;
}

.cil-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--bg, #0d1117);
  margin-left: -8px;
  flex-shrink: 0;
}
.cil-avatar:first-child { margin-left: 0; }

.cil-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cil-avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.cil-avatar-more {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.1);
  color: var(--muted, #7b8ba5);
  font-size: 11px;
  font-weight: 700;
}

.cil-member-count {
  font-size: 13px;
  color: var(--muted, #7b8ba5);
  font-weight: 500;
  margin: 0;
}

/* Inviter row — photo + "X invited you to join" */
.cil-inviter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
}
.cil-inviter-photo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.15);
  flex-shrink: 0;
}
.cil-inviter-initial {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.15);
}
.cil-inviter-row .cil-invite-context {
  margin: 0;
}

/* Invite context text */
.cil-invite-context {
  font-size: 15px;
  color: var(--text-secondary, #c0c8d8);
  margin: 0 0 20px;
  font-weight: 500;
}
.cil-invite-context strong {
  color: #fff;
}

/* Expired / maxed out invite */
.cil-invite-expired {
  color: #f87171;
  font-style: italic;
}

/* Disabled CTA button */
.cil-cta-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.5);
  box-shadow: none;
}

/* Primary CTA — sign in to join */
.cil-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #f97316 0%, #ec4899 50%, #a855f7 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .3s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 4px 20px rgba(249,115,22,.25), 0 2px 8px rgba(0,0,0,.3);
}
.cil-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(249,115,22,.35), 0 2px 8px rgba(0,0,0,.3);
  filter: brightness(1.08);
}
.cil-cta-primary:active {
  transform: translateY(0) scale(0.98);
}
.cil-cta-primary svg {
  flex-shrink: 0;
}

/* Secondary actions row */
.cil-secondary-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.cil-cta-secondary {
  background: none;
  border: none;
  color: var(--muted, #7b8ba5);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 0;
  transition: color .2s;
}
.cil-cta-secondary:hover {
  color: var(--text, #f0f2f8);
}

.cil-separator {
  color: rgba(255,255,255,.15);
  font-size: 14px;
}

/* Branding footer */
.cil-branding {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: 32px;
  opacity: .6;
  transition: opacity .3s;
}
.cil-branding:hover { opacity: 1; }

.cil-brand-logo {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text, #f0f2f8);
}
.cil-brand-vita {
  background: linear-gradient(90deg, #ffb347 0%, #f5944a 20%, #ff7eb3 40%, #e87bc8 55%, #c98ef0 72%, #a8b4f8 88%, #5ce0d6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cil-brand-blurb {
  font-size: 12px;
  color: var(--muted, #7b8ba5);
  line-height: 1.5;
}

/* ── Mobile responsive ── */
@media (max-width: 480px) {
  .crew-invite-landing {
    padding: 40px 16px 32px;
  }
  .crew-invite-landing-card {
    padding: 32px 20px 24px;
    border-radius: 20px;
  }
  .cil-crew-name { font-size: 24px; }
  .cil-cta-primary { font-size: 15px; padding: 14px 20px; }
  .cil-avatar { width: 32px; height: 32px; margin-left: -6px; }
}

@media (max-width: 360px) {
  .crew-invite-landing-card {
    padding: 28px 16px 20px;
  }
  .cil-crew-name { font-size: 22px; }
  .cil-cta-primary { font-size: 14px; padding: 13px 16px; }
}
