/* ── Design palette
     423          #BACF35  lime green   → primary accent / CTA
     BRP 4119 C   #1C1D30  dark navy    → navbar, hero, dark surfaces
     906 SAUR     #1A2B6E  deep blue    → secondary, hover states
     411          #2855A8  mid blue     → supporting links / badges
     BRP 663 C    #CCCECF  light grey   → subtle backgrounds
     WHITE / BLACK as standard
  ─────────────────────────────────────────────────────────────── */

:root {
  --accent:        #BACF35;   /* 423  lime green  */
  --accent-hover:  #A3B82C;
  --accent-dark:   #1C1D30;   /* BRP 4119 C dark navy */
  --navy:          #1A2B6E;   /* 906 LYCRA SAUR BLUE  */
  --blue:          #2855A8;   /* 411                  */
  --grey-light:    #CCCECF;   /* BRP 663 C            */
  --body-bg:       #F2F3F5;
}

/* ── Base ────────────────────────────────────────────────────────────── */
body {
  background-color: var(--body-bg);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Accent colour helpers ───────────────────────────────────────────── */
.text-accent    { color: var(--accent) !important; }
.bg-accent      { background-color: var(--accent) !important; }
.border-accent  { border-color: var(--accent) !important; }

/* Lime green on dark → text must be dark, not white */
.btn-accent {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 600;
}
.btn-accent:hover,
.btn-accent:focus {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-dark);
}

.btn-outline-accent {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-outline-accent:hover {
  background-color: var(--accent);
  color: var(--accent-dark);
}

/* ── Navbar ──────────────────────────────────────────────────────────── */
.navbar.bg-dark {
  background-color: var(--accent-dark) !important;
}

.navbar-brand .text-accent {
  font-size: 1.1rem;
}

/* Nav links: white by default, underline indicator instead of colour change */
.navbar-dark .navbar-nav .nav-link {
  color: rgba(255,255,255,1) !important;
  position: relative;
  padding-bottom: 6px;
}

.navbar-dark .navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background .15s ease;
}

/* Hover: subtle grey underline */
.navbar-dark .navbar-nav .nav-link:hover::after {
  background: rgba(255,255,255,.7);
}

/* Active: accent-coloured underline */
.navbar-dark .navbar-nav .nav-link.active::after {
  background: var(--accent);
}

/* Remove Bootstrap's default active colour change */
.navbar-dark .navbar-nav .nav-link.active {
  color: rgba(255,255,255,1) !important;
  font-weight: 600;
}

/* ── Cards ───────────────────────────────────────────────────────────── */
.card {
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  transition: box-shadow .15s ease;
}

.card-hover:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.13);
  transform: translateY(-1px);
  transition: box-shadow .15s ease, transform .15s ease;
}

/* ── Hero (landing page) ─────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--accent-dark) 0%, #16204A 55%, var(--navy) 100%);
  color: #fff;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(186,207,53,.12) 0%, transparent 60%);
  pointer-events: none;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.2rem;
  opacity: .8;
  max-width: 520px;
}

/* ── Section headings ────────────────────────────────────────────────── */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #6c757d;
  margin-bottom: 1rem;
}

/* ── Feature cards (landing) ─────────────────────────────────────────── */
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(186,207,53,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* ── Nav tabs active accent ──────────────────────────────────────────── */
.nav-tabs .nav-link.active {
  border-bottom-color: var(--accent);
  color: var(--navy);
  font-weight: 600;
}

.nav-tabs .nav-link:hover {
  color: var(--navy);
}

/* ── Auth page ───────────────────────────────────────────────────────── */
.auth-card {
  max-width: 440px;
  margin: 60px auto;
}


/* ── Spinner ─────────────────────────────────────────────────────────── */
.spinner-border.text-accent {
  color: var(--accent) !important;
}

/* ── Competition detail ──────────────────────────────────────────────── */
.result-position {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  background: #e9ecef;
  color: #495057;
}
.result-position.pos-1 { background: #ffd700; color: #5a4200; }
.result-position.pos-2 { background: #c0c0c0; color: #444; }
.result-position.pos-3 { background: #cd7f32; color: #fff; }

/* ── Invite / join code ──────────────────────────────────────────────── */
.join-code {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  letter-spacing: .1em;
  word-break: break-all;
  text-align: center;
  background: #f8f9fa;
  border: 2px dashed var(--grey-light);
  border-radius: 8px;
  padding: .5rem 1rem;
  display: block;
  width: 100%;
}
.join-code:focus::placeholder { color: transparent; }

/* ── Status badge overrides to match palette ─────────────────────────── */
.badge.bg-primary { background-color: var(--blue) !important; }
.badge.bg-secondary { background-color: #6c757d !important; }

/* ── Activity row ────────────────────────────────────────────────────── */
.activity-source {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #fc4c02;   /* Strava orange — intentionally kept */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
}

/* ── Strava connect button (Strava brand colour — do not change) ──────── */
.btn-strava {
  background-color: #fc4c02;
  border-color: #fc4c02;
  color: #fff;
  font-weight: 600;
}
.btn-strava:hover {
  background-color: #e04300;
  border-color: #e04300;
  color: #fff;
}

/* ── CTA section (landing) ───────────────────────────────────────────── */
section.bg-dark {
  background-color: var(--accent-dark) !important;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--body-bg);
  border-top: 1px solid rgba(0,0,0,.07);
}

/* ── Cookie / storage notice ─────────────────────────────────────────── */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--accent-dark);
  color: #fff;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .875rem;
  z-index: 1050;
  border-top: 2px solid var(--accent);
}

/* ── Social login buttons ────────────────────────────────────────────── */
.social-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.25rem 0 1rem;
  color: #adb5bd;
  font-size: .8rem;
}
.social-divider::before,
.social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #dee2e6;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  font-size: .9rem;
  font-weight: 500;
  border-radius: 6px;
  padding: .55rem 1rem;
  text-decoration: none;
  transition: opacity .15s;
}
.btn-social:hover { opacity: .88; }

.btn-social-google {
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
}
.btn-social-google:hover { background: #f8f9fa; color: #3c4043; }

.btn-social-facebook {
  background: #1877F2;
  color: #fff;
  border: 1px solid #1877F2;
}

.btn-social-apple {
  background: #000;
  color: #fff;
  border: 1px solid #000;
}

/* ── Responsive tweaks ───────────────────────────────────────────────── */
@media (max-width: 576px) {
  .hero { padding: 60px 0 50px; }
  .auth-card { margin: 24px auto; }
}
