/* ============================================================
   LOCATION.CSS — City Page Specific Layouts v2
   ============================================================ */

/* ── HERO ── */
.loc-hero {
  min-height: 94vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-inner { position: relative; z-index: 2; }

h1.display {
  font-family: var(--serif);
  font-size: clamp(52px, 8vw, 108px);
  line-height: 0.97;
  letter-spacing: -0.025em;
  margin: 22px 0 28px;
  max-width: 14ch;
  font-weight: 400;
  color: var(--fg);
}
h1.display em {
  font-style: italic;
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 60%, #fff 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
}

.lede {
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--fg-dim);
  max-width: 52ch;
  line-height: 1.65;
  margin: 0 0 32px;
}

.hero-ctas { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }

.tiny-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--fg-mute);
  flex-wrap: wrap;
}
.avs { display: flex; }
.av {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--ink-0);
  margin-right: -8px;
  background: var(--accent-wash);
  border-color: var(--ink-1);
}
.av:nth-child(1) { background: color-mix(in oklab, var(--accent) 40%, var(--ink-3)); }
.av:nth-child(2) { background: color-mix(in oklab, var(--accent-2) 40%, var(--ink-3)); }
.av:nth-child(3) { background: color-mix(in oklab, oklch(70% 0.12 180) 40%, var(--ink-3)); }
.av:nth-child(4) { background: color-mix(in oklab, oklch(70% 0.12 300) 40%, var(--ink-3)); }

/* ── RANK GRID ── */
.rank-grid-wrap {
  margin-top: 64px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, color-mix(in oklab, var(--ink-1) 85%, transparent) 0%, var(--ink-1) 100%);
  padding: 20px 20px 6px;
  overflow: hidden;
}
.rank-grid-wrap::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, var(--accent-wash), transparent 70%);
  pointer-events: none;
}
.rank-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  position: relative;
}
.rank-head .title {
  font-size: 12px;
  color: var(--fg-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
}
.rank-head .meta {
  display: flex;
  gap: 18px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
}
.rank-head .meta b { color: var(--fg-dim); font-weight: 500; }

.rank-grid {
  display: grid;
  grid-template-columns: 180px repeat(5, 1fr);
  font-family: var(--mono);
  font-size: 12px;
}
.rank-grid .hcell, .rank-grid .cell {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
}
.rank-grid .hcell {
  color: var(--fg-mute);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rank-grid .hcell.city { color: var(--fg-dim); }
.rank-grid .cell.city {
  color: var(--fg);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  gap: 8px;
}
.rank-grid .cell.city .pin {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--glow);
  flex-shrink: 0;
}
.rank-grid .row:nth-child(even) .cell { background: rgba(255,255,255,0.015); }
.rank-grid .row:last-child .cell { border-bottom: 0; }
.rank-cell { position: relative; justify-content: space-between; gap: 8px; }
.rank-val {
  font-weight: 500;
  color: var(--fg);
}
.rank-val.top3 { color: #4ade80; }
.rank-val.top10 { color: var(--accent); }
.rank-val.new { color: var(--fg-mute); }
.rank-delta {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
}
.rank-delta.up { background: rgba(74,222,128,0.12); color: #4ade80; }
.rank-delta.down { background: rgba(248,113,113,0.12); color: #f87171; }

.rank-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 6px 8px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.spark { display: flex; align-items: flex-end; gap: 2px; height: 24px; }
.spark-bar {
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.5;
  animation: sparkle 1.5s ease-in-out infinite;
}
.spark-bar:nth-child(odd) { animation-delay: 0.2s; opacity: 0.3; }

@keyframes sparkle {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.4); opacity: 0.8; }
}

/* ── PROBLEM SECTION ── */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.problem-points { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.problem-point {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.pp-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent-wash);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.pp-icon svg { width: 10px; height: 10px; }
.pp-text { font-size: 14px; line-height: 1.65; color: var(--fg-dim); }
.pp-text strong { color: var(--fg); font-weight: 500; }

.stat-card {
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
}
.stat-card-num {
  font-family: var(--serif);
  font-size: 96px;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--fg) 0%, var(--accent) 60%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-card-desc {
  font-size: 15px;
  color: var(--fg-dim);
  line-height: 1.65;
}

/* ── TIMELINE ── */
.timeline {
  position: relative;
  margin-top: 56px;
  padding-left: 48px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 16px; top: 8px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}
.tl-item { position: relative; padding-bottom: 48px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute;
  left: -38px; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--glow);
  border: 2px solid var(--ink-0);
}
.tl-period {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.tl-title {
  font-family: var(--serif);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-bottom: 8px;
}
.tl-body {
  font-size: 14px;
  line-height: 1.75;
  color: var(--fg-dim);
  max-width: 52ch;
}

/* ── NEARBY CITIES BAR ── */
.nearby-bar {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink-1);
}
.nearby-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.nearby-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── FINAL CTA BAND ── */
.cta-band {
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band .aurora { inset: auto -10% -10% -10%; top: -20%; height: 900px; opacity: calc(0.7 * var(--motion)); }
.cta-band h2 {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  font-weight: 400;
  position: relative;
  max-width: 14ch;
  margin-left: auto;
  margin-right: auto;
}
.cta-band h2 em { font-style: italic; color: var(--accent); }
.cta-band .sub {
  color: var(--fg-dim);
  font-size: 18px;
  max-width: 50ch;
  margin: 0 auto 36px;
  line-height: 1.6;
  position: relative;
}
.cta-band .btns { display: inline-flex; gap: 12px; position: relative; flex-wrap: wrap; justify-content: center; }

.phone-big {
  display: block;
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
  margin-bottom: 4px;
  position: relative;
  transition: color 0.2s ease;
}
.phone-big:hover { color: var(--accent); }
.phone-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 32px;
  display: block;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .problem-grid { grid-template-columns: 1fr; gap: 48px; }
  h1.display { font-size: clamp(48px, 12vw, 80px); }
}
@media (max-width: 768px) {
  .loc-hero { padding-top: 120px; }
  .rank-grid { grid-template-columns: 140px repeat(4, 1fr); }
  .rank-grid .hcell:last-child, .rank-grid .cell:last-child { display: none; }
}