/* Opening curtains on the home page (Rajeev, 2026-10-21; option 1).
   Two Umber velvet panels under a valance, a Brass wave on each leading
   edge (D-563). The page loads underneath; curtains.js adds them only when
   they should play, so nothing here shows without JavaScript. */

.curtains {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  pointer-events: auto;
  cursor: pointer;
  overflow: hidden;
}

.curtain {
  position: relative;
  flex: 1 1 50%;
  height: 100%;
  background:
    /* folds: light and shadow bands */
    repeating-linear-gradient(90deg,
      rgba(0, 0, 0, 0.28) 0px, rgba(0, 0, 0, 0.05) 22px,
      rgba(255, 235, 210, 0.10) 38px, rgba(0, 0, 0, 0.06) 54px,
      rgba(0, 0, 0, 0.30) 76px),
    /* light falling from above */
    linear-gradient(180deg, rgba(255, 230, 200, 0.10), rgba(0, 0, 0, 0.35) 92%),
    #5C3A22;
  transition: transform 1.35s cubic-bezier(0.65, 0, 0.25, 1), filter 1.35s ease;
  will-change: transform;
}

.curtain-left { transform-origin: left center; box-shadow: inset -18px 0 30px rgba(0, 0, 0, 0.35); }
.curtain-right { transform-origin: right center; box-shadow: inset 18px 0 30px rgba(0, 0, 0, 0.35); }

/* The Brass wave down each leading edge. */
.curtain-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 26px;
}
.curtain-left .curtain-edge { right: 4px; }
.curtain-right .curtain-edge { left: 4px; transform: scaleX(-1); }
.curtain-edge svg { width: 100%; height: 100%; display: block; }

.curtain-valance {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 9vh;
  min-height: 56px;
  z-index: 2;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.25) 0 18px, rgba(255, 235, 210, 0.08) 18px 36px),
    #4A2E1B;
  border-bottom: 3px solid #A87B2E;
  transition: transform 1.1s cubic-bezier(0.65, 0, 0.25, 1) 0.35s;
}

.curtain-cue {
  position: absolute;
  left: 50%;
  bottom: 12vh;
  transform: translateX(-50%);
  z-index: 3;
  padding: 12px 22px;
  min-height: 44px;
  border: 1px solid rgba(235, 232, 220, 0.6);
  border-radius: 2px;
  background: rgba(30, 18, 10, 0.35);
  color: #EBE8DC;
  font: 600 14px/1.2 'Archivo', system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.3s ease;
}
.curtain-cue:hover, .curtain-cue:focus-visible { background: rgba(30, 18, 10, 0.6); outline: 2px solid #D9B26A; outline-offset: 3px; }

.curtains.open { pointer-events: none; }
.curtains.open .curtain-left { transform: translateX(-100%) scaleX(0.55); filter: brightness(0.8); }
.curtains.open .curtain-right { transform: translateX(100%) scaleX(0.55); filter: brightness(0.8); }
.curtains.open .curtain-valance { transform: translateY(-100%); }
.curtains.open .curtain-cue { opacity: 0; }

/* The filmed curtains (2026-10-22): the film fills the screen, then the
   whole layer fades into the page. */
.curtains-video {
  background: #120A05;
  transition: opacity 0.9s ease;
}
.curtains-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.curtains-video.playing .curtain-cue { opacity: 0; pointer-events: none; }
.curtains-video.open { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .curtain, .curtain-valance { transition: opacity 0.4s ease; }
  .curtains.open .curtain-left, .curtains.open .curtain-right, .curtains.open .curtain-valance { transform: none; opacity: 0; }
}

/* The curtain call: fades in over the page, the curtains close, then the
   last Start free appears on the closed curtain. */
.curtain-call { opacity: 0; transition: opacity 0.5s ease; }
.curtain-call.showing { opacity: 1; }
.curtain-call.showing.open { opacity: 0; transition: opacity 0.9s ease; }
.curtain-call-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease 0.1s;
}
.curtain-call.closed .curtain-call-panel { opacity: 1; pointer-events: auto; }
.curtain-call-line {
  margin: 0;
  color: #EBE8DC;
  font: 400 clamp(26px, 4vw, 40px)/1.2 'Eczar', Georgia, serif;
  text-shadow: 0 2px 16px rgba(18, 10, 5, 0.8);
  text-align: center;
}
.curtain-call-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.curtain-call-actions .btn-secondary { background: rgba(30, 18, 10, 0.45); cursor: pointer; font: inherit; }
/* On the Umber curtain the Umber button disappears: Brass instead. */
.curtain-call-actions .btn-primary { background: #A87B2E; color: #1E1712; font-weight: 700; }
