/* The Carousel of Progress — a scroll feature whose theater rotates through the decades.
   Server-rendered and fully readable without JS; carousel-of-progress.js layers the
   starfield, the rail, and the rotation on top. On-brand with site.css variables. */

.cop {
  position: relative;
  max-width: 1100px;
  margin: 0 auto var(--space-3xl);
  padding: 0 var(--space-lg);
}

/* Starfield: fixed behind the whole piece, painted by JS (2D parallax). */
.cop-sky {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none;
}

/* ── Scene rail (desktop) ───────────────────────────────────────────────── */
.cop-rail {
  position: fixed; left: calc((100vw - 1100px) / 2 - 58px); top: 50%;
  transform: translateY(-50%); z-index: 5;
  display: none; flex-direction: column; gap: var(--space-md);
  padding-left: 14px;
}
.cop-rail-track {
  position: absolute; left: 3px; top: 4px; bottom: 4px; width: 2px;
  background: var(--hair); border-radius: 2px; overflow: hidden;
}
.cop-rail-fill { position: absolute; left: 0; top: 0; width: 100%; height: 0;
  background: var(--gold); }
.cop-rail-node { display: flex; align-items: center; gap: 8px; text-decoration: none;
  color: var(--muted); font-family: var(--label); font-size: 12px; letter-spacing: 0.06em; }
.cop-rail-dot { width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid var(--rule); background: transparent; transition: all 220ms ease; }
.cop-rail-node.is-active { color: var(--ink); }
.cop-rail-node.is-active .cop-rail-dot { background: var(--gold); border-color: var(--gold);
  box-shadow: 0 0 8px 1px oklch(84% 0.13 86 / 0.55); }
@media (min-width: 1280px) { .cop-rail { display: flex; } }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.cop-hero {
  min-height: 86vh; display: flex; flex-direction: column; justify-content: center;
  align-items: center; text-align: center;
  padding: var(--space-3xl) 0 var(--space-xl); max-width: 64ch; margin: 0 auto;
}
.cop-kicker {
  font-family: var(--label); font-weight: 700; font-size: 12.5px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 var(--space-md);
}
.cop-hero-title {
  font-family: var(--display); font-weight: 400; line-height: 1.07; letter-spacing: -0.02em;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem); color: var(--ink); margin: 0;
  max-width: 17ch; text-wrap: balance;
}
.cop-hero-standfirst {
  margin: var(--space-xl) auto 0; max-width: 50ch;
  font-size: 1.12rem; line-height: 1.6; color: var(--muted);
}
.cop-hero-cue {
  display: inline-flex; align-items: center; gap: 10px; margin-top: var(--space-xl);
  font-family: var(--label); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold); text-decoration: none;
}
.cop-hero-cue-arrow { animation: cop-bob 1.8s ease-in-out infinite; }
@keyframes cop-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* The revolving theater, sticky beside the scenes so it spins in view as you read. */
.cop-stagewrap { position: relative; }
.cop-stage { margin: 0 auto var(--space-xl); }
.cop-stage svg { width: 100%; height: auto; overflow: visible; }
svg.cop-plan { width: 100%; max-width: 340px; margin: 0 auto; }
@media (min-width: 901px) {
  .cop-stagewrap { display: grid; grid-template-columns: 0.74fr 1fr; gap: var(--space-xl); align-items: start; }
  .cop-stage { position: sticky; top: 17vh; height: 66vh; display: grid; place-items: center; margin: 0; }
}

/* Blueprint floor plan: the audience ring revolves; the bay you are reading lights. */
.cop-plan-wall { fill: none; stroke: var(--hair); stroke-width: 1; opacity: 0.55; }
.cop-plan-house {
  transform-box: fill-box; transform-origin: center;
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.cop-aud-wedge { fill: oklch(92% 0.02 90 / 0.025); stroke: var(--rule); stroke-width: 0.75; }
.cop-aud-row { fill: none; stroke: var(--ink-soft); stroke-width: 0.75; stroke-dasharray: 2 3.5; opacity: 0.45; }
.cop-aud-pov .cop-aud-wedge { fill: oklch(84% 0.13 86 / 0.12); stroke: var(--gold); stroke-width: 1.25; }
.cop-aud-pov .cop-aud-row { stroke: var(--gold); opacity: 0.7; }
.cop-core-ring { fill: none; stroke: var(--hair); stroke-width: 1; opacity: 0.45; }
.cop-stage-bay { fill: oklch(92% 0.02 90 / 0.02); stroke: var(--rule); stroke-width: 0.75;
  transition: fill 0.45s ease, stroke 0.45s ease, filter 0.45s ease; }
.cop-stage-bay.is-visited { fill: oklch(84% 0.13 86 / 0.10); stroke: oklch(84% 0.13 86 / 0.45); }
.cop-stage-bay.is-on { fill: oklch(84% 0.13 86 / 0.32); stroke: var(--gold); stroke-width: 1.5;
  filter: drop-shadow(0 0 5px oklch(84% 0.13 86 / 0.6)); }
.cop-core-hub { fill: none; stroke: var(--gold); stroke-width: 1.25; opacity: 0.65; }
.cop-core-star { fill: var(--gold); opacity: 0.9; }
.cop-plan-cap {
  margin: var(--space-md) auto 0; max-width: 30ch; text-align: center;
  font-family: var(--label); font-size: 11.5px; letter-spacing: 0.04em; line-height: 1.5; color: var(--muted);
}

@media (max-width: 900px) {
  .cop-hero { min-height: auto; }
  .cop-stage { width: min(300px, 80%); }
  .cop-beat { min-height: 0; padding: var(--space-2xl) 0; }
}

/* ── Scene beats ────────────────────────────────────────────────────────── */
.cop-track { position: relative; }
.cop-beat {
  position: relative; min-height: 66vh; display: flex; align-items: center;
  padding: var(--space-xl) 0;
}
.cop-ghost {
  position: absolute; left: -0.06em; top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-weight: 700; font-size: clamp(6rem, 22vw, 15rem);
  line-height: 1; color: var(--ink); opacity: 0.045; z-index: -1; pointer-events: none;
  white-space: nowrap;
}
.cop-beat-inner { position: relative; }
.cop-place {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 var(--space-sm);
  font-family: var(--label); font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft);
}
.cop-place::before { content: ""; width: 20px; height: 1px; background: var(--gold); opacity: 0.85; }
.cop-year {
  font-family: var(--display); font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1;
  color: var(--gold); margin: 0 0 var(--space-2xs);
}
.cop-headline {
  font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.12; color: var(--ink); margin: 0 0 var(--space-xs); text-wrap: balance;
}
.cop-marker {
  margin: 0 0 var(--space-lg); font-style: italic; color: var(--gold); font-size: 1.02rem;
}
.cop-body p {
  margin: 0 0 var(--space-md); max-width: 60ch;
  font-size: 1.08rem; line-height: 1.66; color: var(--muted);
}

/* The final-scene permit callout. */
.cop-permit {
  margin-top: var(--space-xl); padding: var(--space-lg) var(--space-xl);
  border: 1px solid oklch(84% 0.13 86 / 0.32); border-radius: 12px;
  background: oklch(84% 0.13 86 / 0.05);
}
.cop-permit-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--label); font-weight: 700; font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 var(--space-md);
}
.cop-permit-kicker::before { content: "✦"; font-size: 10px; }
.cop-permit-list { margin: 0; padding-left: 1.1em; }
.cop-permit-list li { margin: 0 0 var(--space-sm); color: var(--ink-soft); line-height: 1.55; }
.cop-permit-note { margin: var(--space-sm) 0 0; font-size: 0.92rem; color: var(--muted); font-style: italic; }

/* ── Coda ───────────────────────────────────────────────────────────────── */
.cop-coda { max-width: 760px; margin: var(--space-3xl) auto 0;
  border-top: 1px solid var(--hair); padding-top: var(--space-2xl); }
.cop-plan h2, .cop-faq h2 {
  font-family: var(--display); font-weight: 400; font-size: 1.8rem; line-height: 1.1;
  color: var(--ink); margin: 0 0 var(--space-2xs); letter-spacing: -0.01em;
}
.cop-plan-sub { margin: 0 0 var(--space-lg); color: var(--muted); }

/* Plan links as a clean editorial list, not cards. */
.cop-plan-list { list-style: none; margin: 0 0 var(--space-3xl); padding: 0;
  border-top: 1px solid var(--hair); }
.cop-plan-list li { border-bottom: 1px solid var(--hair); }
.cop-plan-link {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--space-lg);
  padding: var(--space-lg) var(--space-2xs); text-decoration: none;
  transition: background 200ms ease;
}
.cop-plan-link:hover { background: oklch(84% 0.13 86 / 0.045); }
.cop-plan-link-t { display: block; font-weight: 600; font-size: 1.08rem; color: var(--ink);
  transition: color 200ms ease; }
.cop-plan-link:hover .cop-plan-link-t { color: var(--gold); }
.cop-plan-link-d { display: block; margin-top: 4px; font-size: 0.95rem; color: var(--muted); }
.cop-plan-arrow { color: var(--gold); font-size: 1.2rem; transition: transform 220ms cubic-bezier(0.22,1,0.36,1); }
.cop-plan-link:hover .cop-plan-arrow { transform: translateX(5px); }

/* FAQ with a custom plus / minus disclosure. */
.cop-faq { margin-top: var(--space-3xl); }
.cop-faq-item { border-bottom: 1px solid var(--hair); }
.cop-faq-item summary {
  cursor: pointer; list-style: none; position: relative;
  padding: var(--space-md) 2rem var(--space-md) 0;
  font-weight: 600; font-size: 1.08rem; color: var(--ink);
}
.cop-faq-item summary::-webkit-details-marker { display: none; }
.cop-faq-item summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  color: var(--gold); font-size: 1.35rem; font-weight: 300; line-height: 1;
}
.cop-faq-item[open] summary::after { content: "\2212"; }
.cop-faq-item summary:hover { color: var(--gold); }
.cop-faq-item p { margin: 0 0 var(--space-md); max-width: 68ch; color: var(--muted); line-height: 1.62; }

.cop-foot { margin-top: var(--space-3xl); text-align: center; color: var(--muted);
  font-family: var(--label); font-size: 13px; letter-spacing: 0.04em; }

/* ── Back to top ────────────────────────────────────────────────────────── */
.cop-totop {
  position: fixed; right: 20px; bottom: 20px; z-index: 6;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--hair); border-radius: 50%; background: oklch(20% 0.02 280 / 0.7);
  color: var(--gold); text-decoration: none; backdrop-filter: blur(6px);
  transition: opacity 220ms ease, transform 220ms ease;
}
.cop-totop.is-tucked { opacity: 0; transform: translateY(8px); pointer-events: none; }
@media (min-width: 1180px) { .cop-totop { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .cop-hero-cue-arrow { animation: none; }
}
