/* ==========================================================================
   Flawless Properties — event guide and update pages
   Loaded after site.css on /events, the event guides and /tmc-visitor-update.
   Adds the illustrated night hero, photo strip, notice box, tip lists,
   timeline, scroll reveal and the mobile sticky CTA. Everything else comes
   from site.css unchanged.
   ========================================================================== */

/* ---- Notice box --------------------------------------------------------- */
.notice {
  display: flex; gap: 14px; align-items: flex-start;
  background: #FBF4E6; border: 1px solid #EAD6AA; border-left: 4px solid var(--gold);
  border-radius: 14px; padding: 16px 20px; margin-top: 26px; max-width: 720px;
  font-size: .94rem; font-weight: 600; color: var(--ink);
}
.notice .ico { font-size: 1.25rem; line-height: 1.3; flex-shrink: 0; }
.notice a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }

/* ---- Illustrated event hero -------------------------------------------- */
.event-hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin: 18px 24px 0; border-radius: 28px; color: #fff;
  min-height: 520px; display: flex; align-items: flex-start;
  box-shadow: var(--shadow-lg);
}
@media (min-width: 1208px) { .event-hero { max-width: 1160px; margin-left: auto; margin-right: auto; } }
@media (max-width: 560px) { .event-hero { margin: 14px 12px 0; border-radius: 22px; min-height: 600px; } }

.event-hero .art {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block;
}
.event-hero .hero-body { position: relative; padding: 46px 44px 200px; max-width: 760px; }
@media (max-width: 560px) { .event-hero .hero-body { padding: 30px 22px 190px; } }

.event-hero .eyebrow { color: var(--accent); }
.event-hero h1 { color: #fff; margin-top: 10px; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.event-hero p.sub { color: rgba(255, 255, 255, .86); font-size: 1.04rem; max-width: 640px; margin-top: 14px; }
.event-hero .btn-outline { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .45); color: #fff; }
.event-hero .btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, .16); }
.event-hero .btn-primary { background: var(--accent); color: var(--accent-ink); }
.event-hero .btn-primary:hover { filter: brightness(1.08); background: var(--accent); }

.hero-badges { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; align-items: center; }
.date-badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-weight: 600; font-size: .82rem;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 10px 16px; border-radius: 12px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(6px);
}
.countdown-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .08), 0 10px 30px var(--accent-glow);
  animation: chip-pulse 2.8s ease-in-out infinite;
}
.countdown-chip[hidden] { display: none; }
.countdown-chip .n { font-size: 1.45rem; line-height: 1; }
@keyframes chip-pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(255, 255, 255, .08), 0 10px 30px var(--accent-glow); }
  50% { box-shadow: 0 0 0 10px rgba(255, 255, 255, .04), 0 10px 44px var(--accent-glow); }
}

/* Themes */
.theme-halloween { --accent: #FF8A1F; --accent-ink: #1A0B24; --accent-glow: rgba(255, 138, 31, .45); background: #160822; }
.theme-tnf { --accent: #E1263B; --accent-ink: #fff; --accent-glow: rgba(225, 38, 59, .45); background: #0A1733; }

/* SVG motion: light beams breathe, stars twinkle, bats drift. */
.art .beam { transform-box: fill-box; transform-origin: 50% 0; animation: beam-sway 7s ease-in-out infinite; }
.art .beam.b2 { animation-delay: -2s; }
.art .beam.b3 { animation-delay: -4s; }
.art .beam.b4 { animation-delay: -5.5s; }
@keyframes beam-sway {
  0%, 100% { transform: rotate(-2.5deg); opacity: .85; }
  50% { transform: rotate(2.5deg); opacity: 1; }
}
.art .twinkle { animation: twinkle 3.2s ease-in-out infinite; }
.art .twinkle:nth-of-type(3n) { animation-delay: -1.1s; }
.art .twinkle:nth-of-type(3n+1) { animation-delay: -2.2s; }
@keyframes twinkle { 0%, 100% { opacity: .9; } 50% { opacity: .25; } }
.art .bat { animation: bat-drift 9s ease-in-out infinite; }
.art .bat.k2 { animation-duration: 11s; animation-delay: -3s; }
.art .bat.k3 { animation-duration: 13s; animation-delay: -6s; }
@keyframes bat-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-26px, 12px); }
}
.art .crowd-glow { animation: glow 4s ease-in-out infinite; }
@keyframes glow { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }

/* ---- Photo strip -------------------------------------------------------- */
.photo-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr);
  gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 2px 14px; margin-top: 18px;
}
.photo-strip figure {
  margin: 0; scroll-snap-align: start; position: relative;
  border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--brand-tint);
  box-shadow: var(--shadow);
}
.photo-strip img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.photo-strip figure:hover img { transform: scale(1.05); }
.photo-strip figcaption {
  position: absolute; left: 10px; bottom: 10px;
  font-size: .72rem; font-weight: 700; padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .92); color: var(--ink);
}

/* ---- At-a-glance table -------------------------------------------------- */
.glance th[scope="row"] {
  width: 34%; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-soft); font-weight: 700;
}
.glance td { font-weight: 700; }

/* ---- Tip list (emoji bullets) ------------------------------------------ */
.prose ul.tips li::before { content: none; }
.prose ul.tips li { gap: 14px; align-items: flex-start; padding: 12px 0; }
.prose ul.tips li .ico {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-tint); font-size: 1.05rem;
}
.prose ul.tips li strong { color: var(--ink); }

/* Plain calendar list on /events */
.prose ul.cal li::before { content: '📅'; }

/* ---- Timeline ----------------------------------------------------------- */
.timeline { list-style: none; margin: 22px 0 0; padding: 0; max-width: 720px; position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--brand), var(--gold));
  border-radius: 2px;
}
.timeline li { position: relative; padding: 0 0 22px 48px; }
.timeline li::before {
  content: ''; position: absolute; left: 8px; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--brand);
}
.timeline li.peak::before { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 5px rgba(192, 143, 46, .2); }
.timeline .when {
  display: block; font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--brand);
}
.timeline .what { display: block; color: var(--ink-soft); font-size: .94rem; margin-top: 3px; }

/* ---- Event cards (/events) --------------------------------------------- */
.event-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 26px; }
@media (max-width: 860px) { .event-cards { grid-template-columns: 1fr; } }
.event-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 250px; padding: 26px; border-radius: var(--radius); color: #fff;
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.event-card .art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.event-card > *:not(.art) { position: relative; z-index: 1; }
.event-card .emoji { font-size: 2rem; line-height: 1; }
.event-card h3 { font-size: 1.35rem; margin-top: 10px; color: #fff; }
.event-card .meta {
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .8rem; font-weight: 600;
  letter-spacing: .03em; color: rgba(255, 255, 255, .85); margin-top: 4px;
}
.event-card .countdown-chip { align-self: flex-start; font-size: .82rem; padding: 7px 14px; margin-bottom: auto; }
.event-card .countdown-chip .n { font-size: 1rem; }
.event-card .go { margin-top: 14px; font-weight: 800; font-size: .9rem; color: var(--accent); }

/* ---- Update list (/tmc-visitor-update) --------------------------------- */
.update-list { list-style: none; margin: 18px 0 0; padding: 0; max-width: 720px; }
.update-list:empty { display: none; }
.update-list li { border-top: 1px solid var(--line); padding: 14px 0; }
.update-list li:first-child { border-top: none; }
.update-list a { font-weight: 700; color: var(--brand); }
.update-placeholder {
  margin-top: 18px; max-width: 720px; padding: 22px; border-radius: 14px;
  border: 1.5px dashed var(--line); background: var(--card); color: var(--ink-soft); font-weight: 600;
}

/* ---- Sources ------------------------------------------------------------ */
.sources { font-size: .78rem; color: var(--ink-soft); max-width: 780px; margin-top: 28px; }
.sources ul { margin: 6px 0 0; padding-left: 18px; }
.sources a { text-decoration: underline; text-underline-offset: 2px; }

/* ---- Inline link line (cross-links) ------------------------------------ */
.link-line { margin-top: 18px; font-size: .92rem; font-weight: 600; color: var(--ink-soft); }
.link-line a { color: var(--brand); font-weight: 700; }

/* ---- Mobile sticky CTA -------------------------------------------------- */
.sticky-cta { display: none; }
@media (max-width: 760px) {
  .sticky-cta {
    display: inline-flex; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 70;
    box-shadow: var(--shadow-lg); transition: transform .25s ease, opacity .25s ease;
  }
  .sticky-cta.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
  body.has-sticky-cta footer { padding-bottom: 96px; }
}

/* ---- Scroll reveal ------------------------------------------------------ */
/* Only hides content once events.js has confirmed it can reveal it again. */
.js-reveal .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .art .beam, .art .twinkle, .art .bat, .art .crowd-glow, .countdown-chip { animation: none !important; }
  .js-reveal .reveal { opacity: 1; transform: none; }
  .photo-strip figure:hover img { transform: none; }
}
