:root {
  --ink: #f6f1e8;
  --gold: #e7d3a1;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Outfit", "Avenir Next", sans-serif;
  color: var(--ink);
}

#snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 8;
  pointer-events: none;
}

/* ---------- index ---------- */

.stage {
  min-height: 100vh;
  background: #07060b;
}

.bokeh {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 214, 150, 0.22), transparent 16%),
    radial-gradient(circle at 78% 14%, rgba(255, 228, 180, 0.28), transparent 14%),
    radial-gradient(circle at 84% 62%, rgba(255, 200, 140, 0.12), transparent 18%),
    radial-gradient(circle at 12% 70%, rgba(190, 200, 255, 0.08), transparent 16%),
    radial-gradient(ellipse at 50% 110%, rgba(40, 30, 20, 0.5), transparent 50%),
    #09080e;
}

.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px 48px;
  gap: 22px;
}

.portrait {
  margin: 0;
  width: min(560px, 92vw);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.12);
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 68vh;
  object-fit: cover;
  object-position: center 18%;
}

.start {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 240px;
  height: 240px;
  padding: 18px;
  border-radius: 50%;
  overflow: hidden;
  text-decoration: none;
  text-align: center;
  color: #fff8ea;
  background:
    linear-gradient(180deg, rgba(8, 7, 6, 0.12), rgba(8, 7, 6, 0.62)),
    url("../img/balerin.jpg") center 14% / cover no-repeat;
  border: 2px solid rgba(255, 248, 234, 0.85);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(231, 211, 161, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.start span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 72px;
  padding: 8px 10px;
  border-radius: 18px;
  background: rgba(10, 8, 6, 0.62);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: #fff8ea;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.start:hover {
  transform: translateY(-3px);
  box-shadow:
    0 22px 46px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 236, 210, 0.45);
}

.start.expanding,
.start.expanding:hover {
  transform: none;
}

body.leaving::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #0c0b10;
  pointer-events: none;
  animation: veil-in 0.45s ease forwards;
}

@keyframes veil-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

html.arrive body.room-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #0c0b10;
  pointer-events: none;
  animation: veil-out 0.85s ease forwards;
}

@keyframes veil-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ---------- room ---------- */

.room-page {
  min-height: 100vh;
  background: #1a120e;
}

.room-head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 6vw 8px;
}

.room-head h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: 0.04em;
}

.back {
  color: var(--gold);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.room {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 90px);
  padding: 10px 4vw 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent 12%, transparent 88%, rgba(0, 0, 0, 0.4)),
    repeating-linear-gradient(
      90deg,
      #4a372b 0px,
      #4a372b 46px,
      #3c2c22 46px,
      #3c2c22 50px
    );
}

.window {
  position: relative;
  width: min(280px, 46vw);
  height: 150px;
  margin: 8px auto 18px;
  border-radius: 140px 140px 8px 8px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.7), transparent 8%),
    linear-gradient(180deg, #0c1830 0%, #1d3358 55%, #31486a 100%);
  box-shadow:
    inset 0 0 0 10px #2a1d15,
    inset 0 0 0 14px #6a513c,
    0 12px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.window .pane {
  position: absolute;
  inset: 14px 14px 8px;
  border-radius: inherit;
  background:
    linear-gradient(#c9b49a, #c9b49a) center / 2px 100% no-repeat,
    linear-gradient(#c9b49a, #c9b49a) center 58% / 100% 2px no-repeat;
  opacity: 0.55;
}

.curtain {
  position: absolute;
  top: 0;
  width: 28%;
  height: 100%;
  background: linear-gradient(90deg, #6e2a32, #8d3a42);
  opacity: 0.9;
}

.curtain.left { left: 0; border-radius: 120px 0 0 0; }
.curtain.right { right: 0; border-radius: 0 120px 0 0; }

.sconce {
  position: absolute;
  top: 46px;
  width: 18px;
  height: 34px;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(#f3e2b0, #c9a15a);
  box-shadow: 0 0 40px 16px rgba(255, 196, 110, 0.35);
}

.sconce.left { left: 8vw; }
.sconce.right { right: 8vw; }

.shelf-block.solo {
  width: min(360px, 92%);
}

.shelf-block.solo .plank {
  grid-template-columns: 1fr;
}

.shelf-block {
  position: relative;
  z-index: 2;
  width: min(1080px, 96%);
  margin: 0 auto 28px;
}

.globes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-items: center;
  align-items: end;
  gap: 14px 12px;
  padding: 0 10px;
  position: relative;
  z-index: 1;
}

.globe {
  appearance: none;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  width: 100%;
  max-width: 230px;
}

.sphere {
  position: relative;
  width: min(210px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #101820;
  box-shadow:
    inset -18px -22px 30px rgba(0, 0, 0, 0.45),
    inset 14px 12px 22px rgba(255, 255, 255, 0.28),
    0 18px 28px rgba(0, 0, 0, 0.35);
}

.sphere::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.55), transparent 18%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 42%, rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

.flurry {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  border-radius: 50%;
  pointer-events: none;
}

.flake {
  --tilt: 0deg;
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: var(--s);
  line-height: 1;
  color: transparent;
  background: transparent;
  opacity: 0;
}

.flake.bubble {
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.95), rgba(125, 211, 252, 0.55) 42%, rgba(14, 165, 233, 0.18) 74%);
  box-shadow: inset 0 0 0 1px rgba(224, 242, 254, 0.9);
}

.flake.heart {
  color: #f0a35e;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.95);
}

.flake.spark {
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.95);
}

.flake.spark.alt {
  color: #fb7185;
  text-shadow: 0 0 8px rgba(251, 113, 133, 0.95);
}

.flake.drop {
  height: calc(var(--s) * 1.35);
  border-radius: 50% 50% 48% 48% / 38% 38% 62% 62%;
  background: linear-gradient(#fde68a, #d97706);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.85);
}

.flake.star {
  color: #e879f9;
  font-size: calc(var(--s) * 1.7);
  text-shadow: 0 0 4px #701a75, 0 0 12px rgba(217, 70, 239, 1);
}

.flake.star.alt { color: #c026d3; }

.flake.gem {
  color: #e0f2fe;
  text-shadow: 0 0 8px rgba(125, 211, 252, 0.95);
}

.flake.feather {
  width: calc(var(--s) * 0.36);
  height: calc(var(--s) * 1.2);
  border-radius: 70% 30% 60% 40%;
  background: linear-gradient(180deg, #ffffff, #d7e6f6);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

.flurry.go .flake {
  animation: flake-fly 2.8s ease-in forwards;
  animation-delay: var(--delay);
}

@keyframes flake-fly {
  0% { transform: translate3d(0, 18px, 0) rotate(var(--tilt)) scale(0.55); opacity: 0; }
  10% { opacity: 1; }
  46% { transform: translate3d(var(--dx), var(--dy), 0) rotate(var(--tilt)) scale(1); opacity: 1; }
  72% { opacity: 1; }
  100% { transform: translate3d(calc(var(--dx) * 0.12), 70px, 0) rotate(var(--tilt)) scale(0.7); opacity: 0; }
}

@keyframes globe-shake {
  0% { transform: rotate(0deg); }
  14% { transform: rotate(-9deg); }
  30% { transform: rotate(8deg); }
  46% { transform: rotate(-6deg); }
  62% { transform: rotate(4deg); }
  78% { transform: rotate(-2deg); }
  100% { transform: rotate(0deg); }
}

.globe.shaking,
.zoom-shake.shaking {
  animation: globe-shake 0.95s ease-in-out;
  transform-origin: 50% 88%;
}

.zoom {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 4, 3, 0.78);
}

.zoom[hidden] { display: none; }

.zoom-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
}

.zoom-card.grown {
  opacity: 1;
  transition: opacity 0.35s ease;
}

.zoom-shake {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.zoom-card .sphere {
  width: min(78vw, 480px);
}

.zoom-title {
  margin-top: 16px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: 0.04em;
}

.zoom-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.sphere img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scene-gemi img { object-position: center 42%; transform: scale(1.42); }
.scene-winnie img { object-position: center 48%; transform: scale(1.12); }
.scene-karinca img { object-position: center 40%; transform: scale(1.28); }
.scene-bal img { object-position: center 58%; transform: scale(1.05); }
.scene-yildiz img { object-position: center 42%; transform: scale(1.18); }
.scene-elmas img { object-position: center 48%; transform: scale(1.08); }
.scene-kugu img { object-position: center 40%; transform: scale(1.28); }

.pedestal {
  width: 62%;
  height: 22px;
  margin-top: -8px;
  border-radius: 0 0 40px 40px;
  background:
    linear-gradient(180deg, #8d6a45, #5a3d28 45%, #3d291c);
  box-shadow:
    inset 0 2px 0 rgba(255, 220, 170, 0.35),
    0 10px 14px rgba(0, 0, 0, 0.35);
}

.plate { display: none; }

.mobile-name {
  display: none;
}

.plank {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  min-height: 46px;
  margin-top: -2px;
  padding: 8px 10px 10px;
  border-radius: 3px 3px 6px 6px;
  background:
    linear-gradient(180deg, #d7b184, #a56b3e 28%, #6d4326);
  box-shadow:
    0 16px 18px rgba(0, 0, 0, 0.38),
    inset 0 2px 0 rgba(255, 230, 190, 0.5);
  position: relative;
  z-index: 2;
}

.plank span {
  text-align: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(15px, 2.1vw, 22px);
  letter-spacing: 0.03em;
  color: #2a1a10;
  text-shadow: 0 1px 0 rgba(255, 236, 210, 0.35);
}

.bouquet {
  position: relative;
  z-index: 3;
  width: min(640px, 100%);
  margin: -86px auto 0;
  padding: 0;
  pointer-events: none;
}

.bouquet img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: radial-gradient(ellipse 46% 42% at 50% 58%, #000 20%, transparent 68%);
  mask-image: radial-gradient(ellipse 46% 42% at 50% 58%, #000 20%, transparent 68%);
}

.floor {
  height: 80px;
  margin: 10px -4vw 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 28%),
    repeating-linear-gradient(
      90deg,
      #6a4a32 0 92px,
      #5b3e2a 92px 96px
    );
  box-shadow: inset 0 24px 30px rgba(0, 0, 0, 0.35);
}

.globe:hover .sphere {
  transform: translateY(-6px);
  transition: transform 0.25s ease;
}

.sphere { transition: transform 0.25s ease; }

@media (max-width: 720px) {
  .start {
    width: min(58vw, 210px);
    height: min(58vw, 210px);
  }
  .start span {
    font-size: 20px;
    min-height: 58px;
  }
  .room-head { flex-direction: column; align-items: flex-start; }
  .sconce { display: none; }
  .globes {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .globe { max-width: 280px; }
  .globe .sphere { width: min(68vw, 250px); }
  .plank { display: none; }
  .mobile-name {
    display: block;
    margin-top: 8px;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 22px;
    color: #f3e6cf;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  }
  .zoom { padding: 64px 18px 24px; }
  .zoom-card .sphere { width: min(74vw, 300px); }
  .zoom-title { margin-top: 10px; font-size: 26px; }
  .zoom-shake.shaking { animation-name: globe-shake-soft; animation-duration: 0.8s; }
  .room { padding-bottom: 28px; }
}

@keyframes globe-shake-soft {
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(-3deg); }
  60% { transform: rotate(2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .start,
  .start.expanding,
  .start.expanding:hover,
  html.arrive body.room-page::before,
  .globe.shaking,
  .zoom-shake.shaking,
  .zoom-card,
  .zoom-card.grown,
  .flurry.go .flake,
  body.leaving::after,
  body.leaving .bokeh {
    animation: none !important;
    transition: none !important;
  }
  .start.expanding,
  .start.expanding:hover,
  .globe.shaking {
    transform: none !important;
  }
}
