/* ===== Base ===== */
@font-face {
  font-family: "Material Symbols Rounded";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("assets/material-symbols-rounded.ttf") format("truetype");
}

:root {
  --app-width: 100vw;
  --app-height: 100dvh;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --glass: rgba(12, 14, 12, 0.58);
  --glass-strong: rgba(12, 14, 12, 0.78);
  --line: rgba(255, 255, 255, 0.18);
  --text: #fffdf5;
  --muted: rgba(255, 253, 245, 0.72);
  --accent: #c9ff64;
  --accent-2: #7ee3c1;
  --warm: #e9b989;
  --ink: #10110f;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  --space-xs: clamp(10px, 1.5vmin, 14px);
  --space-sm: clamp(14px, 2vmin, 22px);
  --space-md: clamp(20px, 3vmin, 38px);
  --hud-size: clamp(42px, 5.4vmin, 54px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #050604;
  color: var(--text);
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  overscroll-behavior: none;
}

button,
img {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.material-symbols-rounded {
  display: inline-block;
  font-family: "Material Symbols Rounded";
  font-size: 24px;
  font-style: normal;
  font-weight: normal;
  font-variation-settings: "FILL" 0, "wght" 600, "GRAD" 0, "opsz" 24;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
  text-rendering: optimizeLegibility;
}

/* ===== Canvas ===== */
#scene {
  width: var(--app-width);
  height: var(--app-height);
  display: block;
  background: #050604;
  touch-action: none;
}

.pano-crossfade-overlay {
  position: fixed;
  inset: 0;
  z-index: 34;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  opacity: 1;
  will-change: opacity;
}

.scene-hotspots {
  position: fixed;
  inset: 0;
  z-index: 35;
  pointer-events: none;
}

.scene-hotspot {
  position: absolute;
  left: 0;
  top: 0;
  /* min-width: 54px; */
  /* min-height: 54px; */
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: rgba(201, 255, 100, 0.94);
  background: #000;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.38);
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.16s ease, transform 0.16s ease, filter 0.16s ease;
  will-change: transform, opacity;
}

.scene-hotspot.is-visible {
  opacity: 1;
}

.scene-hotspot:hover,
.scene-hotspot:focus-visible {
  filter: brightness(1.05);
  transform: translate(-50%, -50%) scale(1.04);
  outline: none;
}

.scene-hotspot__arrow {
  display: grid;
  place-items: center;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-1px);
}

.scene-hotspot__arrow .material-symbols-rounded {
  color: var(--accent);
  font-size: inherit;
  font-variation-settings: "FILL" 1, "wght" 700, "GRAD" 0, "opsz" 40;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.38));
}

.scene-hotspot__label {
  position: absolute;
  left: 50%;
  /* top: calc(100% + 8px); */
  width: max-content;
  max-width: 180px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #10120d;
  background: rgba(201, 255, 100, 0.94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  font-size: 12px;
  /* font-weight: 800; */
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

/* ===== Initial Overlay ===== */
#overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  min-height: var(--app-height);
  padding: calc(var(--safe-top) + var(--space-md)) calc(var(--safe-right) + var(--space-md))
    calc(var(--safe-bottom) + var(--space-md)) calc(var(--safe-left) + var(--space-md));
  overflow: hidden;
  background: #050604;
}

#overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.33);
}

.overlay-bg,
.overlay-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.overlay-bg {
  z-index: 0;
  transform: scale(1.02);
}

.overlay-video {
  z-index: 1;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.overlay-video.is-ready {
  opacity: 1;
}

.home-client-logo,
.home-studio-logo,
.home-menu {
  position: absolute;
}

.home-client-logo {
  top: calc(var(--safe-top) + clamp(18px, 3vmin, 34px));
  left: 50%;
  width: clamp(118px, 14vw, 220px);
  height: auto;
  display: block;
  z-index: 5;
  pointer-events: none;
  transform: translateX(-50%);
  filter: drop-shadow(0 14px 34px rgba(0, 0, 0, 0.5));
}

.home-studio-logo {
  left: 50%;
  bottom: calc(var(--safe-bottom) + clamp(18px, 3vmin, 34px));
  width: clamp(190px, 23vw, 360px);
  max-width: calc(100vw - var(--safe-left) - var(--safe-right) - 36px);
  height: auto;
  display: block;
  z-index: 5;
  pointer-events: none;
  transform: translateX(-50%);
  filter: drop-shadow(0 14px 34px rgba(0, 0, 0, 0.48));
}

.home-menu {
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: flex;
  gap: 0;
}

.home-menu__button {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  min-height: var(--app-height);
  padding: clamp(96px, 14vh, 160px) clamp(14px, 2vw, 34px);
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 0;
  color: #fffdf5;
  background: #050604;
  box-shadow: none;
  cursor: pointer;
  overflow: hidden;
  text-transform: uppercase;
  isolation: isolate;
  transition: flex-grow 0.34s ease, filter 0.22s ease;
}

.home-menu__button:first-child {
  border-left: 0;
}

.home-menu__button::before,
.home-menu__button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-menu__button::before {
  z-index: 0;
  background-image: var(--button-bg);
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
  transition: transform 0.34s ease, filter 0.34s ease;
}

.home-menu__button::after {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 31%, rgba(0, 0, 0, 0.58)),
    rgba(0, 0, 0, 0.24);
  transition: background 0.28s ease;
}

.home-menu__button--plan {
  --button-bg: url("assets/planta.png");
}

.home-menu__button--model {
  --button-bg: url("assets/vistas/sala2.jpg");
}

.home-menu__button--views {
  --button-bg: url("assets/vistas/cozinha2.jpg");
}

.home-menu__button--tour {
  --button-bg: url("assets/jpg/360_Cozinha.jpg");
}

.home-menu__button span {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: clamp(68px, 10vh, 108px);
  place-items: center;
  padding: 12px 8px;
  overflow-wrap: anywhere;
  font-size: clamp(17px, 2vw, 34px);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.78);
  opacity: 0.76;
  transform: translateY(8px) scale(0.92);
  transition: opacity 0.24s ease, transform 0.28s ease, text-shadow 0.28s ease;
}

.home-menu__button:hover,
.home-menu__button:focus-visible {
  flex-grow: 1.32;
  outline: none;
}

.home-menu__button:hover::before,
.home-menu__button:focus-visible::before {
  filter: saturate(1.12) contrast(1.04) brightness(1.05);
  transform: scale(1.07);
}

.home-menu__button:hover::after,
.home-menu__button:focus-visible::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.3), transparent 34%, rgba(0, 0, 0, 0.42)),
    rgba(0, 0, 0, 0.08);
}

.home-menu__button:hover span,
.home-menu__button:focus-visible span {
  opacity: 1;
  transform: translateY(0) scale(1);
  text-shadow: 0 16px 42px rgba(0, 0, 0, 0.88), 0 0 24px rgba(255, 255, 255, 0.24);
}

.home-menu__button:active {
  filter: brightness(0.92);
}

.menuContent,
.logo,
.start-tour {
  display: none;
}

/* ===== Floor Plan ===== */
.map,
.minimap {
  position: relative;
  aspect-ratio: 860 / 500;
  background-image: url(assets/planta.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.map {
  width: min(100%, 820px, calc((var(--app-height) - 220px) * 1.72));
  justify-self: center;
  /* border: 1px solid rgba(255, 255, 255, 0.16); */
  border-radius: var(--radius);
  /* background-color: rgba(255, 255, 255, 0.9); */
  box-shadow: var(--shadow);
}

.buttonMark {
  position: absolute;
  width: clamp(30px, 4.9vmin, 56px);
  height: clamp(30px, 4.9vmin, 56px);
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: #11140e;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
  transform-origin: 50% 92%;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.buttonMark .material-symbols-rounded {
  color: #11140e;
  font-size: clamp(30px, 4.9vmin, 56px);
  font-variation-settings: "FILL" 1, "wght" 700, "GRAD" 0, "opsz" 48;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.42);
}

.buttonMark:hover,
.buttonMark:focus-visible {
  transform: translateY(-3px) scale(1.08);
  outline: none;
}

.buttonMark.is-active {
  color: var(--accent);
  filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0)) drop-shadow(0 0 18px rgba(201, 255, 100, 0.65));
  animation: active-pulse 1.6s ease-in-out infinite;
}

.buttonMark.is-active .material-symbols-rounded {
  color: var(--accent);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.36);
}

@keyframes active-pulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.06);
  }
}

.map .MarkSala,
.minimap .MarkSala { top: 14%; left: 19.767%; }
.map .MarkCozinha1,
.minimap .MarkCozinha1 { top: 18%; left: 6.395%; }
.map .MarkCozinha,
.minimap .MarkCozinha { top: 60%; left: 6.395%; }
.map .MarkQuarto1,
.minimap .MarkQuarto1 { top: 14%; left: 72.093%; }
.map .MarkQuarto2,
.minimap .MarkQuarto2 { top: 48%; left: 72.093%; }
.map .MarkQuartoInfantil,
.minimap .MarkQuartoInfantil { top: 48%; left: 46.512%; }
.map .MarkBanheiro,
.minimap .MarkBanheiro { top: 28%; left: 62.791%; }
.map .MarkCorredor,
.minimap .MarkCorredor { top: 10%; left: 52.326%; }

/* ===== HUD ===== */
.hud-button {
  width: var(--hud-size);
  height: var(--hud-size);
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #fff;
  background: var(--glass);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.hud-button:hover,
.hud-button:focus-visible {
  border-color: rgba(201, 255, 100, 0.72);
  background: var(--glass-strong);
  transform: translateY(-1px);
  outline: none;
}

.hud-button:active {
  transform: translateY(1px);
}

.hud-button .material-symbols-rounded {
  color: currentColor;
  font-size: clamp(24px, 3vmin, 30px);
  font-variation-settings: "FILL" 0, "wght" 650, "GRAD" 0, "opsz" 32;
}

.hud-button.is-fullscreen {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(12, 14, 12, 0.34);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  opacity: 0.72;
}

.hud-button.is-fullscreen .material-symbols-rounded {
  opacity: 0.58;
  filter: brightness(1.15) saturate(0.6);
}

.hud-button.is-fullscreen:hover,
.hud-button.is-fullscreen:focus-visible {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(12, 14, 12, 0.48);
  opacity: 0.9;
}

#showOverlay {
  position: absolute;
  top: calc(var(--safe-top) + var(--space-sm));
  left: calc(var(--safe-left) + var(--space-sm));
  z-index: 40;
}

.options {
  position: absolute;
  top: calc(var(--safe-top) + var(--space-sm));
  right: calc(var(--safe-right) + var(--space-sm));
  z-index: 40;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ===== Minimap ===== */
#minimap {
  position: absolute;
  left: calc(var(--safe-left) + var(--space-sm));
  bottom: calc(var(--safe-bottom) + var(--space-sm));
  z-index: 40;
  width: min(430px, calc(var(--app-width) - var(--space-sm) * 2));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.minimap-frame {
  width: 100%;
  aspect-ratio: 860 / 500;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
}

.minimap-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.minimap-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.minimap-header strong {
  color: var(--text);
  font-size: 15px;
}

.minimap {
  width: 100%;
  height: auto;
  flex: none;
  border-radius: 6px;
  /* background-color: rgba(255, 255, 255, 0.92); */
  overflow: hidden;
}

.minimap .buttonMark {
  width: clamp(20px, 3.8vmin, 34px);
  height: clamp(20px, 3.8vmin, 34px);
}

.minimap .buttonMark .material-symbols-rounded {
  font-size: clamp(20px, 3.8vmin, 34px);
}

#hideMap {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: #10120d;
  background: var(--accent);
  cursor: pointer;
  font-weight: 800;
  transition: filter 0.18s ease, transform 0.18s ease;
}

#hideMap .material-symbols-rounded {
  font-size: 20px;
  font-variation-settings: "FILL" 1, "wght" 650, "GRAD" 0, "opsz" 24;
}

#hideMap:hover {
  filter: brightness(1.05);
}

#hideMap:active {
  transform: translateY(1px);
}

#minimap.is-collapsed {
  width: min(260px, calc(var(--app-width) - var(--space-sm) * 2));
}

#minimap.is-collapsed .minimap-frame {
  display: none;
}

#minimap.is-collapsed .minimap-header {
  margin-bottom: 0;
}

/* ===== Home Modals ===== */
.media-lightbox,
.model-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: calc(var(--safe-top) + var(--space-sm)) calc(var(--safe-right) + var(--space-sm))
    calc(var(--safe-bottom) + var(--space-sm)) calc(var(--safe-left) + var(--space-sm));
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
}

.modal-close,
.lightbox-nav {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  color: #fffdf5;
  background: rgba(5, 6, 4, 0.7);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.modal-close:hover,
.modal-close:focus-visible,
.lightbox-nav:hover,
.lightbox-nav:focus-visible {
  border-color: rgba(255, 255, 255, 0.64);
  background: rgba(5, 6, 4, 0.9);
  transform: translateY(-1px);
  outline: none;
}

.modal-close {
  position: absolute;
  top: calc(var(--safe-top) + var(--space-sm));
  right: calc(var(--safe-right) + var(--space-sm));
  z-index: 3;
  width: var(--hud-size);
  height: var(--hud-size);
  line-height: 1;
}

.modal-close .material-symbols-rounded {
  color: currentColor;
  font-size: 28px;
  font-variation-settings: "FILL" 0, "wght" 700, "GRAD" 0, "opsz" 32;
}

.lightbox-figure {
  width: min(1120px, calc(100vw - var(--safe-left) - var(--safe-right) - 112px));
  height: min(760px, calc(var(--app-height) - var(--safe-top) - var(--safe-bottom) - 92px));
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  margin: 0;
}

.lightbox-figure img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
}

#lightboxCaption {
  min-height: 22px;
  color: rgba(255, 253, 245, 0.82);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  width: var(--hud-size);
  height: var(--hud-size);
  line-height: 1;
  transform: translateY(-50%);
}

.lightbox-nav .material-symbols-rounded {
  color: currentColor;
  font-size: 42px;
  font-variation-settings: "FILL" 0, "wght" 700, "GRAD" 0, "opsz" 48;
}

.lightbox-nav:hover,
.lightbox-nav:focus-visible {
  transform: translateY(calc(-50% - 1px));
}

.lightbox-nav--prev {
  left: calc(var(--safe-left) + var(--space-sm));
}

.lightbox-nav--next {
  right: calc(var(--safe-right) + var(--space-sm));
}

.media-lightbox.is-single .lightbox-nav {
  display: none;
}

.model-modal__panel {
  position: relative;
  width: min(1180px, calc(100vw - var(--safe-left) - var(--safe-right) - 36px));
  height: min(760px, calc(var(--app-height) - var(--safe-top) - var(--safe-bottom) - 36px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: #0a0d0b;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.56);
}

.model-modal__stage,
.model-viewer {
  width: 100%;
  height: 100%;
}

.model-modal__stage {
  position: relative;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.08), transparent 44%),
    #0a0d0b;
}

.model-viewer {
  position: relative;
  display: block;
  touch-action: none;
  --poster-color: transparent;
  --progress-bar-color: var(--accent);
  --progress-bar-height: 3px;
}

.model-ar-button {
  position: absolute;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 22px);
  z-index: 4;
  min-height: 46px;
  max-width: min(320px, calc(100% - 32px));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius);
  color: #10120d;
  background: rgba(201, 255, 100, 0.94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  cursor: pointer;
  font-size: clamp(13px, 2.5vw, 15px);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  transform: translateX(-50%);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.model-ar-button .material-symbols-rounded {
  font-size: 23px;
  font-variation-settings: "FILL" 0, "wght" 700, "GRAD" 0, "opsz" 24;
}

.model-ar-button:hover,
.model-ar-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.78);
  background: #d9ff80;
  outline: none;
  transform: translateX(-50%) translateY(-1px);
}

.model-ar-button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: translateX(-50%);
}

.model-qr {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  width: min(230px, calc(100% - 36px));
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  color: #fffdf5;
  background: rgba(5, 6, 4, 0.78);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(14px);
}

.model-qr__code {
  display: grid;
  place-items: center;
  min-height: 188px;
  padding: 10px;
  border-radius: 6px;
  background: #fff;
  color: #10120d;
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.25;
}

.model-qr__code svg {
  width: 100%;
  height: auto;
  display: block;
}

.model-qr__copy {
  display: grid;
  gap: 4px;
}

.model-qr__copy strong,
.model-qr__copy span {
  display: block;
}

.model-qr__copy strong {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
}

.model-qr__copy span {
  color: rgba(255, 253, 245, 0.72);
  font-size: 12px;
  line-height: 1.35;
}

.model-ar-failure {
  position: absolute;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 22px);
  z-index: 5;
  max-width: min(360px, calc(100% - 32px));
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  color: #fffdf5;
  background: rgba(5, 6, 4, 0.88);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.36);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  transform: translateX(-50%);
}

.model-viewer__poster {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(255, 253, 245, 0.82);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 34%),
    #0a0d0b;
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (hover: hover) and (pointer: fine) {
  .model-ar-button {
    display: none;
  }
}

/* ===== Loading created by JS ===== */
.cv-loading {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--text);
  text-align: center;
  background: rgba(3, 4, 3, 0.76);
  backdrop-filter: blur(10px);
}

.cv-loading__box {
  width: min(360px, 86vw);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
}

.cv-spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: cvspin 0.86s linear infinite;
}

.cv-loading__title {
  font-weight: 800;
}

#cv-progress {
  min-height: 20px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

@keyframes cvspin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Utilities ===== */
.hidden {
  display: none !important;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .home-menu__button span {
    font-size: clamp(15px, 2.6vw, 25px);
  }
}

@media (max-width: 760px) {
  #overlay {
    padding: 0;
  }

  .home-client-logo {
    top: calc(var(--safe-top) + 18px);
    width: clamp(116px, 36vw, 160px);
  }

  .home-studio-logo {
    bottom: calc(var(--safe-bottom) + 18px);
    width: min(245px, calc(100vw - var(--safe-left) - var(--safe-right) - 36px));
  }

  .home-menu__button {
    padding: clamp(82px, 15vh, 118px) 8px;
  }

  .home-menu__button span {
    min-height: 62px;
    font-size: clamp(12px, 3.6vw, 16px);
    letter-spacing: 0.04em;
  }

  #minimap {
    right: calc(var(--safe-right) + var(--space-sm));
    left: calc(var(--safe-left) + var(--space-sm));
    bottom: calc(var(--safe-bottom) + var(--space-sm));
    width: auto;
    padding: 10px;
  }

  .minimap {
    width: 100%;
  }

  .options {
    gap: 8px;
  }

  .lightbox-figure {
    width: calc(100vw - var(--safe-left) - var(--safe-right) - 24px);
    height: calc(var(--app-height) - var(--safe-top) - var(--safe-bottom) - 106px);
  }

  .lightbox-nav {
    top: auto;
    bottom: calc(var(--safe-bottom) + 16px);
    width: 46px;
    height: 46px;
    font-size: 34px;
    transform: none;
  }

  .lightbox-nav:hover,
  .lightbox-nav:focus-visible {
    transform: translateY(-1px);
  }

  .lightbox-nav--prev {
    left: calc(50% - 58px);
  }

  .lightbox-nav--next {
    right: calc(50% - 58px);
  }

  .model-modal__panel {
    width: calc(100vw - var(--safe-left) - var(--safe-right) - 20px);
    height: calc(var(--app-height) - var(--safe-top) - var(--safe-bottom) - 84px);
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .home-client-logo {
    width: 108px;
  }

  .home-studio-logo {
    width: 210px;
  }

  .home-menu__button {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .home-menu__button span {
    min-height: 48px;
    font-size: 13px;
  }

  #minimap {
    width: min(330px, 42vw);
  }
}

/* =========================================================
   Portal experience — cinematic home and lateral door menu
   ========================================================= */
#overlay {
  --scene-x: 0px;
  --scene-y: 0px;
  padding: 0;
  perspective: 1800px;
  background: #090a08;
}

#overlay::before {
  background:
    linear-gradient(90deg, rgba(6, 7, 5, 0.88) 0%, rgba(6, 7, 5, 0.57) 42%, rgba(6, 7, 5, 0.12) 69%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), transparent 34%, rgba(0, 0, 0, 0.58));
}

#overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background: #080907;
  transform: scaleX(0);
  transform-origin: right center;
}

.overlay-bg,
.overlay-video {
  transform: scale(1.055) translate3d(var(--scene-x), var(--scene-y), 0);
  transition: opacity 0.45s ease, transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.home-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.home-atmosphere__grain {
  position: absolute;
  inset: -50%;
  opacity: 0.075;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  animation: home-grain 0.22s steps(2) infinite;
}

.home-atmosphere__line {
  position: absolute;
  top: 0;
  left: 62%;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.22) 22%, rgba(255, 255, 255, 0.07) 75%, transparent);
}

.home-brand,
.home-hero,
.home-signature,
.home-menu {
  position: absolute;
}

.home-brand {
  top: calc(var(--safe-top) + clamp(24px, 4.2vmin, 54px));
  left: calc(var(--safe-left) + clamp(24px, 5vw, 78px));
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 18px;
}

.home-brand .home-client-logo {
  position: static;
  width: clamp(108px, 10vw, 154px);
  height: auto;
  display: block;
  pointer-events: none;
  transform: none;
  filter: drop-shadow(0 14px 34px rgba(0, 0, 0, 0.5));
}

.home-brand__divider {
  width: 1px;
  height: 34px;
  background: rgba(255, 255, 255, 0.35);
}

.home-brand__edition {
  color: rgba(255, 255, 255, 0.68);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  line-height: 1.55;
  text-transform: uppercase;
}

.home-hero {
  left: calc(var(--safe-left) + clamp(24px, 5vw, 78px));
  bottom: calc(var(--safe-bottom) + clamp(70px, 12vh, 132px));
  z-index: 6;
  width: min(52vw, 730px);
}

.home-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 clamp(16px, 2.6vh, 30px);
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(9px, 0.72vw, 12px);
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.home-hero__eyebrow span {
  width: 36px;
  height: 1px;
  background: var(--warm);
}

.home-hero h1 {
  margin: 0;
  color: #fff;
  font-family: "Bodoni 72", "Bodoni MT", Didot, Georgia, serif;
  font-size: clamp(52px, 7.15vw, 114px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.77;
  text-wrap: balance;
  text-shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
}

.home-hero h1 em {
  color: #f3e6d8;
  font-size: 0.58em;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.home-hero__copy {
  max-width: 470px;
  margin: clamp(24px, 3.5vh, 40px) 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(13px, 1.05vw, 17px);
  line-height: 1.65;
}

.home-hero__cta {
  min-width: 230px;
  margin-top: clamp(20px, 3.2vh, 34px);
  display: inline-flex;
  align-items: center;
  gap: 15px;
  padding: 6px 24px 6px 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: var(--ink);
  background: #f2eee7;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.26);
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.home-hero__cta:hover,
.home-hero__cta:focus-visible {
  outline: none;
  background: #fff;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.34);
  transform: translateY(-3px);
}

.home-hero__cta-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #121410;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.home-hero__cta:hover .home-hero__cta-icon,
.home-hero__cta:focus-visible .home-hero__cta-icon {
  transform: rotate(-35deg);
}

.home-hero__cta > span:last-child {
  display: grid;
  gap: 2px;
  text-align: left;
}

.home-hero__cta strong {
  font-size: 13px;
  letter-spacing: 0.02em;
}

.home-hero__cta small {
  color: rgba(16, 17, 15, 0.55);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#overlay .home-menu {
  inset: 0 0 0 auto;
  z-index: 6;
  width: min(38vw, 590px);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(9, 10, 8, 0.38);
  box-shadow: -40px 0 100px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(3px);
  transform-style: preserve-3d;
}

.home-menu__header {
  flex: 0 0 clamp(112px, 17vh, 170px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 clamp(24px, 3vw, 48px) clamp(22px, 3.2vh, 34px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.home-menu__header > span {
  font-family: "Bodoni 72", "Bodoni MT", Didot, Georgia, serif;
  font-size: clamp(28px, 2.7vw, 46px);
  letter-spacing: -0.03em;
}

.home-menu__header small {
  max-width: 98px;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-align: right;
  text-transform: uppercase;
}

#overlay .home-menu__button {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  height: auto;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 42px;
  align-items: center;
  gap: clamp(10px, 1.5vw, 22px);
  padding: 12px clamp(24px, 3vw, 48px);
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: #fffdf5;
  background: rgba(13, 14, 12, 0.34);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  text-align: left;
  text-transform: none;
  transform-origin: right center;
  transform-style: preserve-3d;
  transition:
    flex-grow 0.44s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.52s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.3s ease,
    box-shadow 0.45s ease;
}

#overlay .home-menu__button:last-child {
  border-bottom: 0;
}

#overlay .home-menu__button::before {
  z-index: 0;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#overlay .home-menu__button::after {
  z-index: 1;
  opacity: 0;
  background: linear-gradient(90deg, rgba(7, 8, 6, 0.88), rgba(7, 8, 6, 0.28));
  transition: opacity 0.35s ease;
}

#overlay .home-menu__button > span {
  position: relative;
  z-index: 2;
  min-height: 0;
  padding: 0;
  place-items: initial;
  overflow: visible;
  opacity: 1;
  transform: none;
  text-shadow: none;
}

.home-menu__index {
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  overflow-wrap: normal;
  text-align: left;
  white-space: nowrap;
}

#overlay .home-menu__label {
  display: grid;
  gap: 5px;
  text-align: left;
}

.home-menu__label strong {
  font-family: "Bodoni 72", "Bodoni MT", Didot, Georgia, serif;
  font-size: clamp(22px, 2vw, 34px);
  font-weight: 400;
  letter-spacing: -0.025em;
}

.home-menu__label small {
  color: rgba(255, 255, 255, 0.48);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

#overlay .home-menu__arrow {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  font-size: 18px;
  transition: color 0.3s ease, background 0.3s ease, transform 0.4s ease;
}

#overlay .home-menu__button:hover,
#overlay .home-menu__button:focus-visible {
  flex-grow: 1.42;
  outline: none;
  background: rgba(8, 9, 7, 0.78);
  box-shadow: -26px 0 58px rgba(0, 0, 0, 0.22);
  transform: translateX(-18px) rotateY(-3.5deg);
}

#overlay .home-menu__button:hover::before,
#overlay .home-menu__button:focus-visible::before {
  filter: saturate(0.9) contrast(1.04) brightness(0.82);
  opacity: 0.74;
  transform: scale(1);
}

#overlay .home-menu__button:hover::after,
#overlay .home-menu__button:focus-visible::after {
  opacity: 1;
}

#overlay .home-menu__button:hover > span,
#overlay .home-menu__button:focus-visible > span {
  opacity: 1;
  transform: none;
  text-shadow: none;
}

#overlay .home-menu__button:hover .home-menu__label small,
#overlay .home-menu__button:focus-visible .home-menu__label small {
  color: rgba(255, 255, 255, 0.78);
}

#overlay .home-menu__button:hover .home-menu__arrow,
#overlay .home-menu__button:focus-visible .home-menu__arrow {
  color: #11130f;
  background: var(--warm);
  transform: rotate(42deg);
}

#overlay .home-menu__button:active {
  filter: none;
  transform: translateX(-12px) rotateY(-2deg) scale(0.99);
}

.home-signature {
  left: calc(var(--safe-left) + clamp(24px, 5vw, 78px));
  bottom: calc(var(--safe-bottom) + clamp(22px, 3.4vh, 40px));
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 15px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-signature__line {
  width: clamp(50px, 7vw, 110px);
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}

/* Cinematic opening */
.portal-intro {
  position: absolute;
  inset: 0;
  z-index: 40;
  overflow: hidden;
  pointer-events: none;
  perspective: 1800px;
}

.portal-intro__door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.1%;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent 12%),
    linear-gradient(180deg, #191a17, #090a08 62%, #11120f);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  backface-visibility: hidden;
}

.portal-intro__door::before {
  content: "";
  position: absolute;
  inset: 6vh 5vw;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.portal-intro__door--left {
  left: 0;
  transform-origin: left center;
}

.portal-intro__door--right {
  right: 0;
  transform-origin: right center;
}

.portal-intro__edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, transparent 4%, rgba(233, 185, 137, 0.7) 48%, transparent 96%);
  box-shadow: 0 0 26px rgba(233, 185, 137, 0.28);
}

.portal-intro__door--left .portal-intro__edge {
  right: 0;
}

.portal-intro__door--right .portal-intro__edge {
  left: 0;
}

.portal-intro__brand {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 22px;
  transform: translate(-50%, -50%);
}

.portal-intro__brand img {
  width: clamp(150px, 19vw, 290px);
  filter: drop-shadow(0 18px 50px rgba(0, 0, 0, 0.38));
}

.portal-intro__brand span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-align: center;
  text-transform: uppercase;
}

.portal-intro__light {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 2;
  width: 2px;
  background: #fff3df;
  box-shadow: 0 0 20px #f5d0a4, 0 0 80px 18px rgba(233, 185, 137, 0.3);
  transform: translateX(-50%) scaleX(0.6);
}

.intro-pending .home-brand,
.intro-pending .home-hero,
.intro-pending .home-menu,
.intro-pending .home-signature {
  opacity: 0;
  pointer-events: none;
}

body.intro-playing .portal-intro__door--left {
  animation: portal-open-left 1.85s 0.58s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

body.intro-playing .portal-intro__door--right {
  animation: portal-open-right 1.85s 0.58s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

body.intro-playing .portal-intro__brand {
  animation: portal-brand 0.76s 0.08s ease both, portal-brand-out 0.62s 0.82s ease forwards;
}

body.intro-playing .portal-intro__light {
  animation: portal-light 1.8s 0.5s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

body.intro-playing .portal-intro {
  animation: portal-away 0.35s 2.35s ease forwards;
}

body.intro-playing .home-brand,
body.intro-playing .home-hero,
body.intro-playing .home-menu,
body.intro-playing .home-signature {
  animation: home-reveal 0.95s 1.78s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

body.intro-playing .home-menu {
  animation-name: menu-reveal;
}

#overlay.is-exiting .home-hero,
#overlay.is-exiting .home-brand,
#overlay.is-exiting .home-signature {
  opacity: 0;
  transform: translate3d(-70px, 0, 0);
  transition: opacity 0.52s ease, transform 0.68s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#overlay.is-exiting .home-menu__button,
#overlay.is-exiting .home-menu__header {
  opacity: 0;
  transform: translateX(104%) rotateY(18deg);
  transition: opacity 0.45s ease, transform 0.75s cubic-bezier(0.76, 0, 0.24, 1);
}

#overlay.is-exiting .home-menu__button:nth-of-type(1) { transition-delay: 0.04s; }
#overlay.is-exiting .home-menu__button:nth-of-type(2) { transition-delay: 0.09s; }
#overlay.is-exiting .home-menu__button:nth-of-type(3) { transition-delay: 0.14s; }
#overlay.is-exiting .home-menu__button:nth-of-type(4) { transition-delay: 0.19s; }

#overlay.is-exiting::after {
  animation: exit-curtain 0.92s 0.24s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

#overlay.is-returning .home-brand,
#overlay.is-returning .home-hero,
#overlay.is-returning .home-signature {
  animation: return-left 0.82s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

#overlay.is-returning .home-menu {
  animation: return-right 0.9s 0.12s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes home-grain {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(2%, -3%, 0); }
  50% { transform: translate3d(-4%, 2%, 0); }
  75% { transform: translate3d(3%, 4%, 0); }
  100% { transform: translate3d(-2%, -1%, 0); }
}

@keyframes portal-open-left {
  to { transform: translateX(-102%) rotateY(9deg); }
}

@keyframes portal-open-right {
  to { transform: translateX(102%) rotateY(-9deg); }
}

@keyframes portal-brand {
  from { opacity: 0; transform: translate(-50%, -44%) scale(0.94); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes portal-brand-out {
  to { opacity: 0; filter: blur(8px); transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes portal-light {
  0% { opacity: 0.4; transform: translateX(-50%) scaleX(0.6); }
  42% { opacity: 1; transform: translateX(-50%) scaleX(12); }
  100% { opacity: 0; transform: translateX(-50%) scaleX(180); }
}

@keyframes portal-away {
  to { opacity: 0; visibility: hidden; }
}

@keyframes home-reveal {
  from { opacity: 0; transform: translate3d(-34px, 18px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes menu-reveal {
  from { opacity: 0; transform: translateX(80px) rotateY(-3deg); }
  to { opacity: 1; transform: translateX(0) rotateY(0); }
}

@keyframes exit-curtain {
  0% { transform: scaleX(0); transform-origin: right center; }
  48% { transform: scaleX(1); transform-origin: right center; }
  49% { transform-origin: left center; }
  100% { transform: scaleX(0); transform-origin: left center; }
}

@keyframes return-left {
  from { opacity: 0; transform: translateX(-46px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes return-right {
  from { opacity: 0; transform: translateX(90px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Matching entrances for the gallery and 3D layers */
.media-lightbox:not(.hidden),
.model-modal:not(.hidden) {
  animation: modal-backdrop-in 0.42s ease both;
}

.media-lightbox:not(.hidden) .lightbox-figure {
  animation: modal-content-in 0.72s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.model-modal:not(.hidden) .model-modal__panel {
  animation: model-door-in 0.78s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transform-origin: right center;
}

@keyframes modal-backdrop-in {
  from { background-color: rgba(0, 0, 0, 0); backdrop-filter: blur(0); }
  to { background-color: rgba(0, 0, 0, 0.78); backdrop-filter: blur(12px); }
}

@keyframes modal-content-in {
  from { opacity: 0; filter: blur(10px); transform: translateY(28px) scale(0.97); }
  to { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}

@keyframes model-door-in {
  from { opacity: 0; transform: translateX(80px) rotateY(-8deg) scale(0.97); }
  to { opacity: 1; transform: translateX(0) rotateY(0) scale(1); }
}

@media (max-width: 900px) {
  #overlay::before {
    background:
      linear-gradient(180deg, rgba(5, 6, 4, 0.54), rgba(5, 6, 4, 0.18) 35%, rgba(5, 6, 4, 0.82) 70%),
      rgba(0, 0, 0, 0.12);
  }

  .home-atmosphere__line,
  .home-brand__divider,
  .home-brand__edition,
  .home-signature {
    display: none;
  }

  .home-brand {
    top: calc(var(--safe-top) + 20px);
    left: calc(var(--safe-left) + 20px);
  }

  .home-brand .home-client-logo {
    width: clamp(104px, 31vw, 138px);
  }

  .home-hero {
    top: calc(var(--safe-top) + clamp(92px, 17vh, 140px));
    right: calc(var(--safe-right) + 20px);
    bottom: auto;
    left: calc(var(--safe-left) + 20px);
    width: auto;
  }

  .home-hero__eyebrow {
    margin-bottom: 14px;
  }

  .home-hero h1 {
    font-size: clamp(42px, 13.5vw, 72px);
    line-height: 0.79;
  }

  .home-hero__copy {
    max-width: 390px;
    margin-top: 18px;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: break-word;
  }

  .home-hero__cta {
    display: none;
  }

  #overlay .home-menu {
    inset: auto 0 0 0;
    width: 100%;
    height: min(43vh, 390px);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    border-left: 0;
    background: rgba(8, 9, 7, 0.72);
    backdrop-filter: blur(12px);
  }

  .home-menu__header {
    flex: 0 0 52px;
    align-items: center;
    padding: 0 20px;
  }

  .home-menu__header > span {
    font-size: 22px;
  }

  .home-menu__header small {
    max-width: none;
    margin: 0;
    font-size: 8px;
  }

  #overlay .home-menu__button {
    grid-template-columns: 28px minmax(0, 1fr) 34px;
    gap: 8px;
    padding: 7px 20px;
    transform-origin: bottom center;
  }

  .home-menu__label strong {
    font-size: clamp(18px, 5.5vw, 25px);
  }

  .home-menu__label small {
    font-size: 8px;
  }

  #overlay .home-menu__arrow {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  #overlay .home-menu__button:hover,
  #overlay .home-menu__button:focus-visible {
    transform: translateY(-3px);
  }
}

@media (max-width: 420px) {
  .home-menu__header small {
    display: none;
  }
}

@media (max-height: 690px) and (min-width: 901px) {
  .home-hero {
    bottom: calc(var(--safe-bottom) + 68px);
  }

  .home-hero h1 {
    font-size: clamp(48px, 6.1vw, 82px);
  }

  .home-hero__copy {
    margin-top: 18px;
  }

  .home-hero__cta {
    margin-top: 18px;
  }
}

@media (max-height: 600px) and (max-width: 900px) {
  .home-hero {
    top: calc(var(--safe-top) + 72px);
  }

  .home-hero__copy {
    display: none;
  }

  #overlay .home-menu {
    height: 48vh;
  }

  .home-brand .home-client-logo {
    width: 92px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-intro {
    display: none;
  }

  .intro-pending .home-brand,
  .intro-pending .home-hero,
  .intro-pending .home-menu,
  .intro-pending .home-signature {
    opacity: 1;
  }

  .home-atmosphere__grain {
    animation: none;
  }

  .overlay-bg,
  .overlay-video,
  #overlay .home-menu__button,
  .home-hero__cta,
  .home-hero__cta-icon {
    transition-duration: 0.01ms !important;
  }

  #overlay.is-exiting::after {
    animation-duration: 0.01ms;
  }

  .media-lightbox:not(.hidden),
  .model-modal:not(.hidden),
  .media-lightbox:not(.hidden) .lightbox-figure,
  .model-modal:not(.hidden) .model-modal__panel {
    animation-duration: 0.01ms;
  }
}

/* =========================================================
   Tour controls — editorial continuation of the portal
   ========================================================= */

/* Precision-built menu arrows: independent from font baselines */
#overlay .home-menu__arrow {
  position: relative;
  flex: none;
  padding: 0;
  overflow: visible;
  font-size: 0 !important;
  line-height: 0;
}

#overlay .home-menu__arrow::before,
#overlay .home-menu__arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  pointer-events: none;
}

#overlay .home-menu__arrow::before {
  width: 9px;
  height: 9px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translate(-34%, -66%);
}

#overlay .home-menu__arrow::after {
  width: 13px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-55%, -5%) rotate(-45deg);
  transform-origin: center;
}

#overlay .home-menu__button:hover .home-menu__arrow,
#overlay .home-menu__button:focus-visible .home-menu__arrow {
  transform: scale(1.07);
}

/* Top HUD */
.hud-button {
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(242, 238, 231, 0.34);
  border-radius: 999px;
  color: #f2eee7;
  background: rgba(10, 11, 9, 0.78);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(18px) saturate(0.8);
  transition:
    color 0.28s ease,
    background 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hud-button:hover,
.hud-button:focus-visible {
  border-color: rgba(233, 185, 137, 0.82);
  color: var(--ink);
  background: #f2eee7;
  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.34),
    0 0 0 4px rgba(233, 185, 137, 0.12);
  transform: translateY(-3px);
}

.hud-button:active {
  transform: translateY(-1px) scale(0.97);
}

.hud-button .material-symbols-rounded {
  display: block;
  color: currentColor;
  font-size: 22px;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  line-height: 1;
  transform: translateY(0);
}

#showOverlay {
  width: auto;
  min-width: 108px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 6px 18px 6px 7px;
}

#showOverlay .material-symbols-rounded {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--warm);
  transition: transform 0.3s ease;
}

#showOverlay:hover .material-symbols-rounded,
#showOverlay:focus-visible .material-symbols-rounded {
  transform: translateX(-2px);
}

.hud-button__text {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.options {
  gap: 2px;
  padding: 5px;
  border: 1px solid rgba(242, 238, 231, 0.22);
  border-radius: 999px;
  background: rgba(10, 11, 9, 0.64);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px) saturate(0.8);
}

.options .hud-button {
  width: 42px;
  height: 42px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.options .hud-button:hover,
.options .hud-button:focus-visible {
  border-color: transparent;
  color: var(--ink);
  background: var(--warm);
  box-shadow: none;
  transform: none;
}

.hud-button.is-fullscreen,
.hud-button.is-fullscreen:hover,
.hud-button.is-fullscreen:focus-visible {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  opacity: 1;
}

.hud-button.is-fullscreen .material-symbols-rounded {
  opacity: 1;
  filter: none;
}

.hud-button.is-fullscreen:hover,
.hud-button.is-fullscreen:focus-visible {
  color: var(--ink);
  background: var(--warm);
}

/* Navigational hotspots inside the panorama */
.scene-hotspot {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 5px 16px 5px 5px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: var(--ink);
  background: rgba(242, 238, 231, 0.92);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(14px);
  transform: translate(-50%, -50%) scale(0.94);
  transition:
    opacity 0.2s ease,
    transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.25s ease;
}

.scene-hotspot.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.scene-hotspot:hover,
.scene-hotspot:focus-visible {
  filter: none;
  background: #fff;
  transform: translate(-50%, calc(-50% - 3px)) scale(1.02);
}

.scene-hotspot__arrow {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #f2eee7;
  background: #11130f;
  font-size: 0;
  line-height: 0;
  transform: none;
  transition: color 0.25s ease, background 0.25s ease, transform 0.3s ease;
}

.scene-hotspot:hover .scene-hotspot__arrow,
.scene-hotspot:focus-visible .scene-hotspot__arrow {
  color: var(--ink);
  background: var(--warm);
  transform: rotate(-28deg);
}

.scene-hotspot__arrow .material-symbols-rounded {
  color: currentColor;
  font-size: 19px;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 20;
  line-height: 1;
  filter: none;
}

.scene-hotspot__label {
  position: static;
  width: auto;
  max-width: 160px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  font-family: "Bodoni 72", "Bodoni MT", Didot, Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1;
  transform: none;
  backdrop-filter: none;
}

/* Editorial minimap */
#minimap {
  width: min(420px, calc(var(--app-width) - var(--space-sm) * 2));
  padding: 10px;
  border: 1px solid rgba(242, 238, 231, 0.68);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(242, 238, 231, 0.94);
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(18px) saturate(0.75);
  animation: minimap-arrive 0.72s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.minimap-header {
  min-height: 48px;
  align-items: center;
  margin: 0;
  padding: 2px 8px 10px;
}

.minimap-header span {
  position: relative;
  padding-left: 20px;
  color: rgba(16, 17, 15, 0.55);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.minimap-header span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 12px;
  height: 1px;
  background: #b57649;
}

.minimap-header strong {
  color: var(--ink);
  font-family: "Bodoni 72", "Bodoni MT", Didot, Georgia, serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.minimap-frame {
  border: 1px solid rgba(16, 17, 15, 0.12);
  border-radius: 11px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.minimap {
  border-radius: 10px;
}

.minimap .buttonMark {
  width: clamp(22px, 3.2vmin, 30px);
  height: clamp(22px, 3.2vmin, 30px);
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  color: #f2eee7;
  background: #11130f;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  filter: none;
  transform-origin: center;
  transition:
    color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

.minimap .buttonMark .material-symbols-rounded {
  color: currentColor;
  font-size: clamp(14px, 2.2vmin, 18px);
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 20;
  line-height: 1;
  text-shadow: none;
  transform: translateY(-0.5px);
}

.minimap .buttonMark:hover,
.minimap .buttonMark:focus-visible {
  background: #000;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.34),
    0 0 0 4px rgba(233, 185, 137, 0.28);
  transform: translateY(-2px) scale(1.08);
}

.minimap .buttonMark.is-active {
  color: var(--ink);
  background: var(--warm);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.32),
    0 0 0 5px rgba(233, 185, 137, 0.32);
  filter: none;
  animation: marker-editorial-pulse 1.8s ease-in-out infinite;
}

.minimap .buttonMark.is-active .material-symbols-rounded {
  color: currentColor;
  text-shadow: none;
}

#hideMap {
  min-height: 42px;
  margin-top: 9px;
  gap: 9px;
  border: 1px solid #11130f;
  border-radius: 999px;
  color: #f2eee7;
  background: #11130f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

#hideMap .material-symbols-rounded {
  font-size: 18px;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 20;
  line-height: 1;
}

#hideMap:hover,
#hideMap:focus-visible {
  color: var(--ink);
  background: var(--warm);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
  filter: none;
  outline: none;
  transform: translateY(-2px);
}

#hideMap:active {
  transform: translateY(0);
}

#minimap.is-collapsed {
  width: min(290px, calc(var(--app-width) - var(--space-sm) * 2));
}

#minimap.is-collapsed .minimap-header {
  min-height: 42px;
  padding-bottom: 2px;
}

@keyframes minimap-arrive {
  from { opacity: 0; transform: translateY(26px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes marker-editorial-pulse {
  0%, 100% {
    box-shadow:
      0 8px 22px rgba(0, 0, 0, 0.32),
      0 0 0 4px rgba(233, 185, 137, 0.22);
  }
  50% {
    box-shadow:
      0 10px 26px rgba(0, 0, 0, 0.36),
      0 0 0 8px rgba(233, 185, 137, 0.08);
  }
}

@media (max-width: 760px) {
  #showOverlay {
    min-width: 96px;
    height: 48px;
    padding-right: 15px;
  }

  #showOverlay .material-symbols-rounded {
    width: 34px;
    height: 34px;
  }

  .options {
    padding: 3px;
  }

  .options .hud-button {
    width: 40px;
    height: 40px;
  }

  #minimap {
    padding: 8px;
    border-radius: 15px;
  }

  .minimap-header {
    min-height: 42px;
    padding-bottom: 8px;
  }

  .minimap-header strong {
    font-size: 18px;
  }

  .scene-hotspot {
    min-height: 44px;
    gap: 8px;
    padding: 4px 12px 4px 4px;
  }

  .scene-hotspot__arrow {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .scene-hotspot__label {
    max-width: 120px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #minimap,
  .minimap .buttonMark.is-active {
    animation: none;
  }
}

/* Lightweight studio lighting for the built-in 3D viewer */
.model-modal__stage {
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 32% 22%, rgba(233, 185, 137, 0.26), transparent 34%),
    radial-gradient(circle at 76% 28%, rgba(126, 164, 151, 0.18), transparent 31%),
    linear-gradient(145deg, #24251f 0%, #151713 48%, #090b09 100%);
}

.model-modal__stage::before,
.model-modal__stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.model-modal__stage::before {
  top: -28%;
  left: -8%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 228, 199, 0.16), transparent 67%);
  filter: blur(20px);
}

.model-modal__stage::after {
  right: 7%;
  bottom: -15%;
  width: 58%;
  height: 30%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.42), transparent 68%);
  filter: blur(18px);
}

.model-viewer {
  z-index: 1;
  background: transparent;
  --poster-color: transparent;
  --progress-bar-color: var(--warm);
  --progress-bar-height: 2px;
}

.model-viewer__poster {
  background:
    radial-gradient(circle at 34% 24%, rgba(233, 185, 137, 0.18), transparent 36%),
    radial-gradient(circle at 74% 30%, rgba(126, 164, 151, 0.12), transparent 32%),
    linear-gradient(145deg, #24251f, #0a0d0b);
}
