/* ===== HOME PAGE LAYOUT ===== */

.home-page {
  background: radial-gradient(circle at top left, #04164b 0, #021233 40%, #020924 100%);
}

html {
  height: auto;
}

body.home-page {
  min-height: 100%;
  height: auto;
  display: block;
}

.page-content.home-page {
  flex: none;
  min-height: 0;
}

.home-page .footer {
  margin-top: 2rem;
}

.page-content.home-page {
  min-height: calc(100vh - var(--tpb-header-h, 56px));
}

@supports (height: 100dvh) {
  .page-content.home-page {
    min-height: calc(100dvh - var(--tpb-header-h, 56px));
  }
}

@supports (height: 100svh) {
  .page-content.home-page {
    min-height: calc(100svh - var(--tpb-header-h, 56px));
  }
}

body.home-page.tpb-auth-logged-out .mobile-bottom-nav,
body.home-page.tpb-auth-logged-out .mobile-subnav,
body.home-page.tpb-auth-pending .mobile-bottom-nav,
body.home-page.tpb-auth-pending .mobile-subnav {
  display: none !important;
}

/* Main hero band */

.home-hero {
  padding: 3.5rem 1rem 3rem;
}

.home-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr);
  gap: 2.75rem;
  align-items: center;
}

.home-hero-left {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.home-hero-kicker {
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tpb-accent);
  margin: 0;
}

.home-hero-title {
  font-size: clamp(2.1rem, 3vw, 2.8rem);
  line-height: 1.1;
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-hero-title span {
  color: #ffbf00; /* gold */
}


.home-hero-lead {
  margin: 0;
  max-width: 34rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--tpb-muted);
}

/* Feature bullets */

.home-hero-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.home-hero-feature {
  background: rgba(0, 0, 0, 0.42);
  border-radius: 1rem;
  padding: 0.85rem 0.9rem;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.home-hero-feature h3 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  color: var(--tpb-text);
}

.home-hero-feature p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--tpb-muted);
}

/* Search card */

.home-search-card {
  margin-top: 0.5rem;
  background: radial-gradient(circle at top left, #061a4f, #020c29);
  border-radius: 1.2rem;
  padding: 1.1rem 1.1rem 1.0rem;
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.09);
}

.home-search-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.home-search-sub {
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
  color: var(--tpb-muted);
}

.home-search-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.home-search-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--tpb-muted);
}

.home-search-row {
  display: flex;
  gap: 0.6rem;
}

.home-search-input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.55);
  color: var(--tpb-text);
  padding: 0.6rem 0.9rem;
  font-size: 0.92rem;
  outline: none;
}

.home-search-input::placeholder {
  color: rgba(182, 190, 223, 0.8);
}

.home-search-input:focus-visible {
  border-color: var(--tpb-accent);
  box-shadow: 0 0 0 1px var(--tpb-accent);
}

.home-search-button {
  border-radius: 999px;
  border: 1px solid rgba(82, 199, 255, 0.9);
  background: linear-gradient(135deg, #1f9fff, #52c7ff);
  color: #021233;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.08s ease-out,
    box-shadow 0.16s ease-out,
    filter 0.16s ease-out;
}

.home-search-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
}

.home-search-button:active {
  transform: translateY(0);
  box-shadow: none;
}

.home-search-footer {
  margin-top: 0.35rem;
}

.home-search-link {
  font-size: 0.85rem;
  color: var(--tpb-accent);
  text-decoration: none;
}

.home-search-link:hover {
  text-decoration: underline;
}

/* Right-hand illustration */

.home-hero-right {
  display: flex;
  justify-content: center;
}

.home-hero-illustration {
  position: relative;
  max-width: 420px;
  width: 100%;
  padding: 0.5rem;
}

.home-hero-illustration::before {
  content: "";
  position: absolute;
  inset: 12% 8%;
  border-radius: 2rem;
  background: radial-gradient(circle at top, rgba(82, 199, 255, 0.08), transparent 60%);
  filter: blur(6px);
  z-index: 0;
}

/* Animated float wrapper */
.home-hero-illustration-inner {
  position: relative;
  z-index: 1;
  border-radius: 1.8rem;
  overflow: hidden;
  background: radial-gradient(circle at top, #05184a, #020b26);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: heroFloat 7s ease-in-out infinite;
}

.home-hero-image {
  display: block;
  width: 100%;
  height: auto;
}

/* Float animation for the hero image */
@keyframes heroFloat {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Secondary section */

.home-secondary {
  padding: 1.5rem 1rem 3rem;
}

.home-secondary-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.home-secondary-card {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 1.1rem;
  padding: 1.1rem 1.1rem 1.0rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
}

.home-secondary-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.98rem;
}

.home-secondary-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--tpb-muted);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 900px) {
  .home-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.4rem;
  }

  .home-hero-right {
    order: -1; /* show illustration first on smaller screens if you prefer */
  }

  .home-hero {
    padding-top: 2.4rem;
  }

  .home-hero-features {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .home-hero {
    padding: 2.2rem 1rem 2.4rem;
  }

  .home-hero-title {
    font-size: 2.0rem;
  }

  .home-search-row {
    flex-direction: column;
  }

  .home-search-button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .home-secondary-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-secondary {
    padding-bottom: 2.4rem;
  }
}
.home-search-results {
  margin-top: 0.4rem;
  border-radius: 0.8rem;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85);
  max-height: 260px;
  overflow-y: auto;
  display: none; /* hidden until we have results */
}

.home-search-result-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.5rem 0.8rem;
  font-size: 0.88rem;
  cursor: pointer;
  gap: 0.6rem;
}

.home-search-result-item:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.home-search-result-item:hover {
  background: rgba(82, 199, 255, 0.12);
}

.home-search-result-name {
  color: var(--tpb-text);
}

.home-search-result-club {
  color: var(--tpb-muted);
  font-size: 0.8rem;
}
/* --- Scroll-in animation for feature + secondary boxes --- */

/* Only apply the hidden state when JS is enabled */
body.js .home-hero-feature,
body.js .home-secondary-card {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.45s ease-out,
    transform 0.45s ease-out;
}

/* Staggered delays for the three hero features only */
body.js .home-hero-feature:nth-child(1) {
  transition-delay: 0.010s;
}
body.js .home-hero-feature:nth-child(2) {
  transition-delay: 0.24s;
}
body.js .home-hero-feature:nth-child(3) {
  transition-delay: 0.38s;
}

/* When any animated card becomes visible */
body.js .home-hero-feature.is-visible,
body.js .home-secondary-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile/desktop illustration switching */
.home-hero-illustration-mobile {
  display: none;        /* hidden by default (desktop) */
  margin-top: 1.2rem;
  margin-bottom: 0.8rem;
}

/* desktop illustration uses existing styles */

/* ===== RESPONSIVE ===== */

@media (max-width: 900px) {
  .home-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.4rem;
  }

  /* Hide the right-hand illustration on mobile */
  .home-hero-right {
    display: none;
  }

  /* Show the mobile version inside the left column */
  .home-hero-illustration-mobile {
    display: block;
  }

  .home-hero {
    padding-top: 2.4rem;
  }

  .home-hero-features {
    grid-template-columns: minmax(0, 1fr);
  }
}

.home-search-result-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
}

.home-search-result-avatar-wrap {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  background: #111623;
}

.home-search-result-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-search-result-text {
  display: flex;
  flex-direction: column;
}

.home-search-result-name {
  font-weight: 500;
}

.home-search-result-club {
  font-size: 0.82rem;
  opacity: 0.8;
}

/* === Home search result layout === */

.home-search-result-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;  /* keep everything to the left */
  gap: 0.75rem;
  padding: 0.45rem 0.75rem;
}

.home-search-result-avatar-wrap {
  flex: 0 0 2.1rem;             /* fixed width for avatar */
  height: 2.1rem;
  border-radius: 999px;
  overflow: hidden;
  background: #111623;
}

.home-search-result-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Text block sits immediately to the right of the avatar */
.home-search-result-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;            /* override any right alignment */
  flex: 1;
}

.home-search-result-name {
  font-weight: 500;
  font-size: 0.95rem;
}

.home-search-result-club {
  font-size: 0.8rem;
  opacity: 0.85;
}
