@font-face {
  font-family: "Allura";
  src: url("fonts/allura-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  --room-point-color: #b89a73;
  --bathroom-line-color: #727772;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff;
  background: #000;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
.scroll-story { position: relative; min-height: 100svh; }
.next-chapter {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--room-point-color);
}
.hero {
  position: sticky;
  top: 0;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 320px;
  overflow: hidden;
  background: #080f14;
}
.hero-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48%;
}
[data-intro-photo] { opacity: var(--intro-photo-opacity, 1); }
.hero-photo-house {
  object-position: 50% 66%;
  opacity: var(--house-photo-opacity, 0);
}
.scene-blackout {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #000;
  opacity: var(--scene-exit, 0);
  pointer-events: none;
}
.driveway-photo {
  position: absolute;
  z-index: 6;
  top: var(--driveway-photo-top, 10%);
  left: 50%;
  width: var(--driveway-photo-width, 90%);
  height: var(--driveway-photo-height, 88%);
  object-fit: contain;
  border-radius: clamp(12px, 1.5vw, 22px);
  opacity: var(--driveway-photo-opacity, 0);
  transform: translate(-50%, var(--driveway-offset, 0px));
  pointer-events: none;
}
.driveway-caption {
  position: absolute;
  top: var(--driveway-caption-bottom, 10%);
  left: 10%;
  width: 80%;
  z-index: 6;
  color: #fff;
  opacity: var(--driveway-caption-opacity, 0);
  transform: translateY(calc(var(--driveway-offset, 0px) - 100%));
  pointer-events: none;
}
.driveway-caption h2 {
  margin: 0;
  font-family: "Allura", "Snell Roundhand", cursive;
  font-size: clamp(40px, 5.2vw, 76px);
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  text-wrap: balance;
}
.terrace-scene {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  visibility: hidden;
  background: #000;
  transform: translateY(var(--terrace-offset, 100%));
}
.terrace-top-shade {
  position: absolute;
  inset: -1px 0 auto;
  z-index: 7;
  height: 28%;
  background: linear-gradient(to bottom, #000 10%, rgb(0 0 0 / 72%) 40%, transparent);
  opacity: var(--terrace-top-shade, 1);
  pointer-events: none;
}
.hero-photo-terrace {
  z-index: 6;
  object-position: 50% 56%;
  opacity: var(--terrace-photo-opacity, 0);
  pointer-events: none;
}
.terrace-backdrop {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(24px) brightness(.55);
  transform: scale(1.12);
  opacity: var(--terrace-photo-opacity, 0);
  pointer-events: none;
}
.terrace-sand-fade {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  height: 10%;
  background: linear-gradient(to bottom, rgb(184 154 115 / 0), var(--room-point-color));
  opacity: calc(var(--terrace-photo-opacity, 0) * var(--terrace-sand-progress, 0));
  pointer-events: none;
}
.room-points {
  position: absolute;
  inset: 0;
  z-index: 8;
  visibility: hidden;
  opacity: var(--room-points-presence, 0);
  pointer-events: none;
}
.room-point {
  position: absolute;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}
.room-point[data-room-id^="bad-"] { --room-point-color: var(--bathroom-line-color); }
.room-point[data-room-id^="bad-"] .room-point-dot { box-shadow: 0 1px 10px rgb(0 0 0 / 24%), 0 0 0 4px rgb(114 119 114 / 16%); }
.room-point[data-room-id^="bad-"] .room-point-button:hover .room-point-dot { box-shadow: 0 1px 12px rgb(0 0 0 / 30%), 0 0 0 6px rgb(114 119 114 / 24%); }
.room-point::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: var(--room-line-length, 0px);
  background: var(--room-point-color);
  transform: translateX(-50%) scaleY(var(--room-points-presence, 0));
  transform-origin: top center;
  pointer-events: none;
}
.room-point-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fffdf7;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.room-point-dot {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--room-point-color);
  border-radius: 50%;
  background: var(--room-point-color);
  box-shadow: 0 1px 10px rgb(0 0 0 / 24%), 0 0 0 4px rgb(184 154 115 / 12%);
  transform: scale(calc(.75 + var(--room-points-presence, 0) * .25));
}
.room-point-button:hover .room-point-dot,
.room-point-button[aria-expanded="true"] .room-point-dot { box-shadow: 0 1px 12px rgb(0 0 0 / 30%), 0 0 0 6px rgb(184 154 115 / 24%); }
.room-point-button:focus-visible { outline: 2px solid #fffdf7; outline-offset: 4px; }
.room-point-label {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(calc(-50% + var(--label-shift-x, 0px)));
  width: max-content;
  max-width: min(200px, calc(100vw - 32px));
  padding: 10px 15px;
  border: 1px solid rgb(184 154 115 / 50%);
  border-radius: 8px;
  background: rgb(73 53 35 / 95%);
  color: #fffdf7;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .01em;
  text-align: center;
  box-shadow: 0 4px 20px rgb(0 0 0 / 18%);
  pointer-events: none;
}
@media (max-aspect-ratio: 11/10), (min-aspect-ratio: 5/2) {
  .terrace-backdrop { display: block; }
  .hero-photo-terrace { object-fit: contain; object-position: 50% 50%; }
}
.snow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: calc((var(--intro-photo-opacity, 1) + var(--house-photo-opacity, 0)) * (1 - var(--scene-exit, 0)));
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgb(10 24 31 / 36%);
  opacity: var(--background-shade, 0);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 48%, rgb(16 31 39 / 20%), transparent 65%);
  opacity: 0;
  transition: opacity 2s ease;
}
.hero.is-open::after { opacity: 1; }
.brand-reveal {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: var(--brand-presence, 1);
}
.brand-title {
  margin: 0;
  padding: 0 20px .08em;
  color: #fffdf7;
  font-family: "Allura", "Snell Roundhand", cursive;
  font-size: clamp(82px, 11.8vw, 180px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 2px 24px rgb(12 28 36 / 42%), 0 1px 2px rgb(12 28 36 / 20%);
  opacity: 0;
  transform: translateY(12px);
  filter: blur(5px);
  transition: opacity 1.3s cubic-bezier(.2,.65,.3,1), transform 1.5s cubic-bezier(.16,1,.3,1), filter 1.3s ease;
}
.is-open .brand-title { opacity: 1; transform: translateY(0); filter: blur(0); }
.story-panel {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vw, 80px) 24px;
  pointer-events: none;
  color: #fffdf7;
  opacity: var(--story-presence, 0);
  text-align: center;
}
.story-content {
  width: min(100%, 1000px);
  /* Move the story and following photograph together, with a clear gap between them. */
  transform: translateY(var(--story-offset, 0px));
  opacity: calc(1 - var(--story-exit, 0));
}
.story-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 .22em;
  margin: 0 0 clamp(24px, 3vw, 44px);
  font-family: "Allura", "Snell Roundhand", cursive;
  font-size: clamp(38px, 5.4vw, 84px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.16;
  text-shadow: 0 2px 24px rgb(0 0 0 / 18%);
}
.story-heading:empty { display: none; }
.story-word { display: inline-block; }
.story-copy {
  max-width: 690px;
  margin: 0 auto;
  font-size: clamp(17px, 1.65vw, 23px);
  font-weight: 400;
  line-height: 1.7;
  text-wrap: pretty;
  text-shadow: 0 2px 18px rgb(0 0 0 / 20%);
  opacity: var(--copy-progress, 0);
  transform: translateY(calc((1 - var(--copy-progress, 0)) * 18px));
  filter: blur(calc((1 - var(--copy-progress, 0)) * 3px));
}
.entrance {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fffdf7;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  opacity: 1;
  transition: opacity .5s ease;
}
.entrance-hint {
  position: absolute;
  bottom: max(35px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 36px);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgb(20 38 47 / 55%);
  font-size: 12px;
  letter-spacing: .045em;
  line-height: 1.4;
}
.entrance:focus-visible { outline: 2px solid #fff; outline-offset: -10px; }
.entrance:disabled { opacity: 0; pointer-events: none; cursor: default; }
.snow-toggle {
  position: absolute;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 4;
  min-height: 44px;
  padding: 11px 17px;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 999px;
  background: rgb(20 38 47 / 72%);
  color: #fff;
  font: inherit;
  font-size: 13px;
  letter-spacing: .01em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}
.snow-toggle:hover { background: rgb(20 38 47 / 90%); }
.snow-toggle:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
  .hero-photo { object-position: 43% 48%; }
  .hero-photo-house { object-position: 42% 65%; }
  .hero-photo-terrace { object-position: 47% 50%; }
  .snow-toggle { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
  .entrance-hint { bottom: max(80px, calc(env(safe-area-inset-bottom) + 64px)); }
  .story-panel { padding: 24px 22px 84px; }
  .story-heading { font-size: clamp(34px, 9vw, 46px); line-height: 1.12; margin-bottom: 24px; }
  .story-copy { font-size: 16px; line-height: 1.65; }
}
@media (max-height: 540px) and (orientation: landscape) {
  .story-panel { padding: 16px 32px 72px; }
  .story-heading { font-size: 36px; margin-bottom: 16px; }
  .story-copy { font-size: 16px; line-height: 1.5; max-width: 760px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero::after, .brand-title, .entrance { transition: none; }
  .brand-title { transform: none; filter: none; }
  .story-copy, .story-word { transform: none !important; filter: none !important; }
}
