/* =====================================================================
   BET REBEL — public site layer
   Header, hero, marketing sections, blog, auth screen, footer.
   Requires app.css.
   ===================================================================== */

/* ------------------------------ header ----------------------------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  background: var(--bar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

/* primary nav */
.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  position: relative;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color .18s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link.is-active { color: var(--primary-hi); }
.nav__link.is-active::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.site-header__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* mobile menu toggle */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}
.nav-toggle svg { width: 20px; height: 20px; }

/* mobile drawer */
.mobile-nav {
  position: fixed;
  inset: var(--nav-h) 0 auto;
  z-index: 99;
  background: var(--bar-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 20px;
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: all .26s var(--ease);
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}
.mobile-nav.is-open { transform: none; opacity: 1; visibility: visible; }
.mobile-nav__link {
  display: block;
  padding: 15px 12px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-dim);
}
.mobile-nav__link.is-active { color: var(--primary-hi); }
.mobile-nav .btn { margin-top: 18px; }

@media (max-width: 940px) {
  .nav { display: none; }
  .nav-toggle { display: grid; }
  .site-header__actions .btn--desktop { display: none; }
}

/* offset for the fixed header */
.page { padding-top: var(--nav-h); }


/* ------------------------------- hero ------------------------------ */
.hero {
  position: relative;
  padding-block: clamp(72px, 12vw, 148px) clamp(56px, 8vw, 96px);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 70% 55% at 50% -8%,  rgba(228, 38, 47, .22), transparent 62%),
    radial-gradient(ellipse 50% 42% at 88% 18%,  rgba(245, 185, 50, .1),  transparent 60%),
    radial-gradient(ellipse 60% 50% at 8% 42%,   rgba(228, 38, 47, .08),  transparent 62%),
    var(--bg);
}
.hero__grid {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse 70% 62% at 50% 22%, #000 25%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 22%, #000 25%, transparent 76%);
}

.hero h1 { margin-bottom: 22px; }
.hero h1 .line { display: block; }
.hero__lead { margin: 0 auto 34px; max-width: 60ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* the blinking cursor after the gradient headline */
.type-caret {
  display: inline-block;
  width: 3px;
  height: .82em;
  margin-left: 6px;
  vertical-align: text-bottom;
  background: var(--primary-hi);
  animation: caret 1.05s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* trust strip under the hero CTA */
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(28px, 6vw, 64px);
  margin-top: 52px;
  padding-top: 34px;
  border-top: 1px solid var(--border);
}
.hero__trust-item { text-align: center; }
.hero__trust-value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -.02em;
  background: linear-gradient(120deg, #fff, var(--text-dim));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__trust-label {
  font-size: .64rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); margin-top: 2px;
}


/* -------------------------- league strip --------------------------- */
.leagues {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}
.league-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 22px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-align: center;
  transition: all .2s var(--ease);
}
.league-card:hover {
  border-color: rgba(228,38,47,.35);
  transform: translateY(-4px);
  background: var(--surface-2);
}
.league-card__crest {
  width: 48px; height: 48px;
  border-radius: 13px;
  background: var(--crest-bg);
  display: grid; place-items: center;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: .95rem; font-weight: 800; color: #0B0D12;
}
.league-card__crest img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.league-card__name { font-size: .8rem; font-weight: 600; line-height: 1.35; }
.league-card__country { font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 700; }


/* --------------------------- feature grid -------------------------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.feature {
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: all .2s var(--ease);
  position: relative;
  overflow: hidden;
}
.feature:hover { border-color: rgba(228,38,47,.3); transform: translateY(-4px); }
.feature::before {
  content: '';
  position: absolute; inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .32s var(--ease);
}
.feature:hover::before { transform: scaleX(1); }
.feature h4 { margin-bottom: 8px; font-size: 1.02rem; }
.feature p { font-size: .88rem; color: var(--muted); line-height: 1.7; }


/* --------------------------- testimonials -------------------------- */
.testimonials {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-block: 6px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.testimonials::-webkit-scrollbar { display: none; }
.testimonial {
  flex: 0 0 clamp(272px, 34vw, 372px);
  scroll-snap-align: start;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
}
.testimonial__quote { font-size: .92rem; line-height: 1.75; color: var(--text-dim); flex: 1; }
.testimonial__author { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.testimonial__name { font-size: .88rem; font-weight: 600; }
.testimonial__role { font-size: .72rem; color: var(--faint); }

.carousel-dots { display: flex; justify-content: center; gap: 7px; margin-top: 18px; }
.carousel-dots button {
  width: 7px; height: 7px; border-radius: var(--r-pill);
  background: var(--surface-3);
  transition: all .22s var(--ease);
}
.carousel-dots button.is-active { width: 22px; background: var(--primary); }


/* ------------------------------- CTA ------------------------------- */
.cta-band {
  position: relative;
  padding: clamp(40px, 6vw, 64px);
  border-radius: var(--r-xl);
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 120% at 50% 0%, rgba(228,38,47,.22), transparent 62%),
    linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-strong);
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band .lead { margin: 0 auto 28px; }


/* ------------------------------ blog ------------------------------- */
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 960px) { .blog-layout { grid-template-columns: 1fr; } }

.post-card {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: all .2s var(--ease);
  margin-bottom: 18px;
}
.post-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.post-card__media {
  aspect-ratio: 16 / 11;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface-3);
}
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.05); }
.post-card__body { display: flex; flex-direction: column; }
.post-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.post-card__title { font-size: 1.18rem; line-height: 1.32; margin-bottom: 10px; }
.post-card__excerpt { font-size: .88rem; color: var(--muted); line-height: 1.7; }
.post-card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: auto; padding-top: 16px;
  font-size: .76rem; color: var(--faint);
}
.post-card__foot .row { gap: 6px; }
.post-card__foot svg { width: 14px; height: 14px; }

@media (max-width: 640px) {
  .post-card { grid-template-columns: 1fr; }
  .post-card__media { aspect-ratio: 16 / 9; }
}

/* sidebar widgets */
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; margin-bottom: 18px; }
.widget__title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.widget__title::before { content: ''; width: 3px; height: 17px; border-radius: 2px; background: var(--primary); }
.widget__list li + li { margin-top: 2px; }
.widget__list a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-sm);
  font-size: .86rem; color: var(--text-dim);
  transition: all .16s var(--ease);
}
.widget__list a:hover, .widget__list a.is-active { background: var(--primary-soft); color: var(--primary-hi); }
.widget__list .count { font-size: .74rem; color: var(--faint); }

.recent-post { display: flex; gap: 12px; padding: 10px 0; }
.recent-post + .recent-post { border-top: 1px solid var(--border); }
.recent-post__thumb {
  width: 58px; height: 58px; flex-shrink: 0;
  border-radius: var(--r-sm); overflow: hidden; background: var(--surface-3);
}
.recent-post__thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-post__title { font-size: .84rem; font-weight: 600; line-height: 1.4; }
.recent-post__date { font-size: .72rem; color: var(--faint); margin-top: 3px; }

/* single post typography */
.post-hero__media {
  aspect-ratio: 21 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-3);
  margin-bottom: 30px;
}
.post-hero__media img { width: 100%; height: 100%; object-fit: cover; }

.prose { font-size: 1rem; line-height: 1.85; color: var(--text-dim); }
.prose > * + * { margin-top: 1.3em; }
.prose h2 { font-size: 1.6rem; color: var(--text); margin-top: 1.9em; }
.prose h3 { font-size: 1.24rem; color: var(--text); margin-top: 1.7em; }
.prose a { color: var(--primary-hi); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul li { list-style: disc; margin-top: .5em; }
.prose ol li { list-style: decimal; margin-top: .5em; }
.prose img { border-radius: var(--r); margin-block: 1.6em; }
.prose blockquote {
  padding: 18px 24px;
  border-left: 3px solid var(--primary);
  background: var(--surface);
  border-radius: 0 var(--r) var(--r) 0;
  font-size: 1.05rem;
  color: var(--text);
  font-style: italic;
}
.prose code {
  font-family: var(--font-mono); font-size: .88em;
  padding: 2px 6px; border-radius: 5px;
  background: var(--surface-2); color: var(--gold);
}


/* ------------------------- auth (login page) ----------------------- */
.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.auth-screen__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 20% 12%, rgba(228,38,47,.2), transparent 60%),
    radial-gradient(ellipse 50% 50% at 84% 82%, rgba(245,185,50,.11), transparent 60%),
    var(--bg);
}

.auth-box {
  width: 100%;
  max-width: 1040px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.auth-box__aside {
  padding: 44px;
  background:
    radial-gradient(ellipse 100% 80% at 0% 0%, rgba(228,38,47,.16), transparent 60%),
    linear-gradient(160deg, rgba(245,185,50,.05), transparent 55%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

/* Narrow screens drop the marketing panel entirely so the form gets the
   full width. This block must stay AFTER the base rule above. */
@media (max-width: 880px) {
  .auth-box { grid-template-columns: 1fr; max-width: 480px; }
  .auth-box__aside { display: none; }
}
.auth-box__aside h2 { margin-block: 20px 26px; }
.auth-box__form { padding: clamp(28px, 4vw, 44px); }

.auth-perks { display: flex; flex-direction: column; gap: 16px; margin-bottom: auto; }
.auth-perk { display: flex; align-items: flex-start; gap: 13px; font-size: .88rem; color: var(--text-dim); }
.auth-perk__icon {
  width: 30px; height: 30px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary-hi);
}
.auth-perk__icon svg { width: 15px; height: 15px; }

.auth-stats { display: flex; gap: 26px; margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--border); }
.auth-stat__value { font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; }
.auth-stat__label { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  margin-bottom: 28px;
}
.auth-tab {
  flex: 1;
  padding: 11px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  transition: all .18s var(--ease);
}
.auth-tab.is-active {
  background: linear-gradient(135deg, var(--primary-hi), var(--primary-lo));
  color: #fff;
  box-shadow: 0 4px 16px -4px var(--primary-glow);
}

.auth-refer {
  margin-top: 28px;
  padding: 16px 18px;
  border-radius: var(--r);
  background: var(--gold-soft);
  border: 1px solid rgba(245,185,50,.25);
  font-size: .82rem;
  color: var(--text-dim);
}
.auth-refer strong { color: var(--gold); }


/* ------------------------------ footer ----------------------------- */
.site-footer {
  position: relative;
  padding-block: 64px 30px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.site-footer::before {
  content: '';
  position: absolute; inset-inline: 0; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: .55;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 40px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-about p { font-size: .88rem; color: var(--muted); line-height: 1.75; margin-block: 16px 20px; max-width: 42ch; }

.footer-col__title {
  display: flex; align-items: center; gap: 8px;
  font-size: .68rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text); margin-bottom: 16px;
}
.footer-col__title::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 8px var(--primary);
}
.footer-col a {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  font-size: .87rem; color: var(--muted);
  transition: color .16s var(--ease), transform .16s var(--ease);
}
.footer-col a:hover { color: var(--primary-hi); transform: translateX(3px); }
.footer-col a svg { width: 14px; height: 14px; opacity: .7; }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  font-size: .76rem;
  color: var(--faint);
}
.footer-bottom .disclaimer { max-width: 62ch; }

/* 18+ / responsible-gambling notice */
.age-note {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  color: var(--text-dim);
}
.age-note b { color: var(--primary-hi); }


/* ------------------------------- 404 ------------------------------- */
.error-page { padding-block: clamp(70px, 12vw, 140px); text-align: center; }
.error-code {
  font-family: var(--font-display);
  font-size: clamp(5.5rem, 17vw, 11rem);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.05em;
  margin-bottom: 18px;
}
.error-code span { color: var(--primary-hi); }
.error-links { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; margin-top: 34px; font-size: .84rem; }
.error-links a { color: var(--muted); }
.error-links a:hover { color: var(--primary-hi); }
