/* Landing-specific overrides + helpers (foundation comes from colors_and_type.css) */

body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); }
.container { max-width: 1440px; margin: 0 auto; padding: 0 32px; }
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
}
.section-title {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.0;
  color: var(--fg);
  margin: 16px 0 0;
}
.section-sub {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--fg-2);
  margin: 16px 0 0;
  max-width: 640px;
  line-height: 1.5;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600;
  border: 0; cursor: pointer;
  border-radius: 6px;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn-primary { background: var(--primary); color: var(--primary-fg); padding: 14px 22px; font-size: 14px; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { background: var(--primary-press); transform: translateY(1px); }
.btn-primary.lg { padding: 18px 32px; font-size: 16px; }

.btn-secondary {
  background: var(--bg); color: var(--fg); border: 1px solid var(--fg);
  padding: 14px 22px; font-size: 14px;
}
.btn-secondary:hover { background: var(--bg-muted); }

.btn-ghost-light {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4);
  padding: 14px 22px; font-size: 14px;
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

a { color: inherit; text-decoration: none; }

/* =========================================================
   RESPONSIVE
   Breakpoints:
     - Tablet:  ≤1024px
     - Mobile:  ≤640px
   Desktop stays untouched.
   ========================================================= */

/* ---------- Tablet (≤1024px) ---------- */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .section { padding: 72px 0; }
  .section-tight { padding: 48px 0; }
  .section-title { font-size: 40px; }
  .section-sub { font-size: 17px; }

  /* Hero */
  .hero { height: auto !important; min-height: 0 !important; }
  .hero-photo, .hero-map { padding: 80px 0 64px; }
  .hero-editorial { grid-template-columns: 1fr !important; }
  .hero-editorial-left { padding: 64px 32px !important; }
  .hero-editorial-photo { display: none !important; }

  /* EntryGrid stays 2-col on tablet */
  .entry-card { padding: 36px 28px 28px !important; min-height: 280px !important; }
  .entry-title { font-size: 32px !important; }

  /* Featured gyms: 5 → 3 cols */
  .featured-grid { grid-template-columns: repeat(3, 1fr) !important; }

  /* Neighborhoods: 4 → 3 cols */
  .neighborhoods-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .neighborhoods-grid > a:nth-child(3n) { border-right: 0 !important; }

  /* Community: 4 → 2 cols */
  .community-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* OwnerPitch: stack */
  .owner-grid { grid-template-columns: 1fr !important; gap: 48px !important; }
  .owner-headline { font-size: 56px !important; }

  /* Footer: 6 → 3 cols, brand block spans all */
  .footer-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 40px !important; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- Mobile (≤640px) ---------- */
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .section { padding: 56px 0; }
  .section-tight { padding: 40px 0; }
  .section-title { font-size: 32px; letter-spacing: -0.025em; }
  .section-sub { font-size: 16px; margin-top: 12px; }
  .eyebrow { font-size: 11px; }

  .btn-primary.lg { padding: 14px 22px; font-size: 14px; }
  .btn-primary { padding: 12px 18px; font-size: 13px; }

  /* HEADER */
  .header-nav-desktop { display: none !important; }
  .header-actions-desktop { display: none !important; }
  .header-mobile-toggle { display: flex !important; }

  /* HERO */
  .hero-photo, .hero-map { padding: 56px 0 48px; }
  .hero-headline { font-size: 48px !important; line-height: 0.95 !important; }
  .hero-sub { font-size: 16px !important; margin: 18px 0 24px !important; }
  .hero-meta { font-size: 11px !important; margin-bottom: 14px !important; }

  /* Editorial hero: kill split entirely on mobile */
  .hero-editorial { display: block !important; height: auto !important; min-height: 0 !important; }
  .hero-editorial-left { padding: 56px 20px 48px !important; }
  .hero-editorial-stats { gap: 20px !important; flex-wrap: wrap; margin-top: 32px; }

  /* Map hero: hide most pins, kill the map background visual noise */
  .hero-map-pins { display: none !important; }
  .hero-map-svg { opacity: 0.35 !important; }

  /* SEARCH BAR — stack vertically */
  .hero-search {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto auto !important;
    border-radius: 10px !important;
  }
  .hero-search-leading { display: none !important; }
  .hero-search-where {
    border-bottom: 1px solid var(--border);
    padding: 14px 16px !important;
  }
  .hero-search-what {
    border-left: 0 !important;
    border-bottom: 1px solid var(--border);
    padding: 14px 16px !important;
  }
  .hero-search-button {
    margin: 8px !important;
    padding: 14px 20px !important;
    width: calc(100% - 16px);
    justify-content: center;
  }
  .hero-search-dropdown {
    /* simpler dropdown on mobile */
    max-height: 60vh;
    overflow-y: auto;
  }

  .hero-chips {
    margin-top: 16px !important;
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .hero-chips::-webkit-scrollbar { display: none; }
  .hero-chips > span { white-space: nowrap; flex-shrink: 0; }

  /* ENTRY GRID — single column */
  .entry-grid { grid-template-columns: 1fr !important; margin-top: 40px !important; }
  .entry-card {
    padding: 32px 24px 28px !important;
    min-height: 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--border) !important;
  }
  .entry-card[data-tone="dark"], .entry-card[data-tone="accent"] {
    border-bottom-color: rgba(255,255,255,0.18) !important;
  }
  .entry-grid > a:last-child { border-bottom: 0 !important; }
  .entry-title { font-size: 28px !important; margin: 14px 0 12px !important; }
  .entry-body { font-size: 15px !important; }

  /* FEATURED GYMS — horizontal scroll */
  .featured-header { flex-direction: column; align-items: flex-start !important; gap: 8px !important; }
  .featured-grid {
    grid-template-columns: none !important;
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin: 32px -20px 0 !important;
    padding: 0 20px 12px;
    scrollbar-width: none;
  }
  .featured-grid::-webkit-scrollbar { display: none; }
  .featured-grid > article { scroll-snap-align: start; }

  /* NEIGHBORHOODS — 2 cols */
  .neighborhoods-grid { grid-template-columns: repeat(2, 1fr) !important; margin-top: 32px !important; }
  .neighborhoods-grid > a {
    padding: 20px 16px !important;
  }
  .neighborhoods-grid > a:nth-child(3n) { border-right: 1px solid var(--border) !important; }
  .neighborhoods-grid > a:nth-child(2n) { border-right: 0 !important; }
  .hood-name { font-size: 18px !important; }

  /* COMMUNITY — single column */
  .community-header { flex-direction: column; align-items: flex-start !important; }
  .community-grid {
    grid-template-columns: none !important;
    grid-auto-flow: column;
    grid-auto-columns: 80%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin: 32px -20px 0 !important;
    padding: 0 20px 12px;
    scrollbar-width: none;
  }
  .community-grid::-webkit-scrollbar { display: none; }
  .community-grid > div { scroll-snap-align: start; }

  /* OWNER PITCH */
  .owner-headline { font-size: 40px !important; }
  .owner-sub { font-size: 16px !important; margin-bottom: 24px !important; }
  .owner-stats { gap: 28px !important; margin-top: 32px !important; }
  .owner-stat-num { font-size: 32px !important; }
  .owner-dashboard { padding: 18px !important; }
  .owner-dashboard-stat { padding: 14px !important; }
  .owner-dashboard-stat-num { font-size: 22px !important; }

  /* FOOTER */
  .footer { padding: 64px 0 32px !important; }
  .footer-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 32px !important; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand-mark { font-size: 26px !important; }
  .footer-bottom { flex-direction: column; align-items: flex-start !important; gap: 14px !important; margin-top: 40px !important; }
}

/* Hide mobile-only elements on desktop */
.header-mobile-toggle { display: none; }
