:root {
  --frost-paper: #F3FAFF;
  --alpine-shadow: #18304A;
  --glacier-blue: #78BDE8;
  --aurora-mint: #68F0C8;
  --private-blush: #FF6F9F;
  --petal-coral: #FFB08A;
  --deep-pine-ink: #0D2A24;
  --greenhouse-glass: #BFEFFF;
  --iso-angle: 26.5deg;
  --terrace-depth: 34px;
  --emotional-temperature: 0;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--alpine-shadow);
  font-family: "Noto Sans", Inter, system-ui, sans-serif;
  background: linear-gradient(180deg, #F3FAFF 0%, #E7F7FF 38%, #DDF8F4 68%, #18304A 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(116deg, transparent 0 44%, rgba(104, 240, 200, .16) 45%, transparent 58%),
    radial-gradient(circle at 22% 16%, rgba(191, 239, 255, .82), transparent 32%),
    radial-gradient(circle at 80% 72%, rgba(255, 111, 159, .12), transparent 28%);
  mix-blend-mode: multiply;
  z-index: 0;
}

.weather-field { position: relative; z-index: 1; }

.altitude-gauge {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 16px 10px;
  border: 1px solid rgba(24, 48, 74, .18);
  border-radius: 999px;
  background: rgba(243, 250, 255, .72);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 42px rgba(24, 48, 74, .13);
}

.gauge-line {
  position: absolute;
  top: 28px;
  bottom: 48px;
  width: 1px;
  background: linear-gradient(#78BDE8, #68F0C8, #FF6F9F);
}

.gauge-mark {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(24, 48, 74, .32);
  border-radius: 4px;
  background: #F3FAFF;
  transform: rotate(45deg);
  transition: transform .35s ease, background .35s ease;
}

.gauge-mark i {
  position: absolute;
  inset: 5px;
  background: #78BDE8;
  border-radius: 50%;
  transition: background .35s ease;
}

.gauge-mark.active { transform: rotate(45deg) scale(1.26); background: #BFEFFF; }
.gauge-mark.active i { background: #FF6F9F; }

#gaugeState {
  writing-mode: vertical-rl;
  font: 600 10px/1 "Noto Sans JP", sans-serif;
  letter-spacing: .16em;
  color: var(--deep-pine-ink);
  text-transform: uppercase;
}

main { width: 100%; }

.terrace {
  min-height: 100vh;
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(420px, 1.28fr);
  align-items: center;
  gap: 5vw;
  padding: 10vh 8vw;
  isolation: isolate;
  --local-warmth: calc((var(--temp) + 10) / 28);
}

.terrace::after {
  content: "";
  position: absolute;
  left: 8vw;
  right: 12vw;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(24, 48, 74, .22), transparent);
}

.terrace.cold { background: linear-gradient(180deg, rgba(243,250,255,.96), rgba(191,239,255,.38)); }
.terrace.refusal { background: linear-gradient(180deg, rgba(232,247,255,.75), rgba(191,239,255,.22)); }
.terrace.evidence { background: linear-gradient(180deg, rgba(243,250,255,.7), rgba(104,240,200,.15)); }
.terrace.thaw { background: linear-gradient(180deg, rgba(221,248,244,.65), rgba(255,176,138,.15)); }
.terrace.aurora { background: linear-gradient(180deg, #18304A 0%, #0D2A24 100%); color: #F3FAFF; overflow: hidden; }

.section-copy {
  max-width: 520px;
  transform: translateY(24px);
  opacity: .25;
  transition: opacity .8s ease, transform .8s ease;
}

.terrace.active .section-copy { opacity: 1; transform: translateY(0); }

.eyebrow {
  margin: 0 0 14px;
  font: 600 12px/1.4 "Noto Sans JP", "Noto Sans", sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--deep-pine-ink);
}

.aurora .eyebrow { color: var(--aurora-mint); }

h1, h2 {
  margin: 0;
  font-family: Manrope, "Noto Sans", sans-serif;
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .92;
}

h1 { font-size: clamp(4rem, 11vw, 10rem); text-shadow: 0 2px 0 #BFEFFF, 0 18px 34px rgba(24, 48, 74, .13); }
h2 { font-size: clamp(3.1rem, 7vw, 7rem); }

.section-copy p:not(.eyebrow) {
  margin: 24px 0 0;
  font-size: clamp(1rem, 1.35vw, 1.24rem);
  line-height: 1.75;
  color: rgba(24, 48, 74, .78);
}

.aurora .section-copy p:not(.eyebrow) { color: rgba(243, 250, 255, .78); }

.diorama {
  perspective: 1100px;
  transform: translateX(var(--offset));
}

.iso-plate {
  position: relative;
  width: min(58vw, 820px);
  min-height: 430px;
  transform: rotateX(58deg) rotateZ(-36deg);
  transform-style: preserve-3d;
  border: 1px solid rgba(24, 48, 74, .16);
  border-radius: 26px;
  box-shadow: 26px 34px 0 rgba(24, 48, 74, .15), 0 44px 80px rgba(24, 48, 74, .19);
  opacity: .65;
  transition: opacity .8s ease, transform .8s ease, filter .8s ease;
}

.terrace.active .iso-plate { opacity: 1; transform: rotateX(58deg) rotateZ(-36deg) translateZ(18px); }

.snow-plate { background: linear-gradient(135deg, #F3FAFF, #BFEFFF 78%); }
.angular-plate { background: linear-gradient(135deg, #EAF8FF, #78BDE8); }
.greenhouse-plate { background: linear-gradient(135deg, #F3FAFF 0%, #CFFAF0 100%); }
.calendar-plate { background: linear-gradient(135deg, #E8FBF5, #BFEFFF 55%, #FFB08A 130%); }
.night-plate { background: linear-gradient(135deg, #18304A, #0D2A24); border-color: rgba(104,240,200,.3); }

.iso-plate::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(24, 48, 74, .14);
  border-radius: 20px;
  transform: translateZ(8px);
}

.contour, .switchback, .ridge { position: absolute; transform: translateZ(18px); }
.contour { border: 1px solid rgba(24,48,74,.18); border-radius: 50%; }
.c1 { width: 62%; height: 46%; left: 16%; top: 20%; }
.c2 { width: 42%; height: 30%; left: 28%; top: 30%; }
.c3 { width: 24%; height: 16%; left: 40%; top: 38%; }
.switchback { height: 4px; background: repeating-linear-gradient(90deg, #18304A 0 22px, transparent 22px 34px); opacity: .34; }
.s1 { width: 230px; left: 72px; top: 296px; transform: translateZ(20px) rotate(14deg); }
.s2 { width: 180px; right: 90px; top: 122px; transform: translateZ(20px) rotate(-18deg); }

.wordmark-engraved {
  position: absolute;
  left: 15%;
  top: 38%;
  transform: translateZ(28px);
  font: 800 54px/.9 Manrope, sans-serif;
  letter-spacing: -.06em;
  color: rgba(24, 48, 74, .13);
  text-shadow: 0 -1px 0 rgba(255,255,255,.92), 0 1px 0 rgba(24,48,74,.14);
}

.bud { position: absolute; width: 20px; height: 38px; transform: translateZ(32px); }
.bud::before { content: ""; position: absolute; bottom: 0; left: 9px; width: 2px; height: 26px; background: #0D2A24; }
.bud span { position: absolute; top: 0; left: 4px; width: 14px; height: 18px; border-radius: 50% 50% 46% 46%; background: #68F0C8; border: 1px solid #0D2A24; }
.b1 { left: 58%; top: 58%; } .b2 { left: 70%; top: 34%; } .b3 { left: 24%; top: 24%; }

.specimen {
  position: absolute;
  z-index: 4;
  padding: 10px 12px;
  min-width: 126px;
  font: 500 12px/1.45 "Noto Sans JP", sans-serif;
  color: #0D2A24;
  background: rgba(243, 250, 255, .82);
  border: 1px solid rgba(24,48,74,.18);
  border-radius: 12px;
  transform: translateZ(64px) rotateZ(36deg) rotateX(-58deg);
  box-shadow: 0 14px 26px rgba(24,48,74,.12);
}
.specimen em { color: #FF6F9F; font-style: normal; }
.tag-one { right: 42px; top: 64px; } .tag-two { left: 58px; top: 42px; }
.tag-three { right: 52px; top: 42px; } .tag-four { left: 50px; bottom: 52px; }
.tag-five { right: 36px; bottom: 62px; } .tag-six { right: 56px; top: 72px; color: #F3FAFF; background: rgba(13,42,36,.64); border-color: rgba(104,240,200,.32); }
.tag-seven { left: 44px; bottom: 42px; max-width: 220px; color: #F3FAFF; background: rgba(24,48,74,.64); border-color: rgba(191,239,255,.28); }

.ridge { background: rgba(24,48,74,.22); height: 8px; border-radius: 99px; }
.ridge-a { width: 52%; left: 13%; top: 28%; transform: translateZ(22px) rotate(16deg); }
.ridge-b { width: 42%; right: 12%; top: 52%; transform: translateZ(22px) rotate(-21deg); }
.ridge-c { width: 36%; left: 22%; bottom: 20%; transform: translateZ(22px) rotate(28deg); }

.speech-shard {
  position: absolute;
  z-index: 5;
  border: 1px solid rgba(24,48,74,.24);
  color: #18304A;
  background: #F3FAFF;
  font: 700 13px/1 Manrope, sans-serif;
  padding: 16px 22px;
  clip-path: polygon(8% 0, 100% 16%, 88% 100%, 0 78%);
  transform: translateZ(56px) rotateZ(36deg) rotateX(-58deg);
  cursor: pointer;
  transition: background .35s ease, color .35s ease, transform .35s ease;
}
.speech-shard::after { content: ""; position: absolute; right: 8px; bottom: -12px; width: 0; height: 0; opacity: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 14px solid #68F0C8; transition: opacity .3s ease, bottom .3s ease; }
.speech-shard:hover, .speech-shard.dewing { background: #BFEFFF; color: #0D2A24; transform: translateZ(70px) rotateZ(36deg) rotateX(-58deg); }
.speech-shard:hover::after, .speech-shard.dewing::after { opacity: 1; bottom: -18px; }
.shard-a { left: 20%; top: 22%; } .shard-b { right: 20%; top: 34%; } .shard-c { left: 42%; bottom: 18%; }
.frost-crystal { position: absolute; color: #F3FAFF; font-size: 42px; text-shadow: 0 0 14px #78BDE8; transform: translateZ(42px); }
.crystal-one { left: 18%; bottom: 28%; } .crystal-two { right: 25%; top: 18%; }

.glasshouse { position: absolute; left: 17%; top: 14%; width: 66%; height: 68%; transform: translateZ(36px); }
.glass { position: absolute; border: 1px solid rgba(24,48,74,.22); background: rgba(191,239,255,.48); backdrop-filter: blur(2px); }
.roof-left { left: 7%; top: 2%; width: 48%; height: 34%; transform: skewY(-20deg); background: linear-gradient(120deg, rgba(191,239,255,.62), rgba(104,240,200,.18)); }
.roof-right { right: 7%; top: 2%; width: 48%; height: 34%; transform: skewY(20deg); }
.wall-front { left: 10%; bottom: 6%; width: 80%; height: 62%; background: rgba(191,239,255,.32); }

.plant { position: absolute; transform: translateZ(54px); }
.plant i, .plant b { display: block; position: absolute; }
.edelweiss { left: 22%; top: 44%; width: 80px; height: 80px; }
.edelweiss i { left: 31px; top: 24px; width: 18px; height: 36px; border-radius: 50%; background: #F3FAFF; border: 1px solid #18304A; transform-origin: 50% 92%; }
.edelweiss i:nth-child(1) { transform: rotate(0deg); } .edelweiss i:nth-child(2) { transform: rotate(72deg); } .edelweiss i:nth-child(3) { transform: rotate(144deg); } .edelweiss i:nth-child(4) { transform: rotate(216deg); }
.edelweiss b { left: 34px; top: 37px; width: 12px; height: 12px; border-radius: 50%; background: #FFB08A; }
.camellia { right: 25%; top: 42%; width: 70px; height: 78px; }
.camellia::before, .saxifrage::before { content: ""; position: absolute; left: 50%; bottom: 0; width: 2px; height: 54px; background: #0D2A24; }
.camellia i { width: 26px; height: 34px; border-radius: 50% 50% 45% 45%; background: #FF6F9F; top: 8px; left: 22px; transform-origin: bottom center; }
.camellia i:nth-child(2) { transform: rotate(35deg); background: #FFB08A; } .camellia b { left: 29px; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: #F3FAFF; }
.saxifrage { left: 48%; top: 56%; width: 80px; height: 68px; }
.saxifrage i { width: 12px; height: 12px; border-radius: 50%; background: #FFB08A; border: 1px solid #FF6F9F; }
.saxifrage i:nth-child(1) { left: 16px; top: 8px; } .saxifrage i:nth-child(2) { left: 40px; top: 0; } .saxifrage i:nth-child(3) { left: 54px; top: 18px; } .saxifrage i:nth-child(4) { left: 26px; top: 26px; } .saxifrage i:nth-child(5) { left: 8px; top: 32px; }
.dew { position: absolute; width: 9px; height: 13px; border-radius: 50% 50% 60% 60%; background: #68F0C8; transform: translateZ(72px); box-shadow: 0 0 18px rgba(104,240,200,.7); }
.d1 { left: 38%; top: 64%; } .d2 { left: 57%; top: 38%; } .d3 { left: 70%; top: 60%; }

.calendar-grid { position: absolute; left: 12%; top: 19%; width: 62%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; transform: translateZ(38px); }
.tile { min-height: 96px; border-radius: 16px; border: 1px solid rgba(24,48,74,.16); background: rgba(243,250,255,.74); padding: 12px; position: relative; box-shadow: inset 0 -10px 0 rgba(120,189,232,.18); }
.tile.warm { box-shadow: inset 0 -12px 0 rgba(255,111,159,.22); }
.tile small { position: absolute; right: 10px; bottom: 8px; font: 700 12px Manrope, sans-serif; color: #18304A; }
.glyph { position: absolute; left: 18px; top: 18px; }
.locked { width: 24px; height: 24px; border: 2px solid #18304A; border-radius: 50% 50% 45% 45%; background: #68F0C8; }
.sprout { width: 34px; height: 34px; border-left: 3px solid #0D2A24; border-bottom: 3px solid #0D2A24; border-radius: 0 0 0 24px; }
.sprout::after { content: ""; position: absolute; right: -10px; top: 2px; width: 20px; height: 12px; border-radius: 50%; background: #68F0C8; }
.droplet { width: 18px; height: 26px; border-radius: 50% 50% 55% 55%; background: #68F0C8; }
.bloom { width: 32px; height: 32px; background: radial-gradient(circle, #F3FAFF 0 16%, #FF6F9F 18% 33%, transparent 35%); }
.bloom.open { transform: scale(1.25); filter: drop-shadow(0 0 12px rgba(255,111,159,.42)); }
.thermometer { position: absolute; right: 16%; top: 20%; width: 34px; height: 210px; border: 2px solid #18304A; border-radius: 999px; transform: translateZ(42px); background: rgba(243,250,255,.48); overflow: hidden; }
.thermometer span { position: absolute; left: 5px; right: 5px; bottom: 5px; height: 70%; border-radius: 999px; background: linear-gradient(#FF6F9F, #FFB08A, #68F0C8); }

.aurora-ribbon { position: absolute; width: 86vw; height: 190px; left: 10vw; border-radius: 50%; filter: blur(6px); opacity: .45; transform: rotate(-8deg); pointer-events: none; }
.ribbon-one { top: 10vh; background: linear-gradient(90deg, transparent, #68F0C8, transparent); animation: auroraDrift 12s ease-in-out infinite alternate; }
.ribbon-two { top: 20vh; left: 0; background: linear-gradient(90deg, transparent, #78BDE8, #FF6F9F, transparent); opacity: .32; animation: auroraDrift 15s ease-in-out infinite alternate-reverse; }
.ribbon-three { top: 2vh; left: 28vw; background: linear-gradient(90deg, transparent, #BFEFFF, transparent); opacity: .28; animation: auroraDrift 18s ease-in-out infinite alternate; }
.mountain-silhouette { position: absolute; left: 12%; right: 12%; bottom: 26%; height: 42%; transform: translateZ(26px); background: linear-gradient(135deg, transparent 0 18%, #0D2A24 18% 42%, transparent 42% 49%, #18304A 49% 78%, transparent 78%); filter: drop-shadow(0 18px 0 rgba(104,240,200,.12)); }
.night-blooms { position: absolute; left: 20%; right: 12%; bottom: 15%; height: 120px; transform: translateZ(66px); }
.night-blooms span { position: absolute; bottom: 0; width: 42px; height: 42px; background: radial-gradient(circle, #F3FAFF 0 13%, #FFB08A 14% 27%, #FF6F9F 28% 44%, transparent 45%); filter: drop-shadow(0 0 14px rgba(255,111,159,.55)); }
.night-blooms span::before { content: ""; position: absolute; left: 20px; top: 38px; width: 2px; height: 52px; background: #68F0C8; }
.night-blooms span:nth-child(1) { left: 4%; transform: scale(.72); } .night-blooms span:nth-child(2) { left: 24%; transform: scale(.94); } .night-blooms span:nth-child(3) { left: 45%; transform: scale(1.2); } .night-blooms span:nth-child(4) { left: 65%; transform: scale(.82); } .night-blooms span:nth-child(5) { left: 82%; transform: scale(1.05); }

.contour, .switchback, .bud, .ridge, .speech-shard, .frost-crystal, .glass, .plant, .dew, .tile, .thermometer, .night-blooms span, .specimen { opacity: 0; transition: opacity .65s ease, transform .65s ease; }
.terrace.active .contour, .terrace.active .switchback, .terrace.active .bud, .terrace.active .ridge, .terrace.active .speech-shard, .terrace.active .frost-crystal, .terrace.active .glass, .terrace.active .plant, .terrace.active .dew, .terrace.active .tile, .terrace.active .thermometer, .terrace.active .night-blooms span, .terrace.active .specimen { opacity: 1; }
.terrace.active .contour:nth-of-type(1), .terrace.active .ridge-a, .terrace.active .glass:nth-child(1), .terrace.active .tile:nth-child(1) { transition-delay: .08s; }
.terrace.active .contour:nth-of-type(2), .terrace.active .ridge-b, .terrace.active .glass:nth-child(2), .terrace.active .tile:nth-child(2) { transition-delay: .18s; }
.terrace.active .contour:nth-of-type(3), .terrace.active .ridge-c, .terrace.active .glass:nth-child(3), .terrace.active .tile:nth-child(3) { transition-delay: .28s; }
.terrace.active .plant, .terrace.active .bud, .terrace.active .tile:nth-child(4) { transition-delay: .42s; }
.terrace.active .dew, .terrace.active .tile:nth-child(5), .terrace.active .tile:nth-child(6), .terrace.active .night-blooms span { transition-delay: .62s; }

@keyframes auroraDrift {
  from { transform: translateX(-3vw) rotate(-8deg) scaleY(.88); }
  to { transform: translateX(4vw) rotate(-5deg) scaleY(1.08); }
}

@media (max-width: 980px) {
  .terrace { grid-template-columns: 1fr; padding: 10vh 7vw 14vh; }
  .diorama { transform: translateX(0); }
  .iso-plate { width: 88vw; min-height: 360px; }
  .altitude-gauge { right: 12px; }
}

@media (max-width: 640px) {
  .iso-plate { width: 105vw; margin-left: -10vw; transform: rotateX(58deg) rotateZ(-36deg) scale(.78); }
  .terrace.active .iso-plate { transform: rotateX(58deg) rotateZ(-36deg) translateZ(18px) scale(.78); }
  .wordmark-engraved { font-size: 34px; }
  .specimen { transform: translateZ(64px) rotateZ(36deg) rotateX(-58deg) scale(.82); }
}
