/* monopole.city — sunset metropolis, split-screen command center */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-purple: #2A0830;
  --c-orange: #D84020;
  --c-pink:   #E84080;
  --c-amber:  #F8A840;
  --c-cream:  #F0E0D0;
  --c-steel:  #C0C8D0;
  --c-ink:    #141020;
}

html, body {
  width: 100%;
  min-height: 100%;
  background: var(--c-purple);
  color: var(--c-cream);
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: clamp(14px, 1vw, 17px);
  line-height: 1.7;
  overflow-x: hidden;
}

body { position: relative; }

/* Sunset gradient backdrop, fixed for scroll persistence */
.sunset-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, var(--c-purple) 0%, var(--c-purple) 18%, var(--c-orange) 60%, var(--c-amber) 100%);
  background-attachment: fixed;
}

/* Cityscape silhouette across viewport bottom */
.cityscape-skyline {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 28vh;
  z-index: -1;
  pointer-events: none;
  filter: drop-shadow(0 -4px 20px rgba(20, 16, 32, 0.4));
}

/* ============= HERO ============= */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 6vh 8vw 30vh;
  text-align: center;
}

.hero-inner { max-width: 900px; width: 100%; }

.logotype {
  font-family: "Zilla Slab", "Work Sans", serif;
  font-weight: 700;
  font-size: clamp(40px, 8vw, 96px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--c-cream);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.05em;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 800ms cubic-bezier(0.22, 0.7, 0.25, 1) 200ms forwards;
  text-shadow: 0 4px 20px rgba(20, 16, 32, 0.5);
}

.logotype-dot { color: var(--c-amber); }

.tagline {
  margin: 1.2em auto 0;
  max-width: 560px;
  color: var(--c-cream);
  font-size: clamp(15px, 1.4vw, 19px);
  letter-spacing: 0.01em;
  opacity: 0;
  animation: fadeUp 800ms cubic-bezier(0.22, 0.7, 0.25, 1) 700ms forwards;
}

.iso-icons {
  margin: 3em auto 2em;
  display: flex;
  justify-content: center;
  gap: clamp(12px, 2vw, 28px);
  flex-wrap: wrap;
}

.iso-icon {
  width: clamp(48px, 6vw, 72px);
  height: clamp(48px, 6vw, 72px);
  opacity: 0;
  transform: translateY(-30px);
  animation: dropIn 600ms cubic-bezier(0.22, 0.7, 0.25, 1) forwards;
  filter: drop-shadow(0 6px 14px rgba(20, 16, 32, 0.4));
}
.iso-icon:nth-child(1) { animation-delay: 1100ms; }
.iso-icon:nth-child(2) { animation-delay: 1180ms; }
.iso-icon:nth-child(3) { animation-delay: 1260ms; }
.iso-icon:nth-child(4) { animation-delay: 1340ms; }
.iso-icon:nth-child(5) { animation-delay: 1420ms; }

.hero-meta {
  display: inline-grid;
  grid-template-columns: auto auto;
  column-gap: 1.5em;
  row-gap: 0.4em;
  font-family: "Overpass Mono", monospace;
  font-size: 12px;
  text-align: left;
  margin-top: 2em;
  padding: 14px 22px;
  border: 1px solid rgba(240, 224, 208, 0.35);
  background: rgba(20, 16, 32, 0.35);
  backdrop-filter: blur(4px);
  color: var(--c-cream);
  opacity: 0;
  animation: fadeUp 800ms cubic-bezier(0.22, 0.7, 0.25, 1) 1700ms forwards;
}

.meta-key { color: var(--c-amber); letter-spacing: 0.12em; }
.meta-val { color: var(--c-cream); }

.scroll-cue {
  position: absolute;
  bottom: 6vh;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Overpass Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--c-cream);
  opacity: 0;
  animation: fadeIn 800ms ease 2000ms forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cue-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--c-cream), transparent);
  animation: cueGlide 1800ms ease-in-out infinite;
  transform-origin: top;
}

/* ============= STRATA ============= */
.strata {
  position: relative;
  z-index: 1;
}

.section.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80vh;
  position: relative;
  padding: 8vh 0;
  border-top: 1px solid rgba(240, 224, 208, 0.12);
}

.section.split::before {
  content: attr(data-section);
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Overpass Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--c-amber);
  opacity: 0.7;
}

.section.split:nth-child(even) {
  direction: rtl;
}
.section.split:nth-child(even) > * {
  direction: ltr;
}

.pane {
  padding: 6vh clamp(24px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.pane-left {
  border-right: 1px dashed rgba(240, 224, 208, 0.2);
}

.section.split:nth-child(even) .pane-left {
  border-right: none;
  border-left: 1px dashed rgba(240, 224, 208, 0.2);
}

.section-tag {
  font-family: "Overpass Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--c-amber);
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.section-title {
  font-family: "Zilla Slab", serif;
  font-weight: 700;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--c-cream);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 800ms ease 100ms, transform 800ms ease 100ms;
}

.section-body {
  color: var(--c-cream);
  font-size: clamp(15px, 1.1vw, 18px);
  margin-bottom: 16px;
  max-width: 56ch;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 800ms ease 200ms, transform 800ms ease 200ms;
}

.section-body:nth-of-type(2) {
  transition-delay: 300ms;
}

.data-list {
  list-style: none;
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  font-family: "Overpass Mono", monospace;
  font-size: 12px;
  border-top: 1px solid rgba(240, 224, 208, 0.25);
  padding-top: 16px;
  max-width: 360px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 800ms ease 400ms, transform 800ms ease 400ms;
}

.data-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dotted rgba(240, 224, 208, 0.15);
  padding: 6px 0;
}

.dk { color: var(--c-amber); letter-spacing: 0.15em; }
.dv { color: var(--c-cream); font-weight: 700; }

/* In-view triggers (added via JS) */
.section.in-view .section-tag,
.section.in-view .section-title,
.section.in-view .section-body,
.section.in-view .data-list {
  opacity: 1;
  transform: translateY(0);
}

/* Iso stage on the right pane */
.iso-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 360px;
}

.iso-build {
  width: clamp(260px, 28vw, 420px);
  height: auto;
  filter: drop-shadow(0 14px 30px rgba(20, 16, 32, 0.5));
}

.iso-piece {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 700ms cubic-bezier(0.22, 0.7, 0.25, 1),
              transform 700ms cubic-bezier(0.22, 0.7, 0.25, 1);
}

.section.in-view .iso-piece {
  opacity: 1;
  transform: translateY(0);
}

.section.in-view .iso-piece.p-base { transition-delay: 50ms; }
.section.in-view .iso-piece.p-t1a  { transition-delay: 220ms; }
.section.in-view .iso-piece.p-t1b  { transition-delay: 280ms; }
.section.in-view .iso-piece.p-t1c  { transition-delay: 340ms; }
.section.in-view .iso-piece.p-t2a  { transition-delay: 460ms; }
.section.in-view .iso-piece.p-t2b  { transition-delay: 520ms; }
.section.in-view .iso-piece.p-t2c  { transition-delay: 580ms; }

.iso-windows rect,
.lamp-windows rect,
.iso-markers circle {
  opacity: 0;
  transition: opacity 400ms ease;
}

.section.in-view .iso-windows rect { opacity: 1; transition-delay: 800ms; }
.section.in-view .lamp-windows rect { opacity: 1; transition-delay: 400ms; }
.section.in-view .iso-markers circle { opacity: 1; transition-delay: 400ms; }

.section.in-view .iso-windows rect:nth-child(odd),
.section.in-view .lamp-windows rect:nth-child(odd) {
  animation: flicker 2.4s ease-in-out infinite;
}

.stage-caption {
  margin-top: 18px;
  font-family: "Overpass Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--c-amber);
}

/* ============= FOOTER ============= */
.city-footer {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, transparent, var(--c-ink) 60%);
  padding: 12vh 8vw 6vh;
  margin-top: 6vh;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
}

.footer-mark {
  font-family: "Zilla Slab", serif;
  font-weight: 700;
  font-size: clamp(20px, 2vw, 28px);
  color: var(--c-cream);
}

.footer-meta {
  display: flex;
  gap: 24px;
  font-family: "Overpass Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--c-amber);
  justify-content: center;
  flex-wrap: wrap;
}

.footer-poles {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.pole {
  width: 4px;
  height: 36px;
  background: linear-gradient(to top, var(--c-orange), var(--c-amber));
  display: inline-block;
}
.pole:nth-child(2) { height: 24px; opacity: 0.7; }
.pole:nth-child(3) { height: 14px; opacity: 0.4; }

/* ============= ANIMATIONS ============= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes cueGlide {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50%      { transform: scaleY(0.4); opacity: 0.4; }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  47%      { opacity: 1; }
  50%      { opacity: 0.35; }
  53%      { opacity: 1; }
}

/* ============= RESPONSIVE ============= */
@media (max-width: 880px) {
  .section.split {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .section.split:nth-child(even) { direction: ltr; }
  .pane-left {
    border-right: none;
    border-bottom: 1px dashed rgba(240, 224, 208, 0.2);
  }
  .section.split:nth-child(even) .pane-left {
    border-left: none;
    border-bottom: 1px dashed rgba(240, 224, 208, 0.2);
  }
  .iso-stage { min-height: 280px; padding: 30px 0; }
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-poles { justify-content: center; }
}

@media (max-width: 520px) {
  .hero { padding: 5vh 6vw 30vh; }
  .iso-icons { gap: 10px; }
  .hero-meta {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
