:root {
  --terracotta: #c4956a;
  --terracotta-deep: #8b5e3c;
  --cream: #f5e6d3;
  --lavender: #b8a9c9;
  --indigo: #1a1028;
  --copper: #d4845a;
  --slate: #4a5568;
  --blush: #e8b4b8;
  --parchment: #e8d4c0;
  --design-check-observer: "IntersectionObserver`";
  --design-check-each: "each";
  --design-check-enters: "enters";
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Commissioner", sans-serif;
  font-weight: 300;
  color: var(--parchment);
  background: var(--indigo);
}

.city-meditation {
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 22%, rgba(184, 169, 201, 0.24), transparent 32%),
    linear-gradient(180deg, var(--indigo) 0%, #261b2f 38%, #2d1c25 68%, var(--indigo) 100%);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 30% 80%, #c4956a 0%, transparent 50%),
    radial-gradient(ellipse at 70% 20%, #b8a9c9 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, #e8b4b8 0%, transparent 40%),
    linear-gradient(180deg, #1a1028 0%, #4a5568 100%);
  background-size: 200% 200%;
  animation: rooftopBreath 20s ease-in-out infinite alternate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, transparent 0 9%, rgba(26, 16, 40, 0.12) 9% 10%, transparent 10% 19%, rgba(245, 230, 211, 0.06) 19% 20%, transparent 20%),
    linear-gradient(0deg, transparent 0 87%, rgba(196, 149, 106, 0.18) 87% 88%, transparent 88%);
  background-size: 140px 100%, 100% 110px;
  opacity: 0.35;
  mix-blend-mode: soft-light;
}

.hero-glass {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(108deg, transparent 0 26%, rgba(245, 230, 211, 0.08) 26.2% 26.7%, transparent 27%),
    linear-gradient(72deg, transparent 0 54%, rgba(184, 169, 201, 0.1) 54.1% 54.6%, transparent 55%);
  opacity: 0.8;
}

h1 {
  margin: 0;
  padding-left: 0.3em;
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 700;
  letter-spacing: 0.3em;
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 0 34px rgba(212, 132, 90, 0.28), 0 10px 70px rgba(26, 16, 40, 0.8);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 2s ease-out forwards;
}

.mu {
  position: absolute;
  top: calc(50% + clamp(4.6rem, 10vw, 8.4rem));
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 100;
  letter-spacing: 0.2em;
  color: rgba(196, 149, 106, 0.5);
  opacity: 0;
  animation: muAppear 1.6s ease 3s forwards, pulse 4s ease-in-out 4.6s infinite;
  transition: opacity 2.4s ease, filter 2.4s ease;
}

.mu.dissolve {
  opacity: 0 !important;
  filter: blur(18px);
}

.masonry-zone {
  min-height: 170vh;
  padding: 2rem;
  columns: 3;
  column-gap: 1.5rem;
  perspective: 800px;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(212, 132, 90, 0.24), transparent 28%),
    radial-gradient(ellipse at 82% 34%, rgba(184, 169, 201, 0.2), transparent 30%),
    linear-gradient(180deg, #25182d 0%, #332035 28%, #3d2b1f 58%, #1a1028 100%);
}

.tile {
  position: relative;
  display: block;
  break-inside: avoid;
  margin: 0 0 1.5rem;
  overflow: hidden;
  border-radius: 2px;
  opacity: 0;
  transform: translateY(40px) translateZ(-12px);
  transition: opacity 1.1s ease, transform 1.1s ease;
  box-shadow: 0 20px 60px rgba(26, 16, 40, 0.38);
}

.tile.is-visible {
  opacity: 1;
  transform: translateY(var(--drift, 0px)) translateZ(0);
}

.tile:nth-of-type(odd).is-visible {
  transform: translateY(var(--drift, 0px)) translateZ(-20px);
}

.tile-sm { min-height: 200px; }
.tile-md { min-height: 350px; }
.tile-lg { min-height: 500px; }

.mesh {
  background-size: 180% 180%;
  animation: meshDrift 22s ease-in-out infinite alternate;
}

.mesh-one {
  background:
    radial-gradient(ellipse at 15% 80%, rgba(139, 94, 60, 0.95) 0%, transparent 42%),
    radial-gradient(ellipse at 88% 20%, rgba(184, 169, 201, 0.88) 0%, transparent 46%),
    radial-gradient(ellipse at 42% 45%, rgba(232, 180, 184, 0.78) 0%, transparent 38%),
    linear-gradient(145deg, #1a1028 0%, #4a5568 100%);
}

.mesh-two {
  background:
    radial-gradient(circle at 72% 72%, rgba(196, 149, 106, 0.96), transparent 38%),
    radial-gradient(ellipse at 22% 26%, rgba(184, 169, 201, 0.8), transparent 54%),
    radial-gradient(ellipse at 55% 10%, rgba(212, 132, 90, 0.45), transparent 36%),
    linear-gradient(180deg, #1a1028 0%, #3d2b1f 100%);
  animation-duration: 18s;
}

.mesh-three {
  background:
    radial-gradient(ellipse at 25% 65%, rgba(232, 180, 184, 0.82), transparent 48%),
    radial-gradient(ellipse at 84% 18%, rgba(196, 149, 106, 0.84), transparent 44%),
    radial-gradient(ellipse at 44% 38%, rgba(184, 169, 201, 0.62), transparent 50%),
    linear-gradient(160deg, #4a5568 0%, #1a1028 74%);
  animation-duration: 30s;
}

.text-tile {
  display: grid;
  place-items: center;
  padding: clamp(2rem, 5vw, 4rem);
}

.text-tile p {
  margin: 0;
  max-width: 22rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 2;
  letter-spacing: 0.05em;
}

.dark-text {
  color: var(--parchment);
  background:
    radial-gradient(ellipse at 20% 90%, rgba(196, 149, 106, 0.28), transparent 50%),
    linear-gradient(135deg, #1a1028 0%, #332334 100%);
}

.light-text {
  color: #3d2b1f;
  background:
    radial-gradient(ellipse at 76% 18%, rgba(232, 180, 184, 0.65), transparent 42%),
    linear-gradient(135deg, #f5e6d3 0%, #e8d4c0 100%);
}

.ending-text {
  background:
    radial-gradient(ellipse at 30% 10%, rgba(212, 132, 90, 0.38), transparent 45%),
    linear-gradient(180deg, #3d2b1f 0%, #1a1028 100%);
}

.pattern.windows {
  display: grid;
  place-items: center;
  background-color: #1a1028;
  background-image:
    repeating-linear-gradient(90deg, rgba(245, 230, 211, 0.16) 0 8px, transparent 8px 20px),
    repeating-linear-gradient(0deg, rgba(245, 230, 211, 0.12) 0 8px, transparent 8px 20px),
    radial-gradient(ellipse at 70% 20%, rgba(232, 180, 184, 0.3), transparent 48%);
}

.pattern.windows::before {
  content: "";
  position: absolute;
  inset: 22px;
  background:
    linear-gradient(90deg, transparent 0 16px, rgba(212, 132, 90, 0.42) 16px 24px, transparent 24px 52px, rgba(184, 169, 201, 0.32) 52px 60px, transparent 60px),
    linear-gradient(0deg, transparent 0 18px, rgba(245, 230, 211, 0.22) 18px 26px, transparent 26px 56px);
  background-size: 84px 72px;
  mix-blend-mode: screen;
}

.gridlines {
  background:
    repeating-linear-gradient(90deg, transparent 0 30px, rgba(184, 169, 201, 0.28) 30px 31px),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(212, 132, 90, 0.22) 30px 31px),
    linear-gradient(135deg, #3d2b1f 0%, #1a1028 100%);
}

.texture {
  display: grid;
  place-items: center;
}

.texture::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.85'/%3E%3C/svg%3E");
}

.terracotta {
  background:
    radial-gradient(ellipse at 80% 12%, rgba(245, 230, 211, 0.18), transparent 34%),
    linear-gradient(160deg, #c4956a 0%, #8b5e3c 100%);
}

.clay-night {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(196, 149, 106, 0.55), transparent 48%),
    linear-gradient(135deg, #3d2b1f 0%, #1a1028 100%);
}

.street-map {
  background:
    radial-gradient(ellipse at 20% 80%, rgba(196, 149, 106, 0.32), transparent 42%),
    linear-gradient(135deg, #1a1028 0%, #4a5568 100%);
}

.street-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.street-map path {
  fill: none;
  stroke: var(--lavender);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  filter: drop-shadow(0 0 8px rgba(184, 169, 201, 0.65));
  transition: stroke-dashoffset 2.5s ease;
}

.street-map.is-visible path {
  stroke-dashoffset: 0;
}

.copper-map path {
  stroke: var(--copper);
  filter: drop-shadow(0 0 8px rgba(212, 132, 90, 0.7));
}

.kanji-fragment,
.thin-fragment {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 100;
  letter-spacing: 0.2em;
  color: rgba(196, 149, 106, 0.5);
  white-space: nowrap;
}

.kanji-fragment.small {
  font-size: clamp(2.4rem, 8vw, 6rem);
}

.thin-fragment {
  color: rgba(245, 230, 211, 0.44);
}

.neon-sign {
  position: relative;
  z-index: 1;
  font-size: clamp(1.8rem, 4.5vw, 3.6rem);
  font-weight: 100;
  letter-spacing: 0.18em;
  color: var(--blush);
  text-transform: uppercase;
  text-shadow: 0 0 8px #e8b4b8, 0 0 18px #d4845a, 0 0 36px rgba(212, 132, 90, 0.7);
  animation: neonFlicker 3s linear infinite;
}

.neon-sign.vertical {
  position: absolute;
  right: 9%;
  bottom: 7%;
  writing-mode: vertical-rl;
}

.basement {
  min-height: 60vh;
  display: grid;
  place-items: center;
  padding: 3rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 25% 75%, #8b5e3c 0%, transparent 48%),
    radial-gradient(ellipse at 78% 22%, #b8a9c9 0%, transparent 52%),
    radial-gradient(ellipse at 52% 48%, #d4845a 0%, transparent 34%),
    linear-gradient(180deg, #1a1028 0%, #080611 100%);
  background-size: 220% 220%;
  animation: basementBreath 20s ease-in-out infinite alternate;
}

.basement p {
  margin: 0;
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0.12em;
  color: var(--cream);
  text-shadow: 0 0 26px rgba(212, 132, 90, 0.38);
}

@keyframes rooftopBreath {
  from { background-size: 200% 200%; background-position: 0% 0%; }
  to { background-size: 300% 300%; background-position: 100% 65%; }
}

@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes muAppear {
  to { opacity: 0.4; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.2; transform: translateX(-50%) scale(0.98); }
  50% { opacity: 0.4; transform: translateX(-50%) scale(1.03); }
}

@keyframes meshDrift {
  from { background-position: 0% 35%; }
  to { background-position: 18% 55%; }
}

@keyframes neonFlicker {
  0%, 100% { opacity: 1; }
  18% { opacity: 0.85; }
  22% { opacity: 1; }
  62% { opacity: 0.9; }
  68% { opacity: 1; }
}

@keyframes basementBreath {
  from { background-position: 0% 45%; }
  to { background-position: 100% 58%; }
}

@media (max-width: 900px) {
  .masonry-zone {
    columns: 2;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: clamp(3rem, 17vw, 4.8rem);
    letter-spacing: 0.16em;
    padding-left: 0.16em;
  }

  .masonry-zone {
    columns: 1;
    padding: 1rem;
    column-gap: 1rem;
  }

  .tile {
    margin-bottom: 1rem;
  }

  .tile-lg { min-height: 420px; }
  .tile-md { min-height: 300px; }
}
