/*
 * guide.css — styling for the Rich Location Guide (issue #11).
 *
 * The "pocket guide" that the Alhambra geofence buzz escalates into (reveal.js beat 4): a
 * hero image with a gradient scrim and the location name, then a scrollable body of intro,
 * "Did you know" facts, "Look for", a lazy video, practical info, and links. Mobile-first; it
 * reads like a beautiful card from the real app.
 *
 * Tokens (--ink/--accent/--line/…) come from crew-feed.css / reveal.css (the house style);
 * this file reuses them, so load it alongside those. The dark hero/scrim mirrors the phone's
 * dark .screen so the guide reads as the same product surface as the buzz it grows out of.
 */

.guide-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: var(--card, #fffbf4);
  border: 1px solid var(--line, #e6ddcd);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  /* Hidden until reveal() toggles .show — the buzz "expands" into the guide. */
  opacity: 0;
  transform: translateY(22px) scale(0.97);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.guide-panel.show {
  opacity: 1;
  transform: none;
}

/* ---- Hero ---------------------------------------------------------------- */

.guide-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #2a221a, #5a3a28);
  overflow: hidden;
}
.guide-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Failed/missing image: collapse to the tinted band (no broken-image icon). */
.guide-hero-noimg .guide-hero-img {
  display: none;
}
.guide-hero-scrim {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 18px 16px;
  background: linear-gradient(
    to top,
    rgba(20, 15, 10, 0.82) 0%,
    rgba(20, 15, 10, 0.35) 42%,
    rgba(20, 15, 10, 0) 72%
  );
}
.guide-kicker {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #efb38f;
  margin-bottom: 5px;
}
.guide-name {
  margin: 0;
  font-family: var(--font-display, Georgia, serif);
  font-optical-sizing: auto;
  font-size: 26px;
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #fffbf4;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}
.guide-credit {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(0, 0, 0, 0.32);
  border-radius: 6px;
  padding: 2px 6px;
  backdrop-filter: blur(2px);
}

/* ---- Body ---------------------------------------------------------------- */

.guide-body {
  padding: 16px 18px 20px;
  max-height: 52vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Each section cascades in on reveal() (deterministic .show toggling). */
.guide-section {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.guide-section.show {
  opacity: 1;
  transform: none;
}

.guide-intro {
  margin: 0 0 16px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2, #5c554b);
}

.guide-h {
  margin: 0 0 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--clay-deep, #a44e2d);
}

/* "Did you know" facts. */
.guide-facts {
  margin-bottom: 18px;
}
.guide-fact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.guide-fact {
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2, #5c554b);
}
.guide-fact::before {
  content: '✦';
  position: absolute;
  left: 2px;
  top: 0;
  color: var(--gold, #b07d18);
  font-size: 12px;
}

/* "Look for" — set apart with a soft tinted card so it reads as the in-person section. */
.guide-lookfor {
  margin-bottom: 18px;
  background: var(--surface-sunken, #f1e9db);
  border: 1px solid var(--line, #e6ddcd);
  border-radius: 14px;
  padding: 14px 15px;
}
.guide-lookfor-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.guide-lookfor-item {
  position: relative;
  padding-left: 24px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2, #5c554b);
}
.guide-lookfor-item::before {
  content: '👁';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 13px;
}

/* ---- Lazy video ---------------------------------------------------------- */

.guide-video {
  margin-bottom: 18px;
}
.guide-video-thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  background: #2a221a;
  font: inherit;
}
.guide-video-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.guide-video-thumb-noimg .guide-video-thumb-img {
  display: none;
}
.guide-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(15, 23, 20, 0.72);
  border: 2px solid rgba(255, 255, 255, 0.9);
  color: #fff;
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
  transition: transform 0.15s ease, background 0.15s ease;
}
.guide-video-thumb:hover .guide-video-play {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(197, 97, 58, 0.9);
}
.guide-video-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 12px 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  text-align: left;
  background: linear-gradient(to top, rgba(8, 16, 13, 0.85), rgba(8, 16, 13, 0));
}
.guide-video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 12px;
  display: block;
}

/* ---- Practical ----------------------------------------------------------- */

.guide-practical {
  margin-bottom: 18px;
}
.guide-practical-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line, #e6ddcd);
}
.guide-practical-row:first-of-type {
  border-top: 0;
}
.guide-practical-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--muted, #8a8175);
  padding-top: 1px;
}
.guide-practical-value {
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-2, #5c554b);
}

/* ---- Links --------------------------------------------------------------- */

.guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.guide-link {
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  color: var(--clay-deep, #a44e2d);
  background: var(--clay-tint, #f6e3d8);
  border: 1px solid #ecccb9;
  border-radius: 9px;
  padding: 7px 13px;
  transition: background 0.15s ease;
}
.guide-link:hover {
  background: #f0d3c2;
}

/* ---- Missing-guide fallback ---------------------------------------------- */

.guide-missing-card {
  padding: 28px 22px;
  text-align: center;
}
.guide-missing-h {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink, #2b2722);
  margin-bottom: 6px;
}
.guide-missing-b {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted, #8a8175);
}

@media (prefers-reduced-motion: reduce) {
  .guide-panel,
  .guide-section {
    transition: none;
  }
}
