/* ────────────────────────────────────────────────────────────────────────────
   REEL REVIVAL — Bold editorial design system
   Aesthetic: white/grid bg, purple + pink accent blocks, impact typography
──────────────────────────────────────────────────────────────────────────── */

:root {
  /* Palette */
  --purple:     #5B30D0;
  --pink:       #E876C7;
  --yellow:     #F5C518;
  --red-orange: #E8411E;
  --black:      #111111;
  --white:      #ffffff;
  --grey-bg:    #f0f0f0;
  --grey-mid:   #cccccc;

  /* Typography */
  --font-impact: Impact, 'Arial Narrow', Arial, sans-serif;
  --font-body:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing / radius */
  --radius-card: 20px;
  --radius-inner: 12px;
  --radius-pill:  999px;
  --gap: 1.25rem;

  /* Card border */
  --card-border: 3px solid var(--black);
}

/* ── RESET ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--black);
  background-color: var(--grey-bg);
  /* Subtle grid paper texture */
  background-image:
    linear-gradient(rgba(0,0,0,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }
img { display: block; }

/* ── PAGE LAYOUT ────────────────────────────────────────────────────────── */
.page-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* ── IMPACT TITLE UTILITY ───────────────────────────────────────────────── */
.impact-title {
  font-family: var(--font-impact);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 400; /* Impact is inherently heavy */
  text-transform: uppercase;
  color: var(--black);
  line-height: 1;
  margin: 0;
}

.impact-subtitle {
  font-family: var(--font-impact);
  font-size: clamp(0.95rem, 2.2vw, 1.35rem);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--black);
  margin: 0 0 1rem;
}

/* ── HERO CARD ──────────────────────────────────────────────────────────── */
.hero-card {
  background: var(--white);
  border: var(--card-border);
  border-radius: var(--radius-card);
  padding: 2rem 2.5rem 1.75rem;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  margin-bottom: 0.4rem;
}

.hero-headline {
  font-family: var(--font-impact);
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  font-weight: 400;
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--black);
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: 0.92rem;
  color: #444;
  max-width: 65ch;
  margin-bottom: 0.75rem;
}

.hero-emojis {
  font-size: 1.4rem;
  letter-spacing: 0.1em;
}

/* ── FILTER BAR ─────────────────────────────────────────────────────────── */
.filter-bar {
  background: var(--purple);
  border-radius: var(--radius-card);
  padding: 1.5rem 2rem;
  color: var(--white);
}

.filter-top-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.filter-mid-row {
  margin-bottom: 0.75rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.filter-group--city     { flex: 1 1 auto; }
.filter-group--distance { flex: 0 0 160px; }
.filter-group--focus    { flex: 0 0 auto; }

.filter-label {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
}

.filter-input,
.filter-select {
  height: 44px;
  padding: 0 0.75rem;
  border: none;
  border-radius: 8px;
  background: var(--white);
  color: var(--black);
  font-size: 0.95rem;
  font-family: var(--font-body);
  outline: none;
  width: 100%;
}

.filter-input::placeholder { color: #888; }

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

.filter-select--focus { min-width: 260px; }

.filter-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.5rem;
}

/* ── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 1.4rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 700;
  border: 2.5px solid transparent;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
}

.btn:hover  { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); opacity: 1; }

.btn--red {
  background: var(--red-orange);
  color: var(--white);
  border-color: var(--red-orange);
}

.btn--yellow {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--yellow);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

/* Confirm text */
.filter-confirm {
  color: var(--yellow);
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* Status bar (inside filter bar) */
.status-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.5rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  transition: background 0.3s;
}

.status-dot.loading { background: var(--yellow); animation: pulse 1.2s ease-in-out infinite; }
.status-dot.ok      { background: #4ade80; }
.status-dot.error   { background: #f87171; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ── POSTER RADAR ───────────────────────────────────────────────────────── */
.poster-radar {
  background: var(--pink);
  border-radius: var(--radius-card);
  padding: 1.5rem 2rem 2rem;
}

.poster-radar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.poster-radar-hint {
  font-size: 0.88rem;
  color: var(--black);
  text-align: right;
  max-width: 32ch;
  padding-top: 0.5rem;
}

/* Poster scroll row */
.poster-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.poster-scroll::-webkit-scrollbar        { height: 4px; }
.poster-scroll::-webkit-scrollbar-track  { background: transparent; }
.poster-scroll::-webkit-scrollbar-thumb  { background: rgba(0,0,0,0.2); border-radius: 2px; }

/* Individual poster card */
.poster-card {
  flex-shrink: 0;
  width: 145px;
  background: var(--white);
  border: 2.5px solid var(--black);
  border-radius: var(--radius-inner);
  overflow: hidden;
}

.poster-card-img-wrap {
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #ccc;
}

.poster-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-card-title {
  padding: 0.55rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--black);
  line-height: 1.3;
}

.poster-empty {
  padding: 2rem 1rem;
  font-size: 0.9rem;
  color: var(--black);
  opacity: 0.7;
}

/* ── DIGEST OUTPUT ──────────────────────────────────────────────────────── */
.digest-output {
  background: var(--purple);
  border-radius: var(--radius-card);
  padding: 1.5rem 2rem 2rem;
  color: var(--white);
}

.digest-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  margin-bottom: 0.85rem;
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.85);
  flex-wrap: wrap;
}

.digest-count-headline {
  font-family: var(--font-impact);
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.25rem;
  line-height: 1;
}

/* Section block (with slight tint) */
.digest-block {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-inner);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

.digest-block:last-child { margin-bottom: 0; }

.digest-block-title {
  font-family: var(--font-impact);
  font-size: 1.1rem;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.85rem;
}

/* Editor's picks */
.picks-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pick-card {
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius-inner);
  padding: 0.9rem 1rem;
  color: var(--black);
}

.pick-pill {
  display: inline-block;
  border: 2px solid var(--yellow);
  border-radius: var(--radius-pill);
  padding: 0.1rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--black);
  background: var(--white);
  margin-bottom: 0.4rem;
}

.pick-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.2rem;
}

.pick-desc {
  font-size: 0.84rem;
  color: #444;
  line-height: 1.45;
}

/* Day-by-day schedule */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.schedule-day-card {
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius-inner);
  padding: 0.8rem 1rem;
  color: var(--black);
}

.schedule-day-header {
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.schedule-day-events {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0;
}

.schedule-day-events li {
  font-size: 0.84rem;
  color: #333;
  line-height: 1.55;
}

/* Closest theaters */
.theater-list {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0;
}

.theater-list li {
  font-size: 0.88rem;
  color: var(--white);
  line-height: 1.85;
}

/* ── UTILITY ────────────────────────────────────────────────────────────── */
[hidden] { display: none !important; }

/* ── SCROLLBAR (global) ─────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--grey-bg); }
::-webkit-scrollbar-thumb { background: var(--grey-mid); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .page-wrap { padding: 1rem; gap: 1rem; }

  .hero-card { padding: 1.5rem 1.25rem; }

  .filter-bar { padding: 1.25rem; }

  .filter-top-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .filter-group--distance { flex: 1 1 auto; }

  .filter-select--focus { min-width: 0; }

  .poster-radar { padding: 1.25rem 1.25rem 1.5rem; }

  .poster-radar-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .poster-radar-hint { text-align: left; }

  .poster-card { width: 110px; }

  .digest-output { padding: 1.25rem; }

  .digest-meta-row { flex-direction: column; gap: 0.2rem; }
}

@media (max-width: 480px) {
  .filter-actions { flex-direction: column; align-items: flex-start; }

  .btn { width: 100%; }

  .hero-headline { line-height: 1; }
}
