/* The hotel floor with the free rooms lighting up on scroll. Colours in :root (the Playground palette): one warm
   accent, the lamp light of the free rooms, the button and the price; everything else is a night neutral with white
   hairlines. GSAP moves .frame and the parts of the plan, the CSS styles .panel and the card inside it. */
:root {
  --page: #0b0c0f;          /* the page */
  --page-lift: #17161a;     /* the soft lift of the page behind the panel */
  --panel: #141418;         /* the panel */
  --ink: #f3efe8;           /* the words */
  --muted: #8a8580;         /* the small words */
  --hair: rgba(240, 232, 222, 0.42);      /* the walls and the lines of the plan */
  --hair-soft: rgba(240, 232, 222, 0.16); /* the furniture, the hatch of the taken rooms */
  --warm: #ffb768;          /* the accent: the lamp light of the free rooms, the button */
  --button-ink: #2a1604;    /* the words on the lit button */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--page); }
html, body { overflow-x: clip; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }

.floor { position: relative; height: 440vh; }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(8px, 2.4vh, 40px) 12px;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(120% 90% at 50% 42%, var(--page-lift), var(--page) 66%);
}
@supports (height: 100lvh) {
  .stage { height: 100lvh; }
}

/* one warm light behind the panel: it grows with the rooms that light up */
.light {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: min(80vw, 80vh, 640px);
  height: min(56vw, 56vh, 440px);
  margin: calc(min(56vw, 56vh, 440px) / -2) 0 0 calc(min(80vw, 80vh, 640px) / -2);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(56px);
  opacity: 0;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--warm) 34%, transparent), color-mix(in srgb, var(--warm) 8%, transparent) 62%, transparent);
}
.grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- the panel */
/* as wide as the height allows: the plan is half as tall as it is wide, the head and the foot take the rest */
.frame { width: min(100%, 940px, calc(196vh - 470px)); min-width: min(100%, 300px); }
.panel {
  position: relative;
  border-radius: clamp(16px, 4vh, 26px);
  padding: clamp(10px, 2.6vh, 22px) clamp(10px, 2.6vw, 22px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 86%, white 4%), color-mix(in srgb, var(--panel) 95%, transparent));
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 10px 24px -10px rgba(0, 0, 0, 0.6),
    0 40px 80px -30px rgba(0, 0, 0, 0.75);
}
.panel__edge {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 228, 196, 0.5), transparent);
}
.panel__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, -30%), color-mix(in srgb, var(--warm) 7%, transparent), transparent 70%);
}
@media (hover: hover) {
  .panel:hover .panel__glow { opacity: 1; }
}

/* the head: mark, name and floor, the dates */
.head { position: relative; display: flex; align-items: center; gap: 9px; }
.mark {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(24px, 6.2vh, 30px);
  height: clamp(24px, 6.2vh, 30px);
  border-radius: 9px;
  background: linear-gradient(150deg, #fff3e2, var(--warm) 60%, color-mix(in srgb, var(--warm) 70%, #6b3606));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(0, 0, 0, 0.15), 0 6px 14px -6px color-mix(in srgb, var(--warm) 80%, transparent);
}
.mark svg { width: 15px; height: 15px; fill: none; stroke: var(--button-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.brand {
  font-size: clamp(12px, 3.3vh, 15px);
  font-weight: 640;
  font-stretch: 108%;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand__floor { font-weight: 450; font-stretch: 100%; margin-left: 6px; }
.dates {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px 6px 9px;
  border-radius: 999px;
  font-size: clamp(10.5px, 2.9vh, 12.5px);
  font-weight: 520;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.dates svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; opacity: 0.75; }
.dates__sep { width: 1px; height: 10px; background: rgba(255, 255, 255, 0.16); }

/* ---------------------------------------------------------------- the plan */
.map {
  position: relative;
  margin-top: clamp(8px, 2.2vh, 18px);
  border-radius: clamp(10px, 2.6vh, 16px);
  padding: clamp(4px, 1.4vh, 14px);
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px) 0 0 / 20px 20px,
    rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 10px 30px -14px rgba(0, 0, 0, 0.6);
}
.plan { display: block; width: 100%; height: auto; overflow: visible; }
.floorplate { fill: rgba(255, 255, 255, 0.018); }
.plan .wall { fill: none; stroke: var(--hair); stroke-width: 2.2; stroke-linecap: square; }
.plan .part { fill: none; stroke: var(--hair); stroke-width: 1.2; stroke-linecap: square; }
.plan .win { fill: var(--panel); stroke: var(--hair); stroke-width: 0.7; }
.plan .win-mid { stroke: var(--hair-soft); stroke-width: 0.6; }
.plan .thin { fill: none; stroke: var(--hair-soft); stroke-width: 0.8; stroke-linejoin: round; }
.plan .thin-fill { fill: rgba(255, 255, 255, 0.025); stroke: var(--hair-soft); stroke-width: 0.8; }
.plan .leaf { stroke: var(--hair); stroke-width: 1.2; stroke-linecap: round; }
.plan .arc { fill: none; stroke: var(--hair-soft); stroke-width: 0.6; stroke-dasharray: 1.6 1.6; }
.plan .tint { fill: var(--warm); opacity: 0; }
.plan .glow { opacity: 0; }
.plan .outglow { fill: var(--warm); opacity: 0; }
.plan .hatch { fill: url(#hatch); opacity: 0; }
.plan .num {
  font: 600 8px 'Mona Sans Variable', system-ui, sans-serif;
  font-stretch: 112%;
  letter-spacing: 0.04em;
  fill: var(--muted);
  text-anchor: middle;
}
.plan .num.is-free { fill: var(--warm); }
.plan .core-label { font: 500 6.5px 'Mona Sans Variable', system-ui, sans-serif; letter-spacing: 0.1em; fill: var(--muted); text-anchor: middle; }
.plan .pick { fill: none; stroke: var(--warm); stroke-width: 1.1; opacity: 0; }
.plan .spill { opacity: 0; }
@media (hover: hover) {
  .plan .room-hit { cursor: default; }
}

/* ---------------------------------------------------------------- the foot: the count and the room card */
.foot {
  display: flex;
  align-items: stretch;
  gap: clamp(8px, 2vw, 18px);
  margin-top: clamp(8px, 2.2vh, 18px);
}
.count { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.count__line { display: flex; align-items: baseline; gap: 8px; font-size: clamp(12px, 3.4vh, 16px); font-weight: 520; white-space: nowrap; }
.count__num {
  display: inline-block;
  min-width: 1ch;
  font-size: clamp(26px, 8vh, 46px);
  font-weight: 560;
  font-stretch: 92%;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--warm);
}
.count__sub { margin-top: 5px; font-size: clamp(10.5px, 2.8vh, 12.5px); }

.card {
  position: relative;
  flex: 0 1 430px;
  min-height: clamp(64px, 17vh, 96px);
  border-radius: clamp(12px, 3vh, 16px);
  padding: clamp(9px, 2.4vh, 15px) clamp(10px, 2.4vh, 16px);
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025) 60%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 40px -22px rgba(0, 0, 0, 0.9);
}
.card::after {
  /* the light of the room on the card, from the top left, once it is chosen */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--lit, 0);
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--warm) 14%, transparent), transparent 55%);
}
.card__wait { position: absolute; inset: clamp(9px, 2.4vh, 15px) clamp(10px, 2.4vh, 16px); display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.bar {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0.13) 50%, rgba(255, 255, 255, 0.05) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.8s linear infinite;
}
.bar--a { width: 34%; }
.bar--b { width: 62%; height: 11px; }
.bar--c { width: 48%; }
@keyframes shimmer { to { background-position: -150% 0; } }

.card__room { position: relative; display: flex; align-items: center; gap: 12px; height: 100%; }
.card__text { flex: 1 1 auto; min-width: 0; }
.card__kind { font-size: clamp(10px, 2.6vh, 11.5px); font-weight: 560; letter-spacing: 0.06em; text-transform: uppercase; font-stretch: 112%; }
.card__name { margin-top: 3px; font-size: clamp(15px, 4.4vh, 20px); font-weight: 620; letter-spacing: -0.015em; font-stretch: 104%; }
.card__meta { margin-top: 3px; font-size: clamp(10.5px, 2.8vh, 12.5px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__meta sup { font-size: 0.65em; }
.card__buy { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: clamp(5px, 1.4vh, 9px); }
.price { font-size: clamp(11px, 3vh, 13px); white-space: nowrap; }
.price b { font-size: clamp(17px, 5vh, 24px); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: clamp(7px, 1.9vh, 10px) clamp(12px, 2.8vh, 16px);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: clamp(11px, 3vh, 13px);
  font-weight: 600;
  white-space: nowrap;
  isolation: isolate;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cta__fill {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, #ffd29c, var(--warm) 55%, color-mix(in srgb, var(--warm) 82%, #8a4a0c));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 8px 22px -8px color-mix(in srgb, var(--warm) 85%, transparent);
  opacity: 0;
  transform: scale(0.86);
}
.cta__words { font-stretch: 100%; transition: font-stretch 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.cta__arrow { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.cta.is-lit { color: var(--button-ink); }
@media (hover: hover) {
  .cta.is-lit:hover { transform: scale(1.03); }
  .cta.is-lit:hover .cta__words { font-stretch: 114%; }
  .cta.is-lit:hover .cta__arrow { transform: translateX(2px); }
}
.cta:active { transform: scale(0.97); }

/* ---------------------------------------------------------------- the phone and short screens */
@media (max-width: 600px) {
  .brand__floor { display: none; }
  .foot { flex-direction: column; gap: 8px; }
  .count { flex-direction: row; align-items: baseline; gap: 8px; }
  .count__num { font-size: clamp(22px, 6vh, 30px); }
  .count__sub { margin-top: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .card { flex: none; }
  .frame { width: min(100%, 520px); }
}
@media (max-width: 380px) {
  .dates__sep, .dates .muted { display: none; }
  .card__meta { white-space: normal; }
}
