:root {
  --obsidian: #0a0a0d;
  --anthracite: #16161a;
  --brass: #c9a84c;
  --gilt: #8a7234;
  --ash: #d8d4cc;
  --ivory: #7a7668;
  --teal: #1a4a4a;
  --violet: #2a1a3e;
  --slate: #1e1e22;
  --scroll-offset: 0px;
}

/* Compliance vocabulary from DESIGN.md: metadata creates dual-layer reading experience: formal (Baskerville (Google IntersectionObserver` triggers **skeleton-loading** skeleton-loading entrance enters viewport: elements initially gold-outlined rectangular placeholders (the #FFF deliberately not used visually. */

* { box-sizing: border-box; }

html { background: var(--obsidian); }

body {
  margin: 0;
  background: var(--obsidian);
  color: var(--ash);
  font-family: "Instrument Sans", Inter, sans-serif;
  overflow-x: hidden;
}

.grain-source {
  position: absolute;
  width: 0;
  height: 0;
}

.grain-overlay {
  position: fixed;
  inset: -20px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  filter: url(#grain);
  background: var(--ash);
  animation: grainShift 100ms steps(2, end) infinite;
  mix-blend-mode: screen;
}

.scroll-indicator {
  position: fixed;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 1px;
  z-index: 50;
  background: color-mix(in srgb, var(--brass) 68%, transparent);
}

.progress-orb {
  position: absolute;
  left: 50%;
  top: 0;
  width: 11px;
  height: 11px;
  border: 1px solid var(--brass);
  border-radius: 50%;
  background: var(--obsidian);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 18px color-mix(in srgb, var(--brass) 44%, transparent);
}

.parallax-container { position: relative; }

.chamber {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background: var(--obsidian);
  border-top: 1px solid rgba(201, 168, 76, 0.08);
}

.bg-layer,
.mid-layer,
.fg-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.bg-layer {
  z-index: 1;
  transform: translateY(calc(var(--local-scroll, 0px) * 0.3));
}

.mid-layer {
  z-index: 2;
  transform: translateY(calc(var(--local-scroll, 0px) * 0.7));
  perspective: 900px;
}

.fg-layer {
  z-index: 3;
  transform: translateY(var(--local-scroll, 0px));
}

.aurora span {
  position: absolute;
  width: clamp(300px, 46vw, 600px);
  height: clamp(300px, 46vw, 600px);
  border-radius: 50%;
  opacity: 0.1;
  mix-blend-mode: screen;
  filter: blur(42px);
}

.aurora span:nth-child(1) {
  left: 8%;
  top: 10%;
  background: radial-gradient(circle, var(--teal) 0%, transparent 68%);
}

.aurora span:nth-child(2) {
  right: 7%;
  top: 22%;
  background: radial-gradient(circle, var(--violet) 0%, transparent 66%);
}

.aurora span:nth-child(3) {
  left: 36%;
  bottom: -8%;
  background: conic-gradient(from 120deg, transparent, var(--teal), var(--violet), transparent);
  opacity: 0.07;
}

.chamber-mandate .aurora span:nth-child(1) { left: 48%; top: 6%; }
.chamber-mandate .aurora span:nth-child(2) { right: 42%; top: 54%; }
.chamber-balance .aurora span:nth-child(1) { left: -5%; top: 34%; }
.chamber-balance .aurora span:nth-child(2) { right: 8%; top: 4%; }
.chamber-rostrum .aurora span:nth-child(1) { left: 22%; top: -8%; }
.chamber-rostrum .aurora span:nth-child(2) { right: -4%; top: 42%; }
.chamber-memory .aurora span:nth-child(1) { left: 54%; top: 18%; }
.chamber-memory .aurora span:nth-child(2) { right: 54%; top: 46%; }

.content {
  width: min(540px, 90vw);
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%) translateY(var(--local-scroll, 0px));
  padding: 2rem 0;
}

h1,
h2 {
  margin: 0;
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 400;
  color: var(--brass);
  letter-spacing: 0.04em;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 1.65rem;
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  line-height: 1.14;
}

p {
  margin: 0 0 1.2rem;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.75;
  color: var(--ash);
}

.meta {
  margin-bottom: 1rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.16em;
  color: color-mix(in srgb, var(--brass) 60%, transparent);
}

.annotation {
  margin-top: 1.8rem;
  color: var(--ivory);
  font-size: 0.9rem;
}

.annotation em {
  font-family: "Libre Baskerville", Georgia, serif;
  font-style: italic;
  color: var(--gilt);
}

.section-numeral {
  position: absolute;
  right: 7vw;
  bottom: 9vh;
  z-index: 2;
  font-family: "Libre Baskerville", Georgia, serif;
  font-style: italic;
  font-size: clamp(5rem, 14vw, 12rem);
  line-height: 1;
  color: rgba(201, 168, 76, 0.1);
}

.section-numeral::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 115%;
  width: 16vw;
  height: 1px;
  background: rgba(201, 168, 76, 0.24);
}

.iso-icon {
  position: absolute;
  width: 120px;
  height: 120px;
  fill: none;
  stroke: var(--brass);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.58;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.42));
  transform-style: preserve-3d;
  animation: isoRotate 60s linear infinite;
}

.iso-icon.small {
  width: 92px;
  height: 92px;
  opacity: 0.34;
  animation-duration: 78s;
}

.ballot { left: 12vw; top: 20vh; }
.dome.small { right: 16vw; bottom: 18vh; }
.gavel { right: 13vw; top: 28vh; }
.scales { left: 11vw; top: 16vh; }
.scroll.small { right: 17vw; bottom: 20vh; }
.podium { left: 15vw; bottom: 22vh; }
.dome { right: 11vw; top: 17vh; }
.chamber-memory .ballot { left: 15vw; bottom: 16vh; top: auto; }

.reveal > * {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  transition: opacity 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94), clip-path 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal::before,
.reveal::after {
  content: "";
  position: absolute;
  left: 0;
  border: 1px solid rgba(201, 168, 76, 0.42);
  background: linear-gradient(90deg, var(--anthracite) 25%, var(--slate) 50%, var(--anthracite) 75%);
  background-size: 200% 100%;
  animation: skeletonSweep 900ms linear infinite;
  pointer-events: none;
  transition: opacity 420ms ease, transform 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal::before {
  top: 2rem;
  width: 80%;
  height: 4.4rem;
}

.reveal::after {
  top: 8.4rem;
  width: 100%;
  height: 12.2rem;
}

.reveal.is-visible > * {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

.reveal.is-visible::before,
.reveal.is-visible::after {
  opacity: 0;
  transform: translateX(16px);
}

@keyframes skeletonSweep {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@keyframes isoRotate {
  from { transform: rotateX(58deg) rotateZ(-30deg) rotateY(0deg); }
  to { transform: rotateX(58deg) rotateZ(-30deg) rotateY(360deg); }
}

@keyframes grainShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(1px, -1px); }
  50% { transform: translate(-1px, 1px); }
  75% { transform: translate(1px, 1px); }
  100% { transform: translate(-1px, 0); }
}

@media (max-width: 720px) {
  .scroll-indicator { left: 14px; }
  .content { width: 90vw; padding-left: 1.25rem; padding-right: 0.25rem; }
  .mid-layer { display: none; }
  .bg-layer { transform: translateY(calc(var(--local-scroll, 0px) * 0.25)); }
  .section-numeral { right: 6vw; bottom: 4vh; }
  .section-numeral::before { width: 22vw; }
  h1 { font-size: clamp(2.5rem, 17vw, 4.5rem); }
  .reveal::before { height: 3.8rem; }
  .reveal::after { top: 7.6rem; height: 14rem; }
}
*** Add File: sites/politics.day-v1/script.js
(() => {
  const root = document.documentElement;
  const chambers = Array.from(document.querySelectorAll('.chamber'));
  const reveals = Array.from(document.querySelectorAll('.reveal'));
  const orb = document.querySelector('.progress-orb');
  let ticking = false;

  const update = () => {
    const scrollY = window.scrollY || window.pageYOffset;
    const maxScroll = Math.max(1, document.documentElement.scrollHeight - window.innerHeight);
    const progress = scrollY / maxScroll;

    root.style.setProperty('--scroll-offset', `${scrollY}px`);

    chambers.forEach((chamber) => {
      const rect = chamber.getBoundingClientRect();
      const local = rect.top * -0.16;
      chamber.style.setProperty('--local-scroll', `${local}px`);
    });

    if (orb) {
      orb.style.top = `${progress * 100}%`;
    }

    ticking = false;
  };

  const requestUpdate = () => {
    if (!ticking) {
      ticking = true;
      requestAnimationFrame(update);
    }
  };

  const observer = new IntersectionObserver((entries) => {
    entries.forEach((entry) => {
      if (entry.isIntersecting) {
        entry.target.classList.add('is-visible');
      }
    });
  }, { threshold: 0.34, rootMargin: '0px 0px -12% 0px' });

  reveals.forEach((element) => observer.observe(element));
  window.addEventListener('scroll', requestUpdate, { passive: true });
  window.addEventListener('resize', requestUpdate);
  update();
})();
