/**
 * WO-376 Location Card Experience 3.0
 * Travel-invitation cards for /locations/ index — refinement of WO-374.
 * Presentation only — does not alter canonical Place Records or Atlas engines.
 */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Outfit:wght@400;500;600;700&display=swap");

:root {
  --lc-ink: #1c2430;
  --lc-muted: #5b6573;
  --lc-paper: #f7f8fa;
  --lc-card: #ffffff;
  --lc-line: #e6e9ef;
  --lc-shadow: 0 12px 32px rgba(28, 36, 48, 0.07);
  --lc-shadow-hover: 0 18px 40px rgba(28, 36, 48, 0.11);
  --lc-radius: 1.15rem;
  --lc-radius-media: 0.85rem;
  --lc-accent: #3d6b4f;
  --lc-accent-soft: rgba(61, 107, 79, 0.12);
  --lc-font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --lc-font-body: "Outfit", "Segoe UI", sans-serif;
}

body.lc-index {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(61, 107, 79, 0.08), transparent 55%),
    radial-gradient(900px 420px at 90% 0%, rgba(46, 125, 138, 0.07), transparent 50%),
    var(--lc-paper);
  color: var(--lc-ink);
  font-family: var(--lc-font-body);
  line-height: 1.5;
}

.lc-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #111;
  color: #fff;
  padding: 0.5rem 0.75rem;
  z-index: 100;
}
.lc-skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.lc-header {
  background: linear-gradient(135deg, #16324f 0%, #1f4a6e 55%, #24556f 100%);
  color: #f5f7fa;
  border-bottom: 3px solid #c45c26;
}
.lc-header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 2.25rem;
}
.lc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.lc-nav a {
  color: #f0c56e;
  text-decoration: none;
}
.lc-nav a:hover,
.lc-nav a:focus-visible {
  text-decoration: underline;
  outline: none;
}
.lc-header h1 {
  margin: 0;
  font-family: var(--lc-font-display);
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.lc-header-lead {
  margin: 0.65rem 0 0;
  max-width: 40rem;
  color: rgba(245, 247, 250, 0.88);
  font-size: 1rem;
  font-weight: 400;
}

.lc-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3.75rem;
}

.lc-section {
  margin-bottom: 2rem;
}
/* WO-389B — directory-style section labels removed from index builder.
   Keep title rule inert for any legacy markup; cards follow the hero directly. */
.lc-section-title {
  display: none;
}

.lc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 720px) {
  .lc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .lc-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* —— Card —— */
.lc-card {
  --lc-accent: #3d6b4f;
  --lc-accent-soft: rgba(61, 107, 79, 0.12);
  display: flex;
  flex-direction: column;
  background: var(--lc-card);
  border: 1px solid var(--lc-line);
  border-radius: var(--lc-radius);
  box-shadow: var(--lc-shadow);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.lc-card:hover,
.lc-card:focus-within {
  box-shadow: var(--lc-shadow-hover);
  transform: translateY(-2px);
}

.lc-card[data-accent="parks"] {
  --lc-accent: #3d6b4f;
  --lc-accent-soft: rgba(61, 107, 79, 0.14);
}
.lc-card[data-accent="beach"] {
  --lc-accent: #2f6f9f;
  --lc-accent-soft: rgba(47, 111, 159, 0.14);
}
.lc-card[data-accent="railroad"] {
  --lc-accent: #7a2f3b;
  --lc-accent-soft: rgba(122, 47, 59, 0.14);
}
.lc-card[data-accent="campground"] {
  --lc-accent: #8a6236;
  --lc-accent-soft: rgba(138, 98, 54, 0.14);
}
.lc-card[data-accent="water"] {
  --lc-accent: #2e7d8a;
  --lc-accent-soft: rgba(46, 125, 138, 0.14);
}

/* Hero ~50–60% visual weight via 16:9 + compact body */
.lc-hero {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  flex: 0 0 auto;
  background: linear-gradient(145deg, #243447, #3a5168);
  overflow: hidden;
  border-radius: var(--lc-radius) var(--lc-radius) var(--lc-radius-media) var(--lc-radius-media);
}
.lc-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(to top, rgba(12, 18, 26, 0.55), transparent);
  pointer-events: none;
  z-index: 1;
}
.lc-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.lc-hero-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Desktop-only play overlay — no autoplay; no motion on touch/coarse pointers */
.lc-play-tour {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(12, 18, 26, 0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.lc-play-tour-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(15, 23, 32, 0.82);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
@media (hover: hover) and (pointer: fine) {
  .lc-card:hover .lc-play-tour,
  .lc-card:focus-within .lc-play-tour {
    opacity: 1;
    pointer-events: auto;
    background: rgba(12, 18, 26, 0.28);
  }
  .lc-play-tour:focus-visible {
    opacity: 1;
    pointer-events: auto;
    outline: 2px solid #fff;
    outline-offset: -4px;
  }
}

.lc-ribbons {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  right: 0.65rem;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  pointer-events: none;
}
.lc-ribbon {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(15, 23, 32, 0.72);
  color: #fff;
}
.lc-ribbon-featured {
  background: rgba(196, 92, 38, 0.92);
}
.lc-ribbon-video {
  background: rgba(22, 50, 79, 0.88);
}

.lc-accent-bar {
  height: 4px;
  background: var(--lc-accent);
}

.lc-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.2rem 1.25rem 1.4rem;
  flex: 1;
}

/* Hierarchy: Category → Name → Location → … */
.lc-type {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.35rem;
  margin: 0;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: var(--lc-accent-soft);
  color: var(--lc-accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.lc-type svg {
  width: 0.85rem;
  height: 0.85rem;
  flex-shrink: 0;
}

.lc-name {
  margin: 0;
  font-family: var(--lc-font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.55rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--lc-ink);
}
.lc-name a {
  color: inherit;
  text-decoration: none;
}
.lc-name a:hover,
.lc-name a:focus-visible {
  color: var(--lc-accent);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.lc-location {
  margin: -0.25rem 0 0;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--lc-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.lc-teaser {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--lc-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Compact discovery strip — exploration cues only when count > 0 */
.lc-discover {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0.55rem 0 0;
  border-top: 1px solid var(--lc-line);
}
.lc-discover-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.22rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.4rem;
  background: #f4f6f8;
  color: #3d4654;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.lc-discover-ico {
  font-size: 0.72rem;
}
.lc-discover-count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--lc-ink);
}
.lc-discover-label {
  color: var(--lc-muted);
  font-weight: 500;
}

.lc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.lc-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 0.4rem;
  border: 1px solid var(--lc-line);
  background: #fbfbfc;
  color: #3d4654;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.lc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.1rem;
}
.lc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 2.2rem;
  padding: 0.4rem 0.72rem;
  border-radius: 0.55rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.lc-btn:focus-visible {
  outline: 2px solid var(--lc-accent);
  outline-offset: 2px;
}
.lc-btn-primary {
  background: var(--lc-accent);
  color: #fff;
  border: 1px solid transparent;
}
.lc-btn-primary:hover {
  filter: brightness(1.05);
}
.lc-btn-secondary {
  background: #16324f;
  color: #fff;
  border: 1px solid transparent;
}
.lc-btn-secondary:hover {
  background: #1f4468;
}
.lc-btn-ghost {
  background: transparent;
  color: var(--lc-ink);
  border: 1px solid var(--lc-line);
}
.lc-btn-ghost:hover {
  border-color: var(--lc-accent);
  color: var(--lc-accent);
}

.lc-verified {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--lc-accent);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.lc-gear {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--lc-line);
}
.lc-gear-title {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lc-muted);
}
.lc-gear-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.lc-gear-item a {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-decoration: none;
  color: inherit;
  border-radius: 0.5rem;
  padding: 0.3rem;
}
.lc-gear-item a:hover,
.lc-gear-item a:focus-visible {
  background: var(--lc-accent-soft);
  outline: none;
}
.lc-gear-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 0.4rem;
  background: #f3f5f8;
  border: 1px solid var(--lc-line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lc-gear-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.lc-gear-name {
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.25;
  color: #2a3340;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .lc-card,
  .lc-btn,
  .lc-play-tour {
    transition: none;
  }
  .lc-card:hover,
  .lc-card:focus-within {
    transform: none;
  }
}

/* Touch / coarse: never animate play overlay into view via hover */
@media (hover: none), (pointer: coarse) {
  .lc-play-tour {
    opacity: 0;
    pointer-events: none;
  }
  .lc-card:hover {
    transform: none;
  }
}
