/* ============================
   Scott Road Cinema — styles
   ============================ */

:root {
  --nav-h:   88px;
  --yellow:  #c8a820;   /* muted amber-gold, not neon */
  --green:   #48b820;   /* natural green, not lime */
  --dark:    #09090f;
  --card:    rgba(8, 8, 22, 0.88);
  --text:    #a8a8bc;   /* blue-tinted off-white, easy on the eyes */
  --muted:   #666680;
  --border:  #1e1e2e;
  --px:      'Press Start 2P', monospace;
  --sans:    system-ui, -apple-system, 'Segoe UI', sans-serif;
  --panel-h: calc(100vh - var(--nav-h));
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--dark);
}

body {
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  background-image: radial-gradient(ellipse 120% 60% at 50% 0%, #0d1b3e 0%, var(--dark) 70%);
}

/* ---- Stars ---- */
#stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: #8888aa;   /* dimmer stars */
  animation: twinkle var(--dur, 3s) ease-in-out var(--delay, 0s) infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.1; }
  to   { opacity: 0.7; }
}

/* Subtle film-grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: grain 0.4s steps(1) infinite;
}

@keyframes grain {
  0%   { background-position:   0%   0%; }
  20%  { background-position: -12%   8%; }
  40%  { background-position:   6% -15%; }
  60%  { background-position: -18%  12%; }
  80%  { background-position:  10%  -8%; }
  100% { background-position:  -4%  18%; }
}

/* ---- Nav ---- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: #0b0b0b;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-bottom: 2px solid #1a1a1a;
  box-shadow: 0 2px 16px rgba(0,0,0,0.6);
}

/* Film strip sprocket holes */
.nav-strip {
  height: 13px;
  flex-shrink: 0;
  background:
    repeating-linear-gradient(
      to right,
      #0b0b0b 0px,  #0b0b0b 5px,
      #000    5px,  #000    18px,
      #0b0b0b 18px, #0b0b0b 26px
    );
}

.nav-strip.top    { border-bottom: 1px solid #1a1a1a; }
.nav-strip.bottom { border-top:    1px solid #1a1a1a; }

.nav-inner {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }

.nav-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--px);
  font-size: clamp(10px, 1.6vw, 16px);
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 2px;
  transition: color 0.2s, background 0.15s;
  letter-spacing: 0.04em;
  line-height: 1.5;
  border-bottom: 2px solid transparent;
}

.nav-btn:hover { color: var(--yellow); }

.nav-btn.active {
  color: var(--yellow);
  background: rgba(200, 168, 32, 0.08);
  border-bottom-color: var(--yellow);
}

/* Glow pulse — rolls through buttons on load, then repeats every 20s */
/* Cascade glow: all 4 fire 0.4s apart, ~10s gap before next round */
@keyframes nav-glow {
  0%   { color: var(--yellow); }
  5%   { color: var(--yellow); }
  12%  { color: var(--muted);  }
  100% { color: var(--muted);  }
}

.nav-btn                 { animation: nav-glow 13s ease-in-out infinite; }
.nav-btn:nth-child(1)    { animation-delay: 0s;   }
.nav-btn:nth-child(2)    { animation-delay: 0.4s; }
.nav-btn:nth-child(3)    { animation-delay: 0.8s; }
.nav-btn:nth-child(4)    { animation-delay: 1.2s; }

/* ---- Viewport / Panner ---- */
#viewport {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 2;
}

#panner {
  display: grid;
  grid-template-columns: 100vw 100vw;
  grid-template-rows: var(--panel-h) var(--panel-h);
  width: 200vw;
  transition: transform 0.7s cubic-bezier(0.77, 0, 0.175, 1);
  will-change: transform;
}

.panel {
  width: 100vw;
  height: var(--panel-h);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

/* =============================
   HOME
   ============================= */
#panel-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.home-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 16px 36px;
  width: 100%;
  position: relative;
}

.logo-wrapper {
  position: relative;
  width: 100%;
  max-width: min(95vw, 900px);
}

.logo-img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 0 28px rgba(72, 184, 32, 0.2));
  display: block;
}

/* Minecraft-style splash */
.splash-text {
  position: absolute;
  bottom: 16%;
  right: 2%;
  transform: rotate(-15deg);
  transform-origin: center center;
  color: var(--yellow);
  font-family: var(--px);
  font-size: clamp(14px, 2.8vw, 22px);
  line-height: 1.9;
  text-align: center;
  max-width: clamp(160px, 32%, 280px);
  text-shadow: 2px 2px 0 #5a4400, -1px 0 0 #5a4400, 0 -1px 0 #5a4400;
  animation: splash-pulse 2s ease-in-out infinite alternate;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 5;
}

@keyframes splash-pulse {
  from { transform: rotate(-15deg) scale(1);    }
  to   { transform: rotate(-15deg) scale(1.04); }
}

.home-theme {
  margin-top: 16px;
  font-family: var(--px);
  font-size: clamp(13px, 2.4vw, 22px);
  color: var(--green);
  text-align: center;
  line-height: 2.2;
  text-shadow: 1px 1px 0 #1a3a00;
  letter-spacing: 0.05em;
}

.home-tagline {
  margin-top: 14px;
  font-size: clamp(22px, 4.5vw, 36px);
  color: #9898b0;
  text-align: center;
}

.home-address {
  margin-top: 8px;
  font-size: clamp(18px, 3vw, 28px);
  color: #4a4a60;
  text-align: center;
  text-decoration: none;
  transition: color 0.2s;
  display: block;
}

.home-address:hover {
  color: #7a7aaa;
}


/* =============================
   SCHEDULE
   ============================= */
#panel-schedule {
  padding: 44px 24px 88px;
}

.section-heading {
  font-family: var(--px);
  font-size: clamp(20px, 4vw, 36px);
  color: var(--yellow);
  text-align: center;
  margin-bottom: 14px;
  text-shadow: 3px 3px 0 #4a3800;
  line-height: 1.6;
}

.section-sub {
  font-size: clamp(18px, 3vw, 28px);
  color: var(--muted);
  text-align: center;
  margin-bottom: 8px;
}

.section-note {
  font-size: clamp(16px, 2.4vw, 24px);
  color: #44445a;
  text-align: center;
  margin-bottom: 40px;
  font-style: italic;
}

/* Screenings */
.screenings-list {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.screening {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.screening-date-bar {
  background: #0d0d18;
  border-bottom: 1px solid var(--border);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.screening-date {
  font-family: var(--px);
  font-size: clamp(13px, 2.4vw, 22px);
  color: var(--yellow);
  line-height: 1.6;
}

.screening-dusk {
  font-size: clamp(16px, 2.2vw, 24px);
  color: #44445a;
  font-style: italic;
}

.movies-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.movie-card {
  padding: 28px;
  border-right: 1px solid var(--border);
}

.movie-card:last-child { border-right: none; }

.movie-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.audience-tag {
  font-family: var(--px);
  font-size: clamp(10px, 1.5vw, 15px);
  padding: 6px 11px;
  border-radius: 2px;
  letter-spacing: 0.08em;
}

.audience-tag.kids {
  background: #0a2e0a;
  color: var(--green);
  border: 1px solid #1a3a00;
}

.audience-tag.adults {
  background: #2e0a0a;
  color: #b85050;
  border: 1px solid #3a1a00;
}

.movie-rating-badge {
  font-size: clamp(15px, 2vw, 22px);
  color: #44445a;
  background: #111;
  padding: 4px 11px;
  border-radius: 2px;
  border: 1px solid #2a2a3a;
}

.movie-title {
  font-family: var(--px);
  font-size: clamp(12px, 2.2vw, 20px);
  color: #c0c0d8;
  line-height: 2;
  margin-bottom: 12px;
}

.movie-meta {
  font-size: clamp(16px, 2.2vw, 24px);
  color: #50506a;
  margin-bottom: 10px;
}

.movie-times {
  font-family: var(--px);
  font-size: clamp(10px, 1.5vw, 16px);
  color: #78788a;
  background: #060610;
  border: 1px solid var(--border);
  padding: 7px 13px;
  border-radius: 2px;
  margin-bottom: 16px;
  display: inline-block;
  line-height: 1.9;
}

.movie-desc {
  font-size: clamp(17px, 2.4vw, 26px);
  color: #6a6a80;
  line-height: 1.7;
  margin-bottom: 18px;
}

.movie-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.movie-link {
  font-size: clamp(15px, 2vw, 22px);
  padding: 7px 14px;
  border-radius: 2px;
  text-decoration: none;
  background: #0e0e1a;
  border: 1px solid #2a2a3a;
  color: #50506a;
  transition: color 0.2s, border-color 0.2s;
}

.movie-link:hover {
  color: var(--yellow);
  border-color: var(--yellow);
}

/* =============================
   HOW DOES IT WORK
   ============================= */
#panel-howto {
  padding: 44px 24px 88px;
}

.rules-list {
  max-width: 820px;
  margin: 32px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rule-card {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 22px 28px;
  transition: border-color 0.2s;
}

.rule-card:hover { border-color: #2e2e4e; }

.rule-icon {
  font-size: 42px;
  flex-shrink: 0;
  line-height: 1;
  filter: drop-shadow(0 0 5px rgba(200, 168, 32, 0.15));
}

.rule-body { flex: 1; }

.rule-title {
  font-family: var(--px);
  font-size: clamp(11px, 1.8vw, 18px);
  color: var(--yellow);
  margin-bottom: 10px;
  text-shadow: 1px 1px 0 #4a3800;
  line-height: 1.7;
}

.rule-text {
  font-size: clamp(17px, 2.4vw, 26px);
  color: #6a6a80;
  line-height: 1.75;
}

/* =============================
   RSVP
   ============================= */
#panel-rsvp {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 24px 88px;
}

.rsvp-content {
  max-width: 680px;
  width: 100%;
  text-align: center;
}

.pixel-divider {
  height: 4px;
  background: repeating-linear-gradient(
    to right,
    var(--yellow) 0px,  var(--yellow) 4px,
    transparent  4px,  transparent  8px
  );
  margin-bottom: 36px;
  border-radius: 2px;
}

.rsvp-intro {
  font-size: clamp(20px, 3.5vw, 32px);
  color: #8888a0;
  line-height: 1.75;
  margin-bottom: 32px;
}

.rsvp-address-box {
  font-family: var(--px);
  font-size: clamp(11px, 1.8vw, 18px);
  color: #5a5a70;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 18px 32px;
  display: inline-block;
  margin-bottom: 40px;
  line-height: 2.2;
}

.rsvp-address-label {
  color: var(--green);
  display: block;
  margin-bottom: 8px;
  font-size: clamp(9px, 1.4vw, 14px);
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--px);
  font-size: clamp(16px, 3vw, 28px);
  padding: 24px 48px;
  border-radius: 2px;
  text-decoration: none;
  transition: transform 0.1s, box-shadow 0.1s;
  letter-spacing: 0.05em;
  line-height: 1.6;
  text-align: center;
  cursor: pointer;
}

.btn:active {
  transform: translate(3px, 3px) !important;
  box-shadow: none !important;
}

.btn-primary {
  background: var(--yellow);
  color: #1a1000;
  border: 2px solid var(--yellow);
  box-shadow: 4px 4px 0 #4a3800;
}

.btn-primary:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #4a3800;
}

.btn-secondary {
  background: transparent;
  color: var(--yellow);
  border: 2px solid var(--yellow);
  box-shadow: 4px 4px 0 #2e2800;
}

.btn-secondary:hover {
  background: rgba(200, 168, 32, 0.07);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #2e2800;
}

.rsvp-form-section {
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}


/* =============================
   SCROLL HINT ARROW
   ============================= */
#scroll-hint {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

#scroll-hint.visible { opacity: 1; }

.scroll-chevron {
  width: 22px;
  height: 22px;
  border-right: 3px solid var(--yellow);
  border-bottom: 3px solid var(--yellow);
  transform: rotate(45deg);
  animation: scroll-bounce 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(200, 168, 32, 0.4));
}

@keyframes scroll-bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0);   opacity: 1;   }
  50%       { transform: rotate(45deg) translate(4px, 4px); opacity: 0.5; }
}

/* =============================
   SCROLLBARS (webkit)
   ============================= */
.panel::-webkit-scrollbar { width: 5px; }
.panel::-webkit-scrollbar-track { background: transparent; }
.panel::-webkit-scrollbar-thumb { background: #222; border-radius: 2px; }

/* =============================
   MOBILE PORTRAIT  (≤ 640px)
   Swipe nav disabled in script.js at this breakpoint.
   ============================= */
@media (max-width: 640px) {

  /* Nav: fit all four buttons without horizontal scroll */
  .nav-inner { gap: 2px; padding: 0 6px; }
  .nav-btn   { font-size: 9px; padding: 6px 9px; }

  /* Schedule: tight padding, keep 2-column layout */
  #panel-schedule { padding: 24px 8px 64px; }

  .section-heading { font-size: 16px; }
  .section-sub     { font-size: 13px; }
  .section-note    { font-size: 11px; margin-bottom: 24px; }

  .screenings-list { gap: 20px; }

  .screening-date-bar { padding: 10px 12px; }
  .screening-date     { font-size: 9px; }
  .screening-dusk     { font-size: 11px; }

  .movie-card         { padding: 12px 10px; }
  .movie-card-header  { margin-bottom: 8px; }

  .audience-tag       { font-size: 7px;  padding: 3px 5px; }
  .movie-rating-badge { font-size: 10px; padding: 3px 7px; }
  .movie-title        { font-size: 9px;  margin-bottom: 8px; }
  .movie-meta         { font-size: 11px; margin-bottom: 6px; }
  .movie-times        { font-size: 7px;  padding: 4px 8px; margin-bottom: 10px; }
  .movie-desc         { font-size: 11px; line-height: 1.5; margin-bottom: 10px; }
  .movie-links        { gap: 6px; }
  .movie-link         { font-size: 10px; padding: 5px 8px; }

  /* How-to: tighter cards */
  #panel-howto { padding: 24px 16px 64px; }
  .rule-card   { padding: 14px 16px; gap: 14px; }
  .rule-icon   { font-size: 30px; }
  .rule-title  { font-size: 10px; }
  .rule-text   { font-size: 14px; }

  /* RSVP */
  #panel-rsvp { padding: 24px 16px 64px; }
  .rsvp-intro { font-size: 16px; }
  .btn        { font-size: 14px; padding: 16px 28px; }
}
