/* =============================================================
   Estados Unidos en Español — site-specific layer
   Loaded AFTER the shared styles.css. Everything here is unique
   to the parent/landing site: the map selector, city cards and
   the waitlist. Shared components live in shared/css/base.css.
   ============================================================= */

/* -------------------------------------------------------------
   1. Map hero — deep navy stage
   ------------------------------------------------------------- */
.map-hero {
  position: relative;
  overflow: hidden;
  background: var(--brand-deep);
  color: #fff;
  padding: calc(var(--header-h) + clamp(2.5rem, 6vw, 4.5rem)) 0 clamp(3rem, 7vw, 5rem);
}
/* Atmospheric depth: two soft light pools + a fine grain overlay */
.map-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 55% at 18% 12%, rgba(46, 86, 128, .55), transparent 60%),
    radial-gradient(55% 45% at 88% 78%, rgba(194, 64, 45, .22), transparent 65%);
  pointer-events: none;
}
.map-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .35;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
.map-hero > .container { position: relative; z-index: 1; }

.map-hero h1 { color: #fff; max-width: 15ch; }
.map-hero h1 em { color: var(--gold); font-style: italic; font-weight: 400; }
.map-hero .lede { color: #C9D6E4; max-width: 54ch; }
.map-hero .eyebrow { color: var(--gold); }

.map-hero-head {
  display: grid;
  gap: 1.75rem;
  align-items: end;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}
@media (min-width: 900px) {
  .map-hero-head { grid-template-columns: 1.15fr .85fr; gap: 3rem; }
}

/* -------------------------------------------------------------
   2. The map + pin overlay
   ------------------------------------------------------------- */
.map-stage {
  position: relative;
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
}
.map-stage img {
  width: 100%;
  height: auto;
  /* the SVG is already dark-themed; this just seats it on the stage */
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, .38));
}

/* Pins are positioned against the SVG's 959x593 viewBox, so they
   stay locked to their real geographic coordinates at any size. */
.pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 0;
  height: 0;
  color: #fff;
}
.pin-dot {
  position: relative;
  display: block;
  width: clamp(11px, 1.35vw, 16px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--brand-deep);
  background: #8FA9C4;
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), background-color .25s ease;
}
.pin-live .pin-dot { background: var(--accent); }

/* Pulse only on the city that is actually bookable */
.pin-live .pin-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: pin-pulse 2.4s ease-out infinite;
}
@keyframes pin-pulse {
  0%   { transform: scale(.75); opacity: .9; }
  70%  { transform: scale(2.1);  opacity: 0; }
  100% { transform: scale(2.1);  opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pin-live .pin-dot::after { animation: none; opacity: .5; }
}

.pin-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: clamp(.68rem, .95vw, .82rem);
  font-weight: 600;
  letter-spacing: .01em;
  padding: .3em .6em;
  border-radius: var(--r-pill);
  background: rgba(10, 31, 54, .82);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(6px);
  color: #EAF1F8;
  transition: background-color .25s ease, border-color .25s ease, transform .25s ease;
}
.pin-live .pin-label { background: var(--accent); border-color: transparent; color: #fff; }

/* Keep west-coast labels from running off the edge of the stage */
.pin-edge-left .pin-label { left: 0; transform: translateX(-18%); }

/* Hover/focus on either the pin or its city card lights both up */
.pin:hover .pin-dot,
.pin:focus-visible .pin-dot,
.pin.is-active .pin-dot { transform: scale(1.65); }
.pin:hover .pin-label,
.pin:focus-visible .pin-label,
.pin.is-active .pin-label { background: var(--gold); color: var(--brand-deep); border-color: transparent; }
.pin:focus-visible { outline: none; }
.pin:focus-visible .pin-dot { box-shadow: 0 0 0 3px var(--gold); }

.map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  font-size: .88rem;
  color: #AFC2D6;
}
.map-legend span { display: inline-flex; align-items: center; gap: .5rem; }
.map-legend i {
  width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--brand-deep);
  font-style: normal;
}
.map-legend .l-live { background: var(--accent); }
.map-legend .l-soon { background: #8FA9C4; }

/* On small screens the map is decorative context — the cards below
   are the real interface, so hide the fiddly pin labels. */
@media (max-width: 640px) {
  .pin-label { display: none; }
  .map-legend { gap: 1rem; font-size: .8rem; }
}

/* -------------------------------------------------------------
   3. City cards
   ------------------------------------------------------------- */
.city-grid {
  display: grid;
  gap: clamp(1.1rem, 2.2vw, 1.75rem);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .city-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .city-grid { grid-template-columns: repeat(4, 1fr); } }

.city-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .3s cubic-bezier(.2, .7, .3, 1), box-shadow .3s ease, border-color .3s ease;
}
a.city-card:hover,
a.city-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-mist);
}
.city-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
}
.city-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 31, 54, .55), transparent 55%);
}
.city-card-body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.city-card h3 { color: var(--ink); }
.city-card .city-state {
  font-size: .78rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-mute);
}
.city-card p { font-size: .94rem; margin-top: .15rem; }
.city-card-go {
  margin-top: auto; padding-top: .85rem;
  font-weight: 600; font-size: .93rem; color: var(--brand);
}
a.city-card:hover .city-card-go { color: var(--accent); }

/* Status badge sits on the photo */
.city-badge {
  position: absolute;
  top: .8rem; left: .8rem;
  z-index: 1;
  font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .38em .7em;
  border-radius: var(--r-pill);
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 10px rgba(10, 31, 54, .25);
}
.city-badge.is-soon { background: rgba(251, 248, 243, .93); color: var(--brand); }

/* Coming-soon cards read as quieter than the live one */
.city-card.is-soon { background: var(--paper-2); }
.city-card.is-soon .city-card-media { filter: grayscale(.55) contrast(.95); transition: filter .4s ease; }
.city-card.is-soon:hover .city-card-media { filter: grayscale(0) contrast(1); }
.city-card.is-soon .city-card-go { color: var(--ink-mute); }

/* -------------------------------------------------------------
   4. Waitlist
   ------------------------------------------------------------- */
.waitlist-grid { display: grid; gap: clamp(1.75rem, 4vw, 3rem); align-items: start; }
@media (min-width: 900px) { .waitlist-grid { grid-template-columns: 1fr 1fr; } }

.waitlist-form { background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(1.35rem, 3vw, 2rem); box-shadow: var(--shadow); }
.waitlist-form .field select {
  width: 100%;
  padding: .8rem .9rem;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%234A5566' stroke-width='2'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
}
.waitlist-form .field select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* -------------------------------------------------------------
   5. Small helpers
   ------------------------------------------------------------- */
.net-note {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .82rem; color: var(--ink-mute);
}
.net-note svg { flex: none; }
