/* ==========================================================================
   COMING SOON PAGES (movies.html, music.html) — loads after css/global.css
   One navy "stage" per page with a big headline and one signature visual:
     Movies → a wall of posters, 3 rows sliding left / right / left (.cs-posters)
     Music  → a wall of equaliser bars                (.cs-eq)
   Then a "Notify me" email form (same subscribe system as Home) and
   quick links to what's already live.
   Brand colours: red #E43A35 · yellow #F5B900 · cyan #00A8D1 · green #69C832 · navy #082653
   ========================================================================== */

.cs-page {
  --cs-navy: #082653;
  --cs-navy-deep: #041631;
  --cs-ink: #f4f7fb;
  --cs-ink-soft: #c7d3e6;
  --cs-red: #E43A35;
  --cs-yellow: #F5B900;
  --cs-cyan: #00A8D1;
  --cs-green: #69C832;
}

/* --------------------------------------------------------------------------
   1. THE STAGE
   -------------------------------------------------------------------------- */
.cs-stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(0, 168, 209, 0.22) 0%, transparent 55%),
    linear-gradient(160deg, var(--cs-navy) 0%, var(--cs-navy-deep) 100%);
  color: var(--cs-ink);
  min-height: min(78vh, 720px);
  display: flex;
  align-items: center;
  padding: 56px 0 64px;
}

.cs-stage-inner {
  position: relative;
  z-index: 2;
}

.cs-copy { max-width: 560px; }

/* Breadcrumb: Home / Entertainments / Movies */
.cs-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  font-size: 0.85rem;
  color: var(--cs-ink-soft);
}
.cs-breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: 0.6; }
.cs-breadcrumb a {
  color: var(--cs-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}
.cs-breadcrumb a:hover { text-decoration-color: var(--cs-yellow); }

/* The headline IS the design: the page name huge, the status line under it */
.cs-title {
  margin: 0;
  line-height: 0.88;
  letter-spacing: -0.045em;
}
.cs-title-word {
  display: block;
  font-size: clamp(4rem, 15vw, 9.5rem);
  font-weight: 900;
  color: var(--cs-ink);
}
.cs-title-status {
  display: block;
  margin-top: 14px;
  font-size: clamp(1.35rem, 3.6vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--cs-yellow);
}

.cs-lead {
  margin: 22px 0 0;
  max-width: 40ch;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--cs-ink-soft);
}

/* --------------------------------------------------------------------------
   2. NOTIFY ME FORM (posts to form-handler.php, handled in global.js)
   -------------------------------------------------------------------------- */
.cs-notify { margin-top: 30px; }
.cs-notify-label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--cs-ink);
}
.cs-form {
  display: flex;
  gap: 8px;
  max-width: 460px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
}
.cs-form input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--cs-ink);
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
}
.cs-form input[type="email"]::placeholder { color: #9fb0c9; }
.cs-form input[type="email"]:focus { outline: none; }
.cs-form:focus-within { border-color: var(--cs-yellow); box-shadow: 0 0 0 3px rgba(245, 185, 0, 0.25); }
.cs-form button {
  flex-shrink: 0;
  padding: 12px 22px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cs-navy);
  background: var(--cs-yellow);
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.cs-form button:hover { background: #ffd24d; }
.cs-form button:focus-visible { outline: 3px solid var(--cs-ink); outline-offset: 2px; }
.cs-form button[disabled] { opacity: 0.7; cursor: progress; }

.cs-note {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: #9fb0c9;
}

/* Result message (text set by global.js) */
.cs-feedback {
  min-height: 1.4em;
  margin-top: 10px;
  font-size: 0.92rem;
  font-weight: 600;
}
.cs-feedback.is-success { color: #9be27a; }
.cs-feedback.is-error   { color: #ffb4b1; }

/* --------------------------------------------------------------------------
   3. MOVIES VISUAL — poster wall: 3 rows, left / right / left
   Each track holds the row's posters twice → moving by half loops seamlessly.
   -------------------------------------------------------------------------- */
.cs-posters {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: -6%;
  width: 62%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(-50%) rotate(-7deg);
  /* fade the wall out towards the text */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 100%);
}
.cs-poster-row { overflow: hidden; }
.cs-poster-track {
  display: flex;
  width: max-content;
  animation: csPostersLeft var(--cs-dur, 70s) linear infinite;
}
.cs-poster-row[data-dir="right"] .cs-poster-track { animation-name: csPostersRight; }

/* Hovering the wall pauses all three rows */
.cs-posters:hover .cs-poster-track { animation-play-state: paused; }

.cs-poster {
  flex-shrink: 0;
  width: 132px;
  aspect-ratio: 2 / 3;
  margin-right: 16px;      /* margin (not gap) keeps both halves exactly equal */
  border-radius: 8px;
  overflow: hidden;
  background: #13284a;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.cs-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder tile (shows until a poster file exists) */
.cs-poster-blank {
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.85);
}
.cs-poster-blank:nth-child(4n + 1) { background: linear-gradient(160deg, var(--cs-red), #7d1b17); }
.cs-poster-blank:nth-child(4n + 2) { background: linear-gradient(160deg, var(--cs-cyan), #03506a); }
.cs-poster-blank:nth-child(4n + 3) { background: linear-gradient(160deg, var(--cs-yellow), #946600); color: var(--cs-navy); }
.cs-poster-blank:nth-child(4n + 4) { background: linear-gradient(160deg, var(--cs-green), #2a6c10); }

@keyframes csPostersLeft {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes csPostersRight {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* --------------------------------------------------------------------------
   4. MUSIC VISUAL — equaliser bars along the bottom/right of the stage
   -------------------------------------------------------------------------- */
.cs-eq {
  position: absolute;
  z-index: 1;
  right: 4%;
  bottom: 0;
  width: 52%;
  height: 78%;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
}
.cs-eq span {
  flex: 1;
  height: var(--h, 50%);
  border-radius: 6px 6px 0 0;
  background: var(--c, var(--cs-cyan));
  opacity: 0.92;
  transform-origin: bottom;
  animation: csEqBounce var(--d, 1.2s) ease-in-out var(--delay, 0s) infinite alternate;
}
.cs-eq span:nth-child(4n + 1) { --c: var(--cs-red); }
.cs-eq span:nth-child(4n + 2) { --c: var(--cs-yellow); }
.cs-eq span:nth-child(4n + 3) { --c: var(--cs-cyan); }
.cs-eq span:nth-child(4n + 4) { --c: var(--cs-green); }

@keyframes csEqBounce {
  from { transform: scaleY(0.25); }
  to   { transform: scaleY(1); }
}

/* --------------------------------------------------------------------------
   5. WHILE YOU WAIT — what's already live
   -------------------------------------------------------------------------- */
.cs-meanwhile { padding: 56px 0 64px; }
.cs-meanwhile .section-title { margin-bottom: 6px; }
.cs-links {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border-light);
}
.cs-links li + li { border-left: 1px solid var(--border-light); }
.cs-links a {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  height: 100%;
  padding: 22px 22px 22px 0;
  color: var(--text-dark);
  text-decoration: none;
}
.cs-links li + li a { padding-left: 22px; }
.cs-links i {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1rem;
  color: #ffffff;
  background: var(--icon-bg, #082653);
}
.cs-links strong { display: block; font-size: 1rem; margin-bottom: 4px; color: var(--cs-navy); }
.cs-links span { display: block; font-size: 0.9rem; line-height: 1.5; color: var(--text-muted); }
.cs-links a:hover strong { color: var(--accent-blue); text-decoration: underline; text-underline-offset: 3px; }
.cs-links a:focus-visible { outline: 3px solid var(--accent-blue); outline-offset: -3px; border-radius: 4px; }

/* --------------------------------------------------------------------------
   6. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .cs-stage { min-height: 0; padding: 40px 0 0; flex-direction: column; align-items: stretch; }
  .cs-copy { max-width: none; }

  /* The poster wall moves under the text instead of beside it */
  .cs-posters {
    position: relative;
    top: auto; right: auto;
    width: 116%;
    margin: 40px 0 10px -8%;
    gap: 12px;
    transform: rotate(-4deg);
    -webkit-mask-image: none;
            mask-image: none;
  }
  .cs-poster { width: 96px; margin-right: 12px; border-radius: 6px; }
  .cs-poster-blank { font-size: 1.5rem; }

  .cs-eq {
    position: relative;
    right: auto;
    width: 100%;
    height: 150px;
    margin-top: 36px;
    gap: 4px;
  }

  .cs-links { grid-template-columns: 1fr; }
  .cs-links li + li { border-left: 0; border-top: 1px solid var(--border-light); }
  .cs-links li + li a { padding-left: 0; }
}

@media (max-width: 480px) {
  .cs-form { flex-direction: column; border-radius: var(--radius-md); }
  .cs-form button { width: 100%; }
}

/* Reduce motion: the strip and the bars stand still */
@media (prefers-reduced-motion: reduce) {
  .cs-poster-track,
  .cs-eq span { animation: none; }
  .cs-eq span { transform: scaleY(0.7); }
}
