:root {
  /* Inter** from Google Fonts for clear narrative paragraphs and UI labels */
  --mist-plaster: #EAF7FF;
  --deep-lapis: #123A68;
  --ceramic-cobalt: #2478D4;
  --moonlit-aqua: #8EDAF2;
  --festival-coral: #FF6B6B;
  --warm-tile: #F6E7C8;
  --shadow-indigo: #071A33;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --typing: "Recursive", "SFMono-Regular", Consolas, monospace;
  --body: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--deep-lapis);
  font-family: var(--body);
  background:
    radial-gradient(circle at 20% 8%, rgba(142, 218, 242, 0.75), transparent 24rem),
    radial-gradient(circle at 80% 18%, rgba(36, 120, 212, 0.28), transparent 25rem),
    linear-gradient(180deg, var(--mist-plaster) 0%, #D9F3FF 38%, #BEEBFB 100%);
  overflow-x: hidden;
}

body::after {
  content: "Inter**";
  display: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(30deg, rgba(36, 120, 212, 0.08) 12%, transparent 12%, transparent 88%, rgba(36, 120, 212, 0.08) 88%),
    linear-gradient(150deg, rgba(18, 58, 104, 0.06) 12%, transparent 12%, transparent 88%, rgba(18, 58, 104, 0.06) 88%);
  background-size: 74px 42px;
  opacity: 0.5;
}

.mist-field { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.mist {
  position: absolute;
  width: 46vw;
  height: 18vh;
  border-radius: 999px;
  background: rgba(234, 247, 255, 0.72);
  filter: blur(26px);
  animation: mistDrift 16s ease-in-out infinite alternate;
}
.mist-one { top: 12%; left: -12%; }
.mist-two { top: 46%; right: -18%; animation-delay: -4s; }
.mist-three { bottom: 8%; left: 14%; animation-delay: -9s; }

.casa-spine {
  position: relative;
  z-index: 1;
  width: min(860px, calc(100% - 28px));
  margin: 0 auto;
  padding: 0 0 12vh;
}

.casa-spine::before {
  content: "";
  position: absolute;
  top: 6vh;
  bottom: 4vh;
  left: 50%;
  width: 7px;
  transform: translateX(-50%) skewY(-28deg);
  background: linear-gradient(180deg, transparent, rgba(36, 120, 212, 0.45), rgba(255, 107, 107, 0.35), transparent);
  border-radius: 999px;
  box-shadow: 20px 24px 0 rgba(18, 58, 104, 0.08);
}

.scene {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 12vh 0;
}

.address-plate {
  position: relative;
  width: min(760px, 100%);
  padding: clamp(2rem, 5vw, 4.6rem);
  border: 2px solid rgba(18, 58, 104, 0.72);
  border-radius: 34px 34px 52px 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(234, 247, 255, 0.58)),
    repeating-linear-gradient(45deg, rgba(36, 120, 212, 0.08) 0 12px, transparent 12px 24px);
  box-shadow: 26px 34px 0 rgba(7, 26, 51, 0.12), 0 25px 70px rgba(18, 58, 104, 0.18);
  transform: perspective(1100px) rotateX(2deg) rotateZ(-0.5deg);
}

.address-plate::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(36, 120, 212, 0.38);
  border-radius: inherit;
  pointer-events: none;
}

.hero-plate { text-align: center; padding-top: 7rem; }

.wordmark {
  margin: 0.15rem 0 1rem;
  font-family: var(--display);
  font-size: clamp(4.2rem, 15vw, 9.8rem);
  line-height: 0.82;
  letter-spacing: -0.075em;
  color: var(--shadow-indigo);
  font-variation-settings: "opsz" 80, "wght" 860;
  text-shadow: 4px 5px 0 rgba(142, 218, 242, 0.9), 9px 11px 0 rgba(36, 120, 212, 0.16);
}

.cursor { color: var(--festival-coral); animation: blink 0.8s steps(2, start) infinite; }

.typed-label, .typed-plaque, .room-kicker {
  font-family: var(--typing);
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ceramic-cobalt);
}

.typed-plaque {
  min-height: 3.2rem;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.8rem 1rem;
  margin: 1rem 0 1.2rem;
  color: var(--shadow-indigo);
  background: rgba(234, 247, 255, 0.88);
  border: 1px solid rgba(18, 58, 104, 0.35);
  border-radius: 14px;
  box-shadow: 10px 12px 0 rgba(36, 120, 212, 0.15);
  line-height: 1.55;
}

.typed-plaque::after, .typed-label::after { content: "_"; color: var(--festival-coral); animation: blink 0.8s steps(2, start) infinite; }
.typed-plaque.done::after, .typed-label.done::after { opacity: 0; }
.cream { background: var(--warm-tile); }

h2 {
  max-width: 12ch;
  margin: 0.3rem 0;
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
  color: var(--deep-lapis);
  font-variation-settings: "opsz" 72, "wght" 790;
}

p {
  max-width: 58ch;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.85;
  color: rgba(7, 26, 51, 0.82);
}

.hero-copy { margin-inline: auto; }

.object-link {
  display: inline-block;
  position: relative;
  margin-top: 1rem;
  padding: 0.95rem 1.25rem;
  border: 2px solid var(--shadow-indigo);
  border-radius: 16px 16px 22px 12px;
  font-family: var(--typing);
  font-weight: 700;
  color: var(--shadow-indigo);
  text-decoration: none;
  background: var(--warm-tile);
  box-shadow: 8px 10px 0 rgba(36, 120, 212, 0.28);
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.object-link:hover { transform: translate(4px, 5px); box-shadow: 3px 4px 0 rgba(36, 120, 212, 0.34); background: #FFFFFF; }

.iso-roof {
  position: absolute;
  top: -3.2rem;
  left: 50%;
  width: 190px;
  height: 122px;
  transform: translateX(-50%);
}

.roof-face { position: absolute; top: 34px; width: 108px; height: 70px; border: 2px solid var(--shadow-indigo); opacity: 0; transform-origin: bottom center; }
.roof-left { left: 7px; background: linear-gradient(135deg, var(--ceramic-cobalt), var(--deep-lapis)); transform: skewY(-28deg) translateY(-20px); }
.roof-right { right: 7px; background: linear-gradient(45deg, var(--moonlit-aqua), var(--ceramic-cobalt)); transform: skewY(28deg) translateY(-20px); }
.roof-trim { position: absolute; left: 18px; right: 18px; bottom: 8px; height: 18px; background: var(--festival-coral); border: 2px solid var(--shadow-indigo); transform: skewX(-34deg) scaleX(0); transform-origin: left; }
.roof-ready .roof-left, .roof-ready .roof-right { animation: roofDrop 900ms cubic-bezier(.2,.9,.2,1) forwards; }
.roof-ready .roof-right { animation-delay: 180ms; }
.roof-ready .roof-trim { animation: trimGrow 650ms 620ms ease forwards; }

.scene-orbit .artifact, .iso-icon, .map-icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 54px;
  border: 2px solid var(--shadow-indigo);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--mist-plaster), var(--moonlit-aqua));
  box-shadow: 8px 10px 0 rgba(7, 26, 51, 0.14);
  font-family: var(--typing);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--deep-lapis);
  transform: skewY(-12deg) rotate(-5deg);
}

.scene-orbit .artifact { position: absolute; animation: drift 5s ease-in-out infinite alternate; }
.fish-vane { top: 15%; left: -2%; }
.bell { top: 22%; right: 6%; animation-delay: -1s; }
.lamp { bottom: 19%; left: 5%; animation-delay: -2s; }
.tile-small { bottom: 13%; right: 16%; background: var(--warm-tile) !important; animation-delay: -3s; }
.boat { top: 55%; right: -2%; animation-delay: -4s; }

.step-chain { position: absolute; bottom: 4vh; display: flex; gap: 14px; transform: rotate(-18deg); }
.step-chain span, .tile-river span { width: 52px; height: 25px; background: var(--mist-plaster); border: 2px solid rgba(18, 58, 104, 0.55); box-shadow: 7px 8px 0 rgba(36, 120, 212, 0.16); }

.room-plate { overflow: hidden; }
.room-plate h2, .room-plate p, .room-plate .object-link, .room-kicker { position: relative; z-index: 2; }
.room-plate::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 150px;
  right: -60px;
  bottom: -45px;
  transform: skewY(-23deg) rotate(-5deg);
  background: linear-gradient(135deg, rgba(36, 120, 212, 0.28), rgba(142, 218, 242, 0.45));
  border: 2px solid rgba(18, 58, 104, 0.32);
}

.iso-balcony { position: absolute; top: 2rem; right: 2rem; width: 190px; height: 135px; transform: rotate(-8deg); }
.rail { position: absolute; width: 150px; height: 22px; border: 2px solid var(--shadow-indigo); background: var(--ceramic-cobalt); transform: skewX(-34deg); }
.rail-a { top: 44px; right: 0; }
.rail-b { top: 82px; right: 26px; background: var(--moonlit-aqua); }
.plant { position: absolute; width: 34px; height: 48px; border-radius: 50% 50% 12px 12px; border: 2px solid var(--shadow-indigo); background: var(--festival-coral); animation: sway 2.8s ease-in-out infinite alternate; }
.plant-a { left: 22px; top: 14px; }
.plant-b { right: 10px; top: 28px; animation-delay: -1s; background: var(--warm-tile); }

.icon-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 1.4rem; position: relative; z-index: 3; }
.icon-row .iso-icon:nth-child(even) { background: linear-gradient(135deg, var(--warm-tile), var(--mist-plaster)); transform: skewY(12deg) rotate(5deg); }

.hanging-line { position: absolute; top: 14vh; left: 8%; right: 8%; height: 2px; background: rgba(18, 58, 104, 0.45); transform: rotate(-8deg); }
.hanging-line::before, .hanging-line::after { content: ""; position: absolute; top: -8px; width: 18px; height: 28px; background: var(--festival-coral); border: 2px solid var(--shadow-indigo); }
.hanging-line::before { left: 28%; }
.hanging-line::after { right: 31%; background: var(--warm-tile); }

.table-scene { position: relative; width: min(460px, 100%); height: 190px; margin: 1rem 0; }
.iso-table { position: absolute; left: 36px; top: 62px; width: 300px; height: 95px; border: 2px solid var(--shadow-indigo); background: linear-gradient(135deg, var(--warm-tile), #fff7e4); transform: skewY(-18deg) rotate(-4deg); box-shadow: 28px 30px 0 rgba(7, 26, 51, 0.12); }
.pot { position: absolute; left: 144px; top: 26px; width: 76px; height: 58px; border: 2px solid var(--shadow-indigo); border-radius: 12px 12px 24px 24px; background: var(--ceramic-cobalt); }
.pot::before { content: ""; position: absolute; left: -16px; right: -16px; top: 16px; height: 8px; border: 2px solid var(--shadow-indigo); border-radius: 999px; }
.steam { position: absolute; top: 0; width: 10px; height: 42px; border-radius: 50%; border-left: 3px solid rgba(36, 120, 212, 0.55); animation: steam 2.5s ease-in-out infinite; }
.steam-a { left: 160px; }
.steam-b { left: 196px; animation-delay: -1s; }
.bowl { position: absolute; top: 105px; width: 44px; height: 26px; border: 2px solid var(--shadow-indigo); border-radius: 8px 8px 22px 22px; background: var(--moonlit-aqua); }
.bowl-a { left: 82px; }
.bowl-b { left: 248px; background: var(--festival-coral); }

.symbol-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  gap: 18px;
  max-width: 430px;
  margin: 2rem auto;
  padding: 28px;
  background: rgba(234, 247, 255, 0.55);
  border: 2px solid rgba(18, 58, 104, 0.4);
  border-radius: 30px;
  transform: rotate(-2deg);
}
.map-icon { width: 78px; height: 66px; margin: auto; animation: settle 4s ease-in-out infinite alternate; }
.map-icon:nth-child(3n) { background: var(--warm-tile); }
.map-icon:nth-child(2n) { animation-delay: -1.5s; }

.tile-river { position: absolute; bottom: 10vh; right: 4%; display: flex; gap: 10px; transform: rotate(22deg); }

.doorway { position: relative; width: 280px; height: 245px; margin: 0 auto 2rem; }
.doorway::before { content: ""; position: absolute; inset: 0 22px; border: 3px solid var(--shadow-indigo); border-bottom: 0; border-radius: 130px 130px 4px 4px; background: linear-gradient(180deg, var(--deep-lapis), var(--ceramic-cobalt)); box-shadow: 20px 24px 0 rgba(7, 26, 51, 0.13); }
.door { position: absolute; bottom: 0; width: 106px; height: 158px; border: 2px solid var(--shadow-indigo); background: var(--warm-tile); transition: transform 900ms cubic-bezier(.2,.9,.2,1); z-index: 2; }
.door-left { left: 35px; transform-origin: left center; border-radius: 72px 0 0 0; }
.door-right { right: 35px; transform-origin: right center; border-radius: 0 72px 0 0; }
.door-glow { position: absolute; left: 74px; right: 74px; bottom: 8px; height: 145px; background: var(--moonlit-aqua); filter: blur(18px); opacity: 0.3; }
.doorway.open .door-left { transform: perspective(600px) rotateY(-56deg); }
.doorway.open .door-right { transform: perspective(600px) rotateY(56deg); }
.final-plate { text-align: center; }
.final-plate p { margin-inline: auto; }

.scene.in-view .address-plate { animation: plateArrive 850ms cubic-bezier(.2,.9,.2,1) both; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes mistDrift { to { transform: translate3d(12vw, -5vh, 0) scale(1.16); } }
@keyframes roofDrop { to { opacity: 1; transform: skewY(var(--skew, -28deg)) translateY(0); } }
.roof-right { --skew: 28deg; }
@keyframes trimGrow { to { transform: skewX(-34deg) scaleX(1); } }
@keyframes drift { to { transform: translateY(-18px) skewY(-12deg) rotate(5deg); } }
@keyframes sway { to { transform: rotate(6deg) translateY(-5px); } }
@keyframes steam { 50% { transform: translateY(-14px) translateX(8px); opacity: 0.45; } 100% { transform: translateY(-26px) translateX(-5px); opacity: 0; } }
@keyframes settle { to { transform: translateY(-8px) skewY(-12deg) rotate(4deg); } }
@keyframes plateArrive { from { opacity: 0; transform: perspective(1100px) rotateX(8deg) rotateZ(-2deg) translateY(46px); } }

@media (max-width: 720px) {
  .address-plate { border-radius: 24px; box-shadow: 14px 18px 0 rgba(7, 26, 51, 0.12); }
  .scene-orbit .artifact { display: none; }
  .iso-balcony { opacity: 0.34; right: -3rem; }
  .symbol-map { grid-template-columns: repeat(2, 1fr); }
  .tile-river, .hanging-line { display: none; }
  h2 { max-width: 10ch; }
}
