/* The Iron Atlas — core styles
   Brand: black #0D0D0D, charcoal #1F1F1F, slate #3D3D3D, cream #F2EFEA, gold #C89D5B
   Type: Bebas Neue (headings), Montserrat (body) */

:root {
  --black: #0d0d0d;
  --charcoal: #1f1f1f;
  --slate: #3d3d3d;
  --cream: #f2efea;
  --gold: #c89d5b;
  --gold-light: #dcb97f;
  --muted: #a9a49b;
  --line: #2e2e2e;
  --ok: #7fb069;
  --warn: #d9a441;
  --radius: 10px;
  --max: 1200px;
  --head: "Bebas Neue", "Anton", Impact, "Arial Narrow", sans-serif;
  --body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--cream);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--head);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 0 0 0.4em;
}
h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.eyebrow {
  font-family: var(--body); font-weight: 700; font-size: 0.75rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 0.6rem; display: block;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--body); font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.85em 1.4em; border-radius: 999px; border: 2px solid var(--gold);
  background: var(--gold); color: var(--black); cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sm svg { width: 15px; height: 15px; }
.btn:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--black); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--gold); }
.btn-ghost:hover { background: var(--gold); color: var(--black); }
.btn-sm { padding: 0.55em 1em; font-size: 0.75rem; }

/* Preview banner */
.preview-banner {
  background: var(--gold); color: var(--black); font-size: 0.8rem; font-weight: 600;
  text-align: center; padding: 6px 16px;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(13,13,13,0.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); }
.brand:hover { text-decoration: none; color: var(--cream); }
.brand-mark { width: 40px; height: auto; mix-blend-mode: lighten; }
.badge-showcase { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; margin: 20px 0; }
.badge-showcase .bg-light { background: #fff; padding: 18px; border-radius: var(--radius); }
.badge-showcase .bg-dark { background: var(--black); border: 1px solid var(--line); padding: 18px; border-radius: var(--radius); }
.badge-showcase img { width: 160px; height: 160px; }
pre.code { background: var(--black); border: 1px solid var(--slate); border-radius: 8px; padding: 14px; font-size: 0.78rem; white-space: pre-wrap; word-break: break-all; color: var(--gold-light); }
.brand-name { font-family: var(--head); font-size: 1.6rem; letter-spacing: 0.06em; line-height: 1; }
.brand-name span { color: var(--gold); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a:not(.btn) { color: var(--cream); font-weight: 600; font-size: 0.9rem; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--gold); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; color: var(--cream); padding: 8px; cursor: pointer; }
.nav-toggle svg { width: 28px; height: 28px; }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--charcoal); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; }
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 75% 30%, rgba(200,157,91,0.18), transparent 55%),
    linear-gradient(180deg, var(--black), var(--charcoal));
  padding: 80px 0 90px;
  border-bottom: 1px solid var(--line);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-mark {
  position: absolute; right: -60px; top: 50%; transform: translateY(-50%);
  width: 560px; opacity: 0.14; pointer-events: none;
}
.hero p.lead { font-size: 1.15rem; max-width: 620px; color: #d9d5ce; }
.hero h1 { max-width: 800px; }
.search-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; max-width: 720px;
  background: var(--charcoal); border: 1px solid var(--slate); border-radius: 999px; padding: 8px;
}
.search-bar input[type=text] {
  flex: 1 1 220px; min-width: 0; background: transparent; border: 0; color: var(--cream);
  font: inherit; padding: 10px 16px; outline: none;
}
.search-bar input::placeholder { color: var(--muted); }
@media (max-width: 560px) {
  .search-bar { border-radius: var(--radius); }
  .search-bar .btn { width: 100%; }
}
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* Chips & badges */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--slate); border-radius: 999px; padding: 4px 12px;
  font-size: 0.8rem; font-weight: 600; color: var(--cream); background: rgba(255,255,255,0.02);
}
a.chip:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }
.chip svg { width: 15px; height: 15px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 4px;
}
.badge svg { width: 14px; height: 14px; }
.badge-verified { background: var(--gold); color: var(--black); }
.badge-community { background: var(--slate); color: var(--cream); }
.badge-sample { background: transparent; border: 1px dashed var(--muted); color: var(--muted); }

/* Sections */
.section { padding: 72px 0; }
.section-cream { background: var(--cream); color: var(--black); }
.section-cream .muted { color: #5c5850; }
.section-cream a:not(.btn) { color: #8a6530; }
.section-charcoal { background: var(--charcoal); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { margin: 0; }

/* Grids */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Gym card */
.gym-card {
  display: flex; flex-direction: column; background: var(--charcoal);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  color: var(--cream); transition: border-color .15s, transform .15s;
}
.gym-card:hover { border-color: var(--gold); text-decoration: none; color: var(--cream); transform: translateY(-2px); }
.gym-card .thumb { position: relative; aspect-ratio: 16/9; }
.gym-card .thumb .badge { position: absolute; top: 10px; left: 10px; }
.gym-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.gym-card h3 { margin: 0; font-size: 1.7rem; }
.gym-card .loc { font-size: 0.85rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.gym-card .loc svg { width: 14px; height: 14px; flex: none; }
.gym-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.gym-card .tags .chip { font-size: 0.72rem; padding: 2px 10px; }
.gym-card .meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }
.distance { color: var(--gold); font-weight: 700; }

/* Photo placeholder art */
.photo-ph {
  width: 100%; height: 100%; display: grid; place-items: center;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.025) 0 12px, transparent 12px 24px),
    linear-gradient(135deg, #262626, #141414);
  color: var(--slate);
}
.photo-ph svg { width: 56px; height: 56px; color: #4a4a4a; }

/* Stars */
.stars { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--gold); }
.stars svg { width: 16px; height: 16px; }
.stars .count { color: var(--muted); font-weight: 500; font-size: 0.85em; }

/* Feature tiles */
.tile { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--charcoal); }
.section-cream .tile { background: #fff; border-color: #e0dbd2; }
.tile .icon { width: 44px; height: 44px; color: var(--gold); margin-bottom: 14px; }
.section-cream .tile .icon { color: #a57a3c; }
.tile h3 { margin-bottom: 0.3em; }
.tile p { margin: 0; font-size: 0.95rem; }
.step-num { font-family: var(--head); font-size: 3rem; color: var(--gold); line-height: 1; }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--charcoal), #2a2419);
  border: 1px solid #3a3122; border-radius: 16px; padding: 44px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.cta-band h2 { margin: 0 0 0.2em; }
.cta-band p { margin: 0; color: #d9d5ce; }
@media (max-width: 560px) { .cta-band { padding: 28px 20px; } }

/* Search page layout */
.search-layout { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; padding: 32px 0 72px; }
@media (max-width: 960px) { .search-layout { grid-template-columns: 1fr; } }
.filters {
  background: var(--charcoal); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; position: sticky; top: 88px; max-height: calc(100vh - 108px); overflow: auto;
}
@media (max-width: 960px) {
  .filters { position: static; max-height: none; display: none; }
  .filters.open { display: block; }
}
.filters-toggle { display: none; }
@media (max-width: 960px) { .filters-toggle { display: inline-flex; } }
.filter-group { border-top: 1px solid var(--line); padding: 14px 0; }
.filter-group:first-of-type { border-top: 0; padding-top: 0; }
.filter-group h4 { font-family: var(--body); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; padding: 4px 0; cursor: pointer; }
.check input { accent-color: var(--gold); width: 16px; height: 16px; flex: none; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label, .label { font-size: 0.8rem; font-weight: 700; color: var(--cream); }
input[type=text], input[type=email], input[type=url], input[type=number], input[type=tel], select, textarea {
  width: 100%; font: inherit; color: var(--cream); background: var(--black);
  border: 1px solid var(--slate); border-radius: 8px; padding: 10px 12px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
textarea { min-height: 110px; resize: vertical; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; min-width: 0; }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.results-bar select { width: auto; }
.view-toggle { display: inline-flex; border: 1px solid var(--slate); border-radius: 999px; overflow: hidden; }
.view-toggle button { background: transparent; color: var(--cream); border: 0; padding: 8px 16px; font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.view-toggle button[aria-pressed="true"] { background: var(--gold); color: var(--black); }
#results-map { height: 560px; border-radius: var(--radius); border: 1px solid var(--line); }
.empty { padding: 48px 24px; text-align: center; border: 1px dashed var(--slate); border-radius: var(--radius); }
.loc-status { font-size: 0.8rem; color: var(--muted); min-height: 1.2em; }
.link-btn { background: none; border: 0; color: var(--gold); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; padding: 0; text-align: left; }
.link-btn:hover { text-decoration: underline; }

/* Profile */
.profile-hero { background: linear-gradient(180deg, var(--charcoal), var(--black)); padding: 36px 0 30px; border-bottom: 1px solid var(--line); }
.profile-hero .loc svg { width: 16px; height: 16px; flex: none; }
.crumbs { font-size: 0.8rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.profile-title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: end; }
.profile-title h1 { margin: 10px 0 6px; font-size: clamp(2.4rem, 6vw, 4rem); }
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 160px 160px; gap: 8px; margin-top: 24px; border-radius: var(--radius); overflow: hidden; }
.gallery > :first-child { grid-row: span 2; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 180px 110px; } .gallery > :first-child { grid-column: span 2; grid-row: auto; } .gallery > :nth-child(n+4) { display: none; } }
.profile-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; padding: 36px 0 72px; align-items: start; }
@media (max-width: 960px) { .profile-layout { grid-template-columns: 1fr; } }
.panel { background: var(--charcoal); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.panel h2 { font-size: 2rem; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.facts li:last-child { border-bottom: 0; }
.facts li span:first-child { color: var(--muted); }
.facts li span:last-child { text-align: right; font-weight: 600; }
.hours { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.hours td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; font-weight: 600; }
.hours tr.today td { color: var(--gold); }
.equip-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 20px; }
.equip-list li { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; }
.equip-list li svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.equip-list li.no { color: #6b6b6b; text-decoration: line-through; }
.equip-list li.no svg { color: #555; }
.brand-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.brand-chip { border: 1px solid var(--gold); color: var(--gold); border-radius: 4px; padding: 4px 10px; font-weight: 700; font-size: 0.82rem; }
.facility-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.facility { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 0.85rem; font-weight: 600; }
.facility svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.facility.off { color: #6b6b6b; }
.facility.off svg { color: #555; }
#gym-map { height: 260px; border-radius: 8px; margin-bottom: 12px; }
.verified-note { display: flex; gap: 14px; align-items: flex-start; background: rgba(200,157,91,0.08); border: 1px solid rgba(200,157,91,0.35); border-radius: var(--radius); padding: 18px; font-size: 0.9rem; }
.verified-note svg { width: 30px; height: 30px; color: var(--gold); flex: none; }
.verified-note.community { background: rgba(255,255,255,0.03); border-color: var(--slate); }
.verified-note.community svg { color: var(--muted); }
.review { border-top: 1px solid var(--line); padding: 18px 0; }
.review:first-of-type { border-top: 0; }
.review-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; font-size: 0.9rem; }
.review-head strong { font-weight: 700; }
.rating-big { font-family: var(--head); font-size: 3.4rem; color: var(--gold); line-height: 1; }

/* Prose pages */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.5em; }
.page-hero { padding: 56px 0 40px; background: linear-gradient(180deg, var(--charcoal), var(--black)); border-bottom: 1px solid var(--line); }
.page-hero p.lead { font-size: 1.1rem; max-width: 680px; color: #d9d5ce; }
.checklist { list-style: none; padding: 0; counter-reset: c; }
.checklist li { counter-increment: c; position: relative; padding: 18px 18px 18px 70px; background: var(--charcoal); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.checklist li::before { content: counter(c, decimal-leading-zero); position: absolute; left: 18px; top: 14px; font-family: var(--head); font-size: 2rem; color: var(--gold); }
.checklist li strong { display: block; margin-bottom: 2px; }
.draft-note { border-left: 4px solid var(--warn); background: rgba(217,164,65,0.08); padding: 14px 18px; border-radius: 0 8px 8px 0; font-size: 0.9rem; margin-bottom: 24px; }

/* Forms */
.form-card { background: var(--charcoal); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.form-card fieldset { border: 0; padding: 0; margin: 0 0 28px; }
.form-card legend { font-family: var(--head); font-size: 1.8rem; margin-bottom: 12px; padding: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-card { padding: 20px 16px; } }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 16px; }
.hint { font-size: 0.78rem; color: var(--muted); font-weight: 400; }
.req { color: var(--gold); }
.error-msg { color: #e8836b; font-size: 0.8rem; }
.form-status { padding: 16px 18px; border-radius: 8px; margin-top: 16px; display: none; }
.form-status.show { display: block; }
.form-status.ok { background: rgba(127,176,105,0.12); border: 1px solid var(--ok); }
.form-status.err { background: rgba(232,131,107,0.1); border: 1px solid #e8836b; }
.tabs { display: inline-flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }

/* Footer */
.site-footer { background: var(--black); border-top: 1px solid var(--line); padding: 56px 0 28px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-family: var(--body); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #cfcac2; }
.site-footer a:hover { color: var(--gold); }
.footer-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 0.8rem; }

/* Leaflet tweaks */
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--charcoal); color: var(--cream); }
.leaflet-popup-content a { color: var(--gold); font-weight: 700; }
.leaflet-container { background: #1a1a1a; font-family: var(--body); }
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9) grayscale(0.4); }
.map-pin { background: var(--gold); border: 2px solid var(--black); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); width: 22px; height: 22px; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.map-pin.community { background: #8c8c8c; }
.facility.unknown { color: #8a8a8a; border-style: dashed; }
.facility.unknown svg { color: #6b6b6b; }
.facility.off { text-decoration: line-through; }
.source-list { margin: 0; padding-left: 1.2em; font-size: 0.9rem; }
.source-list li { margin-bottom: 6px; }

/* Gym photos */
.gym-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery figure { margin: 0; position: relative; overflow: hidden; background: #141414; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 8px; font-size: 0.7rem; color: #ddd; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.gallery-1 { grid-template-columns: 1fr; grid-template-rows: 340px; }
.gallery-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 320px; }
.gallery-2 > :first-child, .gallery-1 > :first-child { grid-row: auto; }
.gallery-3, .gallery-4 { grid-template-columns: 2fr 1fr; grid-template-rows: 160px 160px; }
.gallery-4 > :nth-child(4) { display: none; }
.no-photos { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: center; margin-top: 24px; background: var(--charcoal); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.no-photos .photo-ph { height: 150px; }
.no-photos-text { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 16px 0; font-size: 0.9rem; }
.photo-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.gallery + .photo-links { margin-top: 12px; }
@media (max-width: 600px) { .no-photos { grid-template-columns: 1fr; } .no-photos-text { padding: 0 16px 16px; } .gallery-2 { grid-template-rows: 200px; } }
