/* ============================================================
   Horror by Moonlight — stylesheet
   Palette pulled from the hero painting: gold/cream on near-black,
   deep teal cards. Garamond serif throughout.
   ============================================================ */

:root {
  --bg:        #111;     /* page background        */
  --panel:     #0e3242;  /* card / button teal     */
  --panel-hi:  #14495f;  /* hover teal             */
  --ink:       #EBD4A2;  /* cream text             */
  --gold:      #ac903d;  /* accent gold            */
  --disc-dark: #1a1a1a;  /* unlit moon disc        */
  --maxw:      1100px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;            /* lets the footer sit at the bottom */
  flex-direction: column;
  background-color: var(--bg);
  color: var(--ink);
  font-family: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.6;
}

/* Centered, padded content column */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header ---------- */
#main-header { padding: 1.25rem 0 0.5rem; }

#main-header h1 {
  margin: 0;
  color: var(--gold);
  font-size: 2.4rem;
  letter-spacing: 0.08em;
}

/* ---------- Navbar ---------- */
#navbar { border-bottom: 1px solid rgba(172, 144, 61, 0.25); }

#navbar ul { list-style: none; margin: 0; padding: 0.4rem 0; }
#navbar li { display: inline-block; margin-right: 1rem; }

#navbar a {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
}
#navbar a:hover { color: var(--gold); }

/* ---------- Showcase / hero ---------- */
#showcase {
  position: relative;
  background:
    linear-gradient(rgba(17,17,17,0.55), rgba(17,17,17,0.8)),
    url('../images/showcase.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  text-align: center;
  padding: 2.5rem 0 3rem;
}
#showcase .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

/* ---------- Moon phase graphic ---------- */
.moon { width: 140px; height: 140px; overflow: visible; }
.moon-dark {
  fill: var(--disc-dark);
  stroke: rgba(235, 212, 162, 0.18);
  stroke-width: 1;
}
.moon-lit {
  fill: var(--ink);
  filter: drop-shadow(0 0 8px rgba(235, 212, 162, 0.45));
}

/* ---------- Phase readout ---------- */
.phase {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.9;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}
.phase p { margin: 0; }
.phase .label {
  color: var(--gold);
  text-transform: uppercase;
  font-size: 0.72em;
  letter-spacing: 0.14em;
  margin-right: 0.45rem;
}
.phase.major-phase { font-size: 1.35rem; margin-bottom: 0.25rem; }

/* ---------- Main ---------- */
#main { padding: 2rem 0 3rem; }

.section-title {
  text-align: center;
  margin: 0 0 1.5rem;
  font-size: 2rem;
  letter-spacing: 0.06em;
}

/* ---------- Refresh button (skeleton hands) ---------- */
.refresh-row { display: flex; justify-content: center; margin: 1.75rem 0; }

.btn {
  border: none;
  background: none;
  padding: 0.5rem;
  line-height: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
}
.btn img { width: 80px; height: 80px; display: block; }
.btn:hover {
  transform: rotate(45deg) scale(1.05);
  filter: drop-shadow(0 0 8px rgba(235, 212, 162, 0.55));
}
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* ---------- Movie grid ---------- */
.movie-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.movie-card {
  background-color: var(--panel);
  border-radius: 18px;
  overflow: hidden;
  padding-bottom: 1rem;
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fade-up 0.5s ease both;
}
.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.poster {
  width: 100%;
  aspect-ratio: 2 / 3;          /* reserves space so cards don't jump as posters load */
  object-fit: cover;
  display: block;
  background-color: var(--disc-dark);
}

.movie-title { margin: 0.9rem 0.8rem 0.15rem; font-size: 1.3rem; line-height: 1.2; }
.movie-title a { color: var(--ink); text-decoration: none; }
.movie-title a:hover { color: var(--gold); text-decoration: underline; }

.movie-year { margin: 0 0.8rem 0.6rem; color: var(--gold); font-style: italic; }
.movie-overview { margin: 0 1rem; font-size: 0.95rem; line-height: 1.5; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Generic links ---------- */
a { color: var(--gold); }
a:visited { color: var(--ink); }

/* ---------- Welcome / prose (wut page) ---------- */
.prose { max-width: 62ch; margin: 0 auto; }
.prose p { margin: 0 0 1.25rem; }

/* ---------- 404 page ---------- */
.error-code {
  margin: 0;
  color: var(--gold);
  font-size: 4.5rem;
  line-height: 1;
  letter-spacing: 0.1em;
}
.error-sub {
  margin: 0.4rem 0 0;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}
.home-link {
  display: inline-block;
  margin-top: 1.75rem;
  color: var(--gold);
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-bottom: 1px solid rgba(172, 144, 61, 0.4);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.home-link:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Footer ---------- */
#main-footer {
  margin-top: auto;
  background-color: #000;
  color: var(--gold);
  text-align: center;
  padding: 1rem;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border-top: 1px solid rgba(172, 144, 61, 0.25);
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  #main-header h1 { font-size: 1.9rem; }
  .moon { width: 110px; height: 110px; }
  .movie-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* ============================================================
   Horror by Moonlight — stylesheet
   Palette pulled from the hero painting: gold/cream on near-black,
   deep teal cards. Garamond serif throughout.
   ============================================================ */

:root {
  --bg:        #111;     /* page background        */
  --panel:     #0e3242;  /* card / button teal     */
  --panel-hi:  #14495f;  /* hover teal             */
  --ink:       #EBD4A2;  /* cream text             */
  --gold:      #ac903d;  /* accent gold            */
  --disc-dark: #1a1a1a;  /* unlit moon disc        */
  --maxw:      1100px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;            /* lets the footer sit at the bottom */
  flex-direction: column;
  background-color: var(--bg);
  color: var(--ink);
  font-family: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.6;
}

/* Centered, padded content column */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header ---------- */
#main-header { padding: 1.25rem 0 0.5rem; }

#main-header h1 {
  margin: 0;
  color: var(--gold);
  font-size: 2.4rem;
  letter-spacing: 0.08em;
}

/* ---------- Navbar ---------- */
#navbar { border-bottom: 1px solid rgba(172, 144, 61, 0.25); }

#navbar ul { list-style: none; margin: 0; padding: 0.4rem 0; }
#navbar li { display: inline-block; margin-right: 1rem; }

#navbar a {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
}
#navbar a:hover { color: var(--gold); }

/* ---------- Showcase / hero ---------- */
#showcase {
  position: relative;
  background:
    linear-gradient(rgba(17,17,17,0.10), rgba(17,17,17,0.8)),
    url('../images/showcase.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  text-align: center;
  padding: 2.5rem 0 3rem;
}
#showcase .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

/* ---------- Moon phase graphic ---------- */
.moon { width: 140px; height: 140px; }
.moon-dark {
  fill: var(--disc-dark);
  stroke: rgba(235, 212, 162, 0.18);
  stroke-width: 1;
}
.moon-lit {
  fill: var(--ink);
  filter: drop-shadow(0 0 10px rgba(235, 212, 162, 0.55));
}

/* ---------- Phase readout ---------- */
.phase {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.9;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}
.phase p { margin: 0; }
.phase .label {
  color: var(--gold);
  text-transform: uppercase;
  font-size: 0.72em;
  letter-spacing: 0.14em;
  margin-right: 0.45rem;
}
.phase.major-phase { font-size: 1.35rem; margin-bottom: 0.25rem; }

/* ---------- Main ---------- */
#main { padding: 2rem 0 3rem; }

.section-title {
  text-align: center;
  margin: 0 0 1.5rem;
  font-size: 2rem;
  letter-spacing: 0.06em;
}

/* ---------- Refresh button (skeleton hands) ---------- */
.refresh-row { display: flex; justify-content: center; margin: 1.75rem 0; }

.btn {
  border: none;
  background: none;
  padding: 0.5rem;
  line-height: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
}
.btn img { width: 80px; height: 80px; display: block; }
.btn:hover {
  transform: rotate(45deg) scale(1.05);
  filter: drop-shadow(0 0 8px rgba(235, 212, 162, 0.55));
}
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* ---------- Movie grid ---------- */
.movie-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.movie-card {
  background-color: var(--panel);
  border-radius: 18px;
  overflow: hidden;
  padding-bottom: 1rem;
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fade-up 0.5s ease both;
}
.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.poster {
  width: 100%;
  aspect-ratio: 2 / 3;          /* reserves space so cards don't jump as posters load */
  object-fit: cover;
  display: block;
  background-color: var(--disc-dark);
}

.movie-title { margin: 0.9rem 0.8rem 0.15rem; font-size: 1.3rem; line-height: 1.2; }
.movie-title a { color: var(--ink); text-decoration: none; }
.movie-title a:hover { color: var(--gold); text-decoration: underline; }

.movie-year { margin: 0 0.8rem 0.6rem; color: var(--gold); font-style: italic; }
.movie-overview { margin: 0 1rem; font-size: 0.95rem; line-height: 1.5; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Generic links ---------- */
a { color: var(--gold); }
a:visited { color: var(--ink); }

/* ---------- Welcome / prose (wut page) ---------- */
.prose { max-width: 62ch; margin: 0 auto; }
.prose p { margin: 0 0 1.25rem; }

/* ---------- Footer ---------- */
#main-footer {
  margin-top: auto;
  background-color: #000;
  color: var(--gold);
  text-align: center;
  padding: 1rem;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border-top: 1px solid rgba(172, 144, 61, 0.25);
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  #main-header h1 { font-size: 1.9rem; }
  .moon { width: 110px; height: 110px; }
  .movie-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
