:root {
  --bg: #f2eee7;
  --paper: #fdfcf9;
  --ink: #1d1b18;
  --soft: #7f7a72;
  --faint: #bdb7ad;
  --wall: #26231f;
  --accent: #e3893c;
  --sea: #4f9aa3;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background:
    radial-gradient(110% 70% at 50% 0%, #f8f5f0 0%, rgba(248, 245, 240, 0) 62%),
    var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
/* a fine grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.45 0 0 0 0 0.4 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 12px;
}

/* the whole piece is measured in em, and the em follows the width and the height of the window */
.suite {
  font-size: clamp(7px, min(1.74vw, 2.75vh), 18px);
  display: grid;
  grid-template-columns: 30em 19em;
  gap: 1.1em;
  align-items: stretch;
}

.sheet, .info {
  position: relative;
  border-radius: 1.5em;
  background: linear-gradient(180deg, #ffffff 0%, var(--paper) 100%);
  box-shadow:
    0 0 0 1px rgba(29, 27, 24, 0.06),
    0 1px 0 0 rgba(255, 255, 255, 0.95) inset,
    0 1px 2px rgba(29, 27, 24, 0.05),
    0 8px 18px -8px rgba(29, 27, 24, 0.1),
    0 30px 60px -26px rgba(120, 70, 20, 0.22);
}

.sheet { padding: 1em 1.1em 0.9em; display: flex; flex-direction: column; }
.sheet .plan { margin: auto 0; }
.sheet__head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 0.1em 0.5em; }
.sheet__title { font-size: 0.86em; font-weight: 620; font-stretch: 106%; letter-spacing: 0.01em; }
.sheet__meta { font-size: 0.74em; font-weight: 500; color: var(--soft); }
.sep { color: var(--faint); margin: 0 0.25em; }

.plan { display: block; width: 100%; height: auto; overflow: visible; }

/* floors */
.floor__tint { fill: var(--accent); opacity: 0; }
.floor__pat { opacity: 0; }
.pat { fill: none; stroke: var(--accent); stroke-width: 0.35; opacity: 0.55; }
.beam { opacity: 0; mix-blend-mode: multiply; }
.sun0 { stop-color: var(--accent); stop-opacity: 0.42; }
.sun1 { stop-color: var(--accent); stop-opacity: 0; }

.sea path { fill: none; stroke: var(--sea); stroke-width: 0.6; opacity: 0.45; stroke-linecap: round; }

/* furniture: thin warm grey lines, darker in the room that is on */
.furn { fill: none; stroke: #a49d92; stroke-width: 0.7; stroke-linejoin: round; stroke-linecap: round; transition: stroke 0.45s ease; }
.furn.is-on { stroke: #4a443c; }

/* walls */
.walls line { stroke: var(--wall); stroke-linecap: square; }
.walls .w-out { stroke-width: 2.2; }
.walls .w-in { stroke-width: 1.3; }
.glass line { stroke: #8c857a; stroke-width: 0.55; transition: stroke 0.4s ease; }
.glass .g-on { stroke: var(--accent); }
.rail line, .rail path { stroke: #8c857a; stroke-width: 0.6; fill: none; }
.slide path { stroke: #6f685e; stroke-width: 1.1; stroke-linecap: round; transition: stroke 0.4s ease; }
.slide.is-on path { stroke: var(--accent); }

/* doors */
.door__leaf { stroke: var(--wall); stroke-width: 1.3; stroke-linecap: round; fill: none; }
.door__arc { stroke: #a49d92; stroke-width: 0.5; stroke-dasharray: 1.4 1.4; fill: none; }
.door__fan { fill: var(--accent); opacity: 0.12; }

/* labels: the name gains weight and width when its room is on */
.lab__name {
  font-size: 6.2px;
  font-weight: 560;
  font-variation-settings: "wdth" 100;
  fill: var(--ink);
  letter-spacing: 0.02em;
  transition: font-weight 0.45s ease, font-variation-settings 0.45s ease, fill 0.45s ease;
}
.lab__area { font-size: 5px; font-weight: 500; fill: var(--soft); letter-spacing: 0.03em; }
.lab.is-on .lab__name { font-weight: 700; font-variation-settings: "wdth" 112; }
.lab.is-on .lab__area { fill: #b0642a; }

/* compass and scale */
.compass__ring { fill: #ffffff; stroke: #cfc9bf; stroke-width: 0.6; }
.compass__ticks { stroke: #b6afa4; stroke-width: 0.6; }
.compass__n { fill: var(--ink); }
.compass__s { fill: #d6d0c6; }
.compass__lab { font-size: 5px; font-weight: 640; fill: var(--ink); }
.compass__sun circle { fill: var(--accent); }
.compass__sun path { stroke: var(--accent); stroke-width: 0.7; stroke-linecap: round; }
.scale path { stroke: #8c857a; stroke-width: 0.6; fill: none; }
.scale text { font-size: 4.6px; fill: var(--soft); font-weight: 500; }

.hits rect { fill: transparent; cursor: pointer; }

/* the card beside the plan */
.info {
  padding: 1.25em 1.25em 1.1em;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.info__sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(70% 45% at 85% 0%, rgba(227, 137, 60, 0.13), rgba(227, 137, 60, 0) 70%);
}
.info__head { position: relative; display: flex; align-items: center; gap: 0.65em; }
.info__mark { width: 2.2em; height: 2.2em; flex: none; fill: var(--ink); stroke: #ffffff; stroke-width: 1.6; stroke-linecap: round; }
.info__mark rect { stroke: none; }
.info__brand { font-size: 0.98em; font-weight: 660; font-stretch: 108%; letter-spacing: -0.005em; }
.info__where { font-size: 0.72em; color: var(--soft); font-weight: 500; white-space: nowrap; }

.room { position: relative; margin-top: 1.5em; flex: 1; }
.room__light {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  height: 1.9em;
  padding: 0 0.7em 0 0.5em;
  border-radius: 999px;
  font-size: 0.72em;
  font-weight: 560;
  color: #9a5520;
  background: rgba(227, 137, 60, 0.11);
  box-shadow: 0 0 0 1px rgba(227, 137, 60, 0.18) inset;
}
.room__light svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.room__light .sep { margin: 0; color: rgba(154, 85, 32, 0.45); }
.room__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.5em; margin-top: 0.6em; }
.room__name { font-size: 1.62em; font-weight: 640; font-stretch: 104%; letter-spacing: -0.02em; line-height: 1.1; white-space: nowrap; }
.room__area { display: flex; align-items: baseline; gap: 0.12em; font-variant-numeric: tabular-nums; }
.room__area [data-area] { font-size: 1.62em; font-weight: 400; font-stretch: 90%; letter-spacing: -0.03em; line-height: 1.1; }
.room__unit { font-size: 0.78em; color: var(--soft); font-weight: 520; }

.feats { list-style: none; margin-top: 1em; display: grid; gap: 0.15em; border-top: 1px solid rgba(29, 27, 24, 0.07); padding-top: 0.6em; }
.feat { display: flex; align-items: center; gap: 0.65em; font-size: 0.8em; font-weight: 500; line-height: 1.25; padding: 0.38em 0; white-space: nowrap; }
.feat__ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.1em;
  height: 2.1em;
  border-radius: 0.65em;
  background: #f6f3ee;
  box-shadow: 0 0 0 1px rgba(29, 27, 24, 0.06) inset, 0 1px 0 rgba(255, 255, 255, 0.9);
}
.feat__ico svg { width: 1.2em; height: 1.2em; fill: none; stroke: var(--ink); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }

.info__foot { position: relative; margin-top: 0.9em; padding-top: 0.85em; border-top: 1px solid rgba(29, 27, 24, 0.07); }
.total { font-size: 0.7em; color: var(--soft); font-weight: 500; white-space: nowrap; }
.total .sep { margin: 0 0.3em; }
.book { display: flex; align-items: center; justify-content: space-between; margin-top: 0.7em; gap: 0.6em; }
.price { display: flex; align-items: baseline; gap: 0.3em; }
.price__n { font-size: 1.12em; font-weight: 660; letter-spacing: -0.01em; }
.price__u { font-size: 0.72em; color: var(--soft); font-weight: 500; }

.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  height: 2.5em;
  padding: 0 0.95em 0 1.1em;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.8em;
  font-weight: 600;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  isolation: isolate;
}
.cta__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, #2b2824 0%, #171512 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 6px 14px -6px rgba(29, 27, 24, 0.5);
}
.cta__label { font-stretch: 100%; transition: font-stretch 0.35s ease; white-space: nowrap; }
.cta__arr { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
  .cta:hover .cta__label { font-stretch: 112%; }
}
.cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #ffffff;
  stroke: #1d1b18;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(29, 27, 24, 0.35));
  opacity: 0;
  z-index: 5;
}

/* tall or narrow windows (the phone): the plan on top, the card below, side by side inside */
@media (max-aspect-ratio: 1/1), (max-width: 640px) {
  .suite {
    font-size: clamp(7px, min(3.75vw, 3.05vh), 16px);
    grid-template-columns: 24em;
    gap: 0.6em;
  }
  .sheet { padding: 0.75em 0.8em 0.6em; border-radius: 1.2em; }
  .sheet__head { padding-bottom: 0.3em; }
  .lab__name { font-size: 7.6px; }
  .lab__area { font-size: 6.2px; }
  .info { padding: 0.85em 0.95em 0.8em; border-radius: 1.2em; }
  .info__head { display: none; }
  .room { margin-top: 0; display: grid; grid-template-columns: 1fr auto; column-gap: 0.8em; align-items: start; }
  .room__light { grid-column: 1 / -1; justify-self: start; }
  .room__row { grid-column: 1 / -1; margin-top: 0.45em; }
  .room__name { font-size: 1.4em; }
  .room__area [data-area] { font-size: 1.4em; }
  .feats { grid-column: 1 / -1; margin-top: 0.55em; padding-top: 0.35em; grid-template-columns: 1fr 1fr 1fr; gap: 0.4em; }
  .feat { flex-direction: column; align-items: flex-start; gap: 0.35em; font-size: 0.68em; white-space: normal; padding: 0.2em 0; }
  .info__foot { margin-top: 0.55em; padding-top: 0.55em; }
  .total { display: none; }
  .book { margin-top: 0; }
}
