/* ============================================================
   PROJECT PAGES — carousel, synopsis, pills, counter, nav arrows
   Shared by page_paris, page_aquidaban, page_cardboard
   ============================================================ */

:root {
  --white:      rgba(255,255,255,0.92);
  --ink:        #1a1814;
  --panel-bg:   rgba(245, 242, 238, 0.96);
  --panel-width: min(560px, 72vw);
  --panel-left:  clamp(48px, 6vw, 120px);
  --easing:     cubic-bezier(0.76, 0, 0.24, 1);
  --duration:   0.72s;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--ink);
  font-family: 'Inter', sans-serif;
}

/* Header colors (dark bg) */
.site-name { color: var(--white); }
.site-nav a { color: var(--white); opacity: 1; text-decoration: none; transition: opacity 0.2s; }
.site-nav a:hover { opacity: 0.6; }
.hamburger span { background: rgba(255,255,255,0.9); }

/* Mobile nav colors (dark) */
@media (max-width: 768px) {
  .mobile-nav { background: rgba(0,0,0,0.96); }
  .mobile-nav a { color: rgba(255,255,255,0.9); }
}

/* ── BACKGROUND ── */
.bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center 40%;
  z-index: 0;
}
.bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 50%, transparent 30%, rgba(10,9,8,0.45) 100%);
}

/* ── SYNOPSIS GRID ── */
.synopsis-grid {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr min(584px, 90vw) 1fr;
  grid-template-rows: 1fr auto 1fr;
  z-index: 15;
  pointer-events: none;
  transition: transform var(--duration) var(--easing),
              opacity  var(--duration) var(--easing);
  will-change: transform, opacity;
}
.synopsis-grid.hidden {
  transform: translateY(calc(50vh + 60%));
  opacity: 0;
}

.synopsis {
  grid-column: 2;
  grid-row: 2;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 32px;
  gap: 23px;
  width: 100%;
  max-height: 80vh;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0px 11px 24px rgba(0,0,0,0.25);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.synopsis-title {
  font-family: 'PP Pangaia', 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 36px;
  color: #1a1a1a;
  align-self: stretch;
}

.synopsis-body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.72;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: stretch;
}
.synopsis-body p { opacity: 0.88; }

/* ── PILL BUTTONS ── */
.btn-pill {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 12px 24px;
  gap: 6px;
  width: 178px;
  height: 41px;
  background: rgba(255,255,255,0.2);
  box-shadow: 0px 4px 16px rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 99px;
  border: none;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 20;
  white-space: nowrap;
  transition: background 0.2s, transform var(--duration) var(--easing), opacity var(--duration) var(--easing);
}
.btn-pill:hover { background: rgba(255,255,255,0.45); }

#btn-synopsis { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(20px); }
#btn-synopsis.visible { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
#btn-pictures { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
#btn-pictures.hidden { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(20px); }

.arrow { display: inline-block; width: 14px; height: 14px; flex-shrink: 0; }

/* ── CAROUSEL ── */
.carousel {
  position: fixed;
  inset: 0;
  z-index: 8;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition: opacity var(--duration) var(--easing);
}
.carousel.visible  { opacity: 1; pointer-events: auto; }
.carousel.behind   { opacity: 1; pointer-events: none; }

.carousel-track {
  display: flex;
  width: 100%; height: 100%;
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.18, 1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100vw;
  width: 100vw; height: 100vh;
  position: relative;
  overflow: hidden;
}
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.carousel-slide.portrait {
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-slide.portrait img { width: auto; height: 100%; max-width: 100%; object-fit: contain; }

/* ── NAV ARROWS ── */
.nav-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, opacity 0.3s;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  opacity: 0;
  pointer-events: none;
}
.nav-btn:hover { background: rgba(255,255,255,0.35); }
.nav-prev { left: 24px; }
.nav-next { right: 24px; }

/* ── COUNTER ── */
.carousel-counter {
  position: fixed;
  bottom: 36px; right: 40px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.08em;
  z-index: 31;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--easing);
}
.carousel-counter.visible { opacity: 1; }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .synopsis-grid { grid-template-columns: 1fr; padding: 0 16px; }
  .synopsis { max-height: none; overflow-y: visible; padding: 16px; }
  .synopsis-title { font-size: 20px; line-height: 24px; }
  .synopsis-body  { font-size: 11px; line-height: 1.6; gap: 10px; }
  .nav-btn        { width: 32px; height: 32px; }
  .nav-prev       { left: 10px; }
  .nav-next       { right: 10px; }
  .carousel-counter { right: 16px; bottom: 20px; font-size: 10px; }
  #btn-pictures, #btn-synopsis { width: 155px; height: 36px; font-size: 10px; bottom: 20px; }
  .carousel-slide.portrait img { height: 100vh; max-width: 100vw; object-fit: contain; }
  .carousel-slide:not(.portrait) img { object-fit: contain; }
  .carousel-slide:not(.portrait) { background: #111; }
}
