/* EquiTrail — website/css/styles.css  (v2 — Sage theme) */
:root {
  --sage:         #9CAF9B;
  --sage-dark:    #7A9478;
  --sage-light:   #C8D9C7;
  --sage-pale:    #EEF4ED;
  --green-deep:   #2D6A4F;
  --green-dark:   #1A4535;
  --gold:         #C9A84C;
  --gold-light:   #E8C96E;
  --text-dark:    #1E2D1E;
  --text-mid:     #3D5C3D;
  --text-light:   #6B896B;
  --white:        #ffffff;
  --card-bg:      #ffffff;
  --radius-sm:    8px;
  --radius-md:    16px;
  --radius-lg:    24px;
  --shadow-sm:    0 2px 8px rgba(0,0,0,.07);
  --shadow-md:    0 8px 32px rgba(0,0,0,.10);
  --transition:   all .3s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Typography ─────────────────────────────────────────────────── */
h1, h2, h3 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
p  { color: var(--text-mid); line-height: 1.7; }

.section-label {
  text-transform: uppercase; letter-spacing: .12em;
  font-size: .75rem; font-weight: 600; color: var(--gold);
  margin-bottom: .75rem;
}

/* ── Layout ─────────────────────────────────────────────────────── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }

/* ── NAV ─────────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 24px; height: 64px;
  display: flex; align-items: center;
  transition: var(--transition);
}
nav.scrolled {
  background: rgba(156,175,155,.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.2);
}
.nav-inner {
  max-width: 1140px; width: 100%; margin: 0 auto;
  display: flex; align-items: center; gap: 2rem;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.nav-logo img { height: 38px; }
.nav-links {
  display: flex; align-items: center; gap: 1.4rem;
  list-style: none; flex: 1; /* fills middle space */
  padding-left: 2rem;
}
/* Right-side group: lang + auth + download */
.nav-right {
  display: flex; align-items: center; gap: .6rem; flex-shrink: 0; margin-left: auto;
}
.nav-links a {
  color: var(--text-dark); text-decoration: none;
  font-size: .9rem; font-weight: 500; transition: var(--transition);
}
.nav-links a:hover { color: var(--green-deep); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .65rem 1.4rem;
  border-radius: 50px; font-weight: 600; font-size: .9rem;
  text-decoration: none; cursor: pointer; border: none;
  transition: var(--transition);
}
.btn-primary {
  background: var(--green-deep); color: var(--white);
}
.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(45,106,79,.35);
}
.btn-outline {
  background: transparent; color: var(--text-dark);
  border: 1.5px solid var(--sage-dark);
}
.btn-outline:hover { background: var(--sage-pale); }
.btn-lg { padding: .9rem 2rem; font-size: 1rem; }

/* ── HERO ─────────────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  background: linear-gradient(150deg, var(--sage) 0%, var(--sage-light) 50%, #E8F0E7 100%);
  display: flex; align-items: center;
  padding: 120px 24px 80px;
  position: relative; overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    115deg, transparent, transparent 60px,
    rgba(255,255,255,.06) 60px, rgba(255,255,255,.06) 61px
  );
  pointer-events: none;
}
.hero-inner {
  max-width: 1140px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center; width: 100%;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(45,106,79,.12);
  border: 1px solid rgba(45,106,79,.25);
  color: var(--green-deep);
  font-size: .8rem; font-weight: 600;
  padding: .35rem .9rem; border-radius: 50px; margin-bottom: 1.5rem;
}
.hero-badge .dot {
  width: 6px; height: 6px; background: var(--green-deep);
  border-radius: 50%; animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.8)} }

.hero-title { color: var(--text-dark); margin-bottom: 1.25rem; }
.hero-title .accent { color: var(--green-deep); }
.hero-sub {
  color: var(--text-mid); font-size: 1.1rem; margin-bottom: 2.5rem; max-width: 480px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 3rem; }

.store-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--white);
  border: 1.5px solid rgba(0,0,0,.1);
  color: var(--text-dark); padding: .7rem 1.4rem;
  border-radius: 12px; text-decoration: none; transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.store-btn:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.store-btn-text { display: flex; flex-direction: column; line-height: 1.2; }
.store-btn-label { font-size: .65rem; color: var(--text-light); }
.store-btn-name  { font-size: .95rem; font-weight: 700; }

.hero-stats { display: flex; gap: 2rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(45,106,79,.15); }
.hero-stat strong { display: block; font-size: 1.6rem; color: var(--text-dark); font-weight: 800; }
.hero-stat span   { font-size: .8rem; color: var(--text-light); }

/* ── Phone mockup ─────────────────────────────────────────────────── */
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; }
.phone-wrap { position: relative; width: 280px; }
.phone-frame {
  width: 280px; height: 560px;
  background: #fff; border-radius: 42px;
  box-shadow: 0 0 0 8px #e8e8e8, 0 0 0 10px #ccc, var(--shadow-md);
  overflow: hidden; position: relative;
}
.phone-screen {
  width: 100%; height: 100%;
  background: linear-gradient(170deg, var(--sage-pale) 0%, var(--sage-light) 100%);
  position: relative; overflow: hidden;
}
.phone-screen::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(156,175,155,.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(156,175,155,.2) 1px, transparent 1px);
  background-size: 30px 30px;
}
.phone-notch {
  width: 90px; height: 24px; background: #fff;
  border-radius: 0 0 16px 16px;
  position: absolute; left: 50%; transform: translateX(-50%); top: 0;
}
.phone-status-bar {
  height: 40px; display: flex; align-items: center;
  justify-content: space-between; padding: 0 20px;
  font-size: .65rem; color: var(--text-dark); font-weight: 600;
  position: relative; z-index: 2;
}
.phone-route { position: absolute; top: 60px; left: 20px; right: 20px; bottom: 180px; z-index: 2; }
.phone-route svg { width: 100%; height: 100%; overflow: visible; }
.phone-stats-bar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 180px;
  background: rgba(255,255,255,.95); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0,0,0,.06); padding: 16px 20px; z-index: 3;
}
.phone-stats-title { color: var(--text-light); font-size: .6rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.phone-stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.phone-stat-item strong { display: block; color: var(--text-dark); font-size: 1.1rem; font-weight: 800; }
.phone-stat-item span { color: var(--text-light); font-size: .55rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; }
.phone-stop-btn {
  width: 100%; height: 42px; background: #e74c3c;
  border-radius: 10px; display: flex; align-items: center;
  justify-content: center; color: white; font-weight: 700; font-size: .8rem;
}
.float-badge {
  position: absolute; background: rgba(255,255,255,.97); border-radius: 14px;
  padding: 10px 14px; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 8px;
  animation: float 4s ease-in-out infinite;
}
.float-badge:nth-child(2) { animation-delay: 1.5s; }
.float-badge:nth-child(3) { animation-delay: 3s; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.float-badge-icon { width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.float-badge strong { font-size: .85rem; color: var(--text-dark); display: block; }
.float-badge span   { font-size: .7rem;  color: var(--text-light); }
.badge-distance { left: -80px; top: 120px; }
.badge-gait     { right: -80px; top: 200px; }
.badge-horse    { left: -60px; bottom: 140px; }

/* ── FEATURES ────────────────────────────────────────────────────── */
#features { background: var(--sage-pale); }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 64px; }
.section-header h2 { margin-bottom: .75rem; color: var(--text-dark); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.feature-card {
  background: var(--card-bg); border: 1px solid var(--sage-light);
  border-radius: var(--radius-lg); padding: 28px; transition: var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--sage); }
.feature-icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 18px; background: var(--sage-pale);
}
.feature-card h3 { margin-bottom: .5rem; font-size: 1.1rem; color: var(--text-dark); }
.feature-card p  { font-size: .9rem; line-height: 1.7; }

/* ── LEADERBOARD ─────────────────────────────────────────────────── */
#leaderboard { background: var(--white); }
#lb-table th { font-weight: 600; }
#lb-table tbody tr:hover { background: var(--sage-pale) !important; }

/* ── SAFETY ──────────────────────────────────────────────────────── */
#safety { background: var(--sage-pale); }
.safety-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.safety-map-mock {
  border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-md); position: relative;
  background: var(--sage-light); height: 320px;
  border: 3px solid var(--sage);
}
.safety-map-inner {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--sage-pale) 0%, #D4E6D3 100%);
  position: relative; overflow: hidden;
}
.safety-map-inner::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(156,175,155,.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(156,175,155,.3) 1px, transparent 1px);
  background-size: 40px 40px;
}
.safety-rider-dot {
  position: absolute; width: 16px; height: 16px;
  background: var(--green-deep); border: 3px solid white;
  border-radius: 50%; top: 40%; left: 55%;
  box-shadow: 0 0 0 6px rgba(45,106,79,.2), var(--shadow-sm);
  animation: ping 2s ease-in-out infinite;
}
@keyframes ping { 0%,100%{box-shadow:0 0 0 6px rgba(45,106,79,.2)} 50%{box-shadow:0 0 0 16px rgba(45,106,79,.05)} }
.safety-route-line {
  position: absolute; top: 20%; left: 20%; width: 60%; height: 65%;
}
.safety-lock-badge {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,.9); border-radius: 12px;
  padding: 8px 12px; display: flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 600; color: var(--green-deep);
  box-shadow: var(--shadow-sm);
}
.safety-features { display: flex; flex-direction: column; gap: 20px; }
.safety-feature { display: flex; gap: 16px; align-items: flex-start; }
.safety-feature-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--sage); display: flex; align-items: center;
  justify-content: center; font-size: 1.3rem; flex-shrink: 0;
}
.safety-feature h4 { font-size: 1rem; margin-bottom: 4px; color: var(--text-dark); }
.safety-feature p { font-size: .88rem; }

/* ── PREMIUM ─────────────────────────────────────────────────────── */
#premium { background: var(--white); }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 860px; margin: 0 auto; }
.pricing-card { border-radius: var(--radius-lg); padding: 40px 36px; position: relative; overflow: hidden; }
.pricing-free { background: var(--sage-pale); border: 1.5px solid var(--sage-light); }
.pricing-pro {
  background: linear-gradient(145deg, var(--green-dark) 0%, var(--green-deep) 100%);
  box-shadow: 0 20px 60px rgba(26,69,53,.3);
}
.pricing-pro-badge {
  position: absolute; top: 20px; right: 20px;
  background: var(--gold); color: var(--green-dark);
  font-size: .7rem; font-weight: 800; padding: .25rem .75rem;
  border-radius: 50px; letter-spacing: .06em;
}
.pricing-name { font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; margin-bottom: .5rem; }
.pricing-free .pricing-name { color: var(--text-light); }
.pricing-pro  .pricing-name { color: rgba(255,255,255,.6); }
.pricing-price { display: flex; align-items: baseline; gap: .35rem; margin-bottom: 1.5rem; }
.pricing-price .amount { font-size: 3rem; font-weight: 900; line-height: 1; }
.pricing-free .amount { color: var(--text-dark); }
.pricing-pro  .amount { color: var(--white); }
.pricing-price .period { font-size: .9rem; }
.pricing-free .period { color: var(--text-light); }
.pricing-pro  .period { color: rgba(255,255,255,.6); }
.pricing-features { list-style: none; margin-bottom: 2rem; display: flex; flex-direction: column; gap: .85rem; }
.pricing-features li { display: flex; align-items: flex-start; gap: .75rem; font-size: .9rem; }
.pricing-free .pricing-features li { color: var(--text-mid); }
.pricing-pro  .pricing-features li { color: rgba(255,255,255,.85); }
.check-icon {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .65rem; flex-shrink: 0; margin-top: 2px;
}
.pricing-free .check-icon { background: var(--sage); color: var(--green-deep); }
.pricing-pro  .check-icon { background: rgba(201,168,76,.25); color: var(--gold-light); }
.pricing-free .btn-cta {
  display: block; text-align: center; padding: .85rem;
  border-radius: var(--radius-sm); font-weight: 700; font-size: .95rem;
  text-decoration: none; border: 2px solid var(--sage);
  color: var(--text-mid); transition: var(--transition);
}
.pricing-free .btn-cta:hover { border-color: var(--green-deep); color: var(--green-deep); background: var(--sage-pale); }
.pricing-pro .btn-cta {
  display: block; text-align: center; padding: .85rem;
  border-radius: var(--radius-sm); font-weight: 700; font-size: .95rem;
  text-decoration: none; background: var(--gold); color: var(--green-dark); transition: var(--transition);
}
.pricing-pro .btn-cta:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(201,168,76,.35); }

/* ── FOOTER ──────────────────────────────────────────────────────── */
footer { background: var(--green-dark); color: rgba(255,255,255,.7); padding: 64px 24px 40px; }
.footer-inner { max-width: 1140px; margin: 0 auto; }
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 32px;
}
.footer-brand img { height: 38px; margin-bottom: 12px; }
.footer-brand p { color: rgba(255,255,255,.55); font-size: .9rem; max-width: 300px; line-height: 1.7; }
.footer-col h4 { color: white; font-size: .85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.footer-col a { color: rgba(255,255,255,.55); text-decoration: none; font-size: .88rem; transition: var(--transition); }
.footer-col a:hover { color: white; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .82rem; color: rgba(255,255,255,.35); flex-wrap: wrap; gap: 12px;
}
.footer-bottom a { color: rgba(255,255,255,.45); text-decoration: none; }
.footer-bottom a:hover { color: white; }

/* ── Responsive ──────────────────────────────────────────────────── */
/* ── Mobile drawer links (global — used inside slide-in drawer) ──── */
.mob-link {
  display: block;
  padding: 14px 20px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid #f5f5f5;
  transition: background .15s;
}
.mob-link:active, .mob-link:hover { background: var(--sage-pale); }
.mob-pro { font-weight: 700; color: var(--green-deep) !important; }

/* ── Hamburger button (hidden on desktop) ─────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
  margin-left: auto;
  z-index: 200;
}
.nav-hamburger span {
  display: block; height: 2px; width: 24px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all .25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Tablet (≤900px) ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner  { grid-template-columns: 1fr; text-align: center; }
  .hero-sub    { margin-left: auto; margin-right: auto; }
  .hero-ctas   { justify-content: center; }
  .hero-stats  { justify-content: center; }
  .hero-visual { display: none; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 460px; }
  .safety-grid  { grid-template-columns: 1fr; }
  .footer-top   { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  /* Hide ALL desktop nav items — only logo + hamburger visible */
  .nav-links         { display: none !important; }
  .nav-desktop-items { display: none !important; }
  .nav-hamburger     { display: flex !important; margin-left: 8px; }

  /* Mobile drawer — permanently outside of media query so always styled */
}

/* ── Mobile (≤600px) ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  section { padding: 56px 0; }
  .container { padding: 0 16px; }

  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Routes section */
  #routes-grid { grid-template-columns: 1fr !important; }
  #route-country-chips,
  #route-country-chips + div { flex-wrap: wrap; }

  /* Referral section 2-col → 1-col */
  .referral-grid { grid-template-columns: 1fr !important; }

  /* FOMO ticker */
  #fomo-ticker { font-size: .75rem; padding: 6px 12px; }

  /* Leaderboard tabs */
  .route-chip, .route-country-chip { font-size: .75rem; padding: .28rem .7rem; }

  /* Nav auth area stacks with rest of mobile nav */
  nav .btn-primary { padding: .45rem .9rem; font-size: .8rem; }

  /* Hero headline size floor */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }

  /* Map height on mobile */
  #live-map { height: 280px !important; }

  /* Friends leaderboard table scrollable on small screens */
  #friends-lb-content { overflow-x: auto; }

  /* Section headers less padding on mobile */
  .section-header { margin-bottom: 36px; }
}
