/* Virtual tours — layout & components. Brand fonts/colours come from brand/brand.css. */



* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font-body); font-weight: 400; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 3px; }
svg { display: block; }

/* ---------- glass primitive ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ---------- tour overlay ---------- */
.ui { position: fixed; z-index: 10; pointer-events: none; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.ui > * { pointer-events: auto; }

.top { top: 16px; inset-inline: 16px; display: grid; grid-template-columns: 44px 1fr 44px; align-items: start; gap: 12px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); transition: border-color .2s, background .2s; }
.icon-btn:hover { border-color: var(--glass-line-hi); background: rgba(var(--bg-rgb), 0.4); }
.icon-btn svg { width: 18px; height: 18px; }

.title { justify-self: center; display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 14px; border-radius: 999px; max-width: 100%; min-width: 0; }
.title img { width: 22px; height: 22px; flex: none; opacity: .9; }
.title .t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.title small { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.title strong { font-family: var(--font-body); font-weight: 700; font-size: 16px; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bottom { bottom: 18px; inset-inline: 16px; display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.bar { display: flex; align-items: center; height: 48px; border-radius: 999px; padding: 0 6px; }
.bar button { height: 36px; min-width: 36px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--text); font-size: 14px; transition: background .2s, color .2s; }
.bar button:hover { background: rgba(var(--accent-rgb), 0.1); color: var(--white); }
.bar button svg { width: 18px; height: 18px; }
.bar .count { direction: ltr; unicode-bidi: isolate; min-width: 62px; text-align: center; font-family: var(--font-latin); font-size: 12px; letter-spacing: .08em; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar .sep { width: 1px; height: 20px; background: var(--glass-line); margin: 0 4px; }
.vr-btn { height: 48px; padding: 0 20px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 15px; font-weight: 500; border-color: rgba(var(--accent-rgb), 0.4); }
.vr-btn:hover { background: rgba(var(--accent-rgb), 0.12); border-color: var(--accent); }
.vr-btn svg { width: 20px; height: 20px; }

.hint { position: fixed; bottom: 80px; inset-inline: 16px; margin: auto; max-width: 480px; text-align: center; font-size: 13px; color: var(--muted); border-radius: 14px; padding: 10px 14px; z-index: 10; }

/* hide-UI mode: only the arrows stay in the scene */
#btn-show { position: fixed; z-index: 11; bottom: 18px; inset-inline-end: 16px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); opacity: 0; pointer-events: none; transition: opacity .3s; }
#btn-show svg { width: 17px; height: 17px; }
body.ui-hidden .ui, body.ui-hidden .hint { opacity: 0; pointer-events: none; }
body.ui-hidden .ui > * { pointer-events: none; }
body.ui-hidden .top { transform: translateY(-12px); }
body.ui-hidden .bottom { transform: translateY(12px); }
body.ui-hidden #btn-show { opacity: .55; pointer-events: auto; }
body.ui-hidden #btn-show:hover { opacity: 1; }

/* ---------- rooms drawer ---------- */
#scrim { position: fixed; inset: 0; z-index: 19; background: rgba(0, 0, 0, 0.25); opacity: 0; pointer-events: none; transition: opacity .3s; }
#drawer { position: fixed; z-index: 20; top: 10px; bottom: 10px; inset-inline-start: 10px; width: min(360px, calc(100vw - 20px)); border-radius: 20px; display: flex; flex-direction: column; transform: translateX(calc(100% + 20px)); transition: transform .4s var(--ease); background: rgba(var(--bg-rgb), 0.52); }
body.drawer-open #drawer { transform: none; }
body.drawer-open #scrim { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 12px; }
.drawer-head h2 { margin: 0; font-family: var(--font-body); font-size: 17px; font-weight: 700; color: var(--white); }
.drawer-head p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
#btn-close { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
#btn-close:hover { color: var(--white); background: rgba(var(--accent-rgb), 0.1); }
#btn-close svg { width: 16px; height: 16px; }
#room-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 14px 16px; scrollbar-width: thin; scrollbar-color: rgba(var(--accent-rgb),.25) transparent; }
.grp { margin-top: 14px; }
.grp h3 { margin: 0 4px 8px; display: flex; align-items: center; gap: 10px; font-family: var(--font-body); font-weight: 600; font-size: 12px; color: var(--accent); letter-spacing: .02em; }
.grp h3::after { content: ""; flex: 1; height: 1px; background: var(--glass-line); }
.grp h3 span { font-family: var(--font-latin); font-weight: 400; color: var(--muted); font-size: 11px; }
.grp .items { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.room { position: relative; display: block; border-radius: 12px; overflow: hidden; text-align: start; border: 1px solid transparent; transition: border-color .2s, transform .2s var(--ease); }
.room img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; filter: saturate(.85) brightness(.82); transition: filter .25s; }
.room .t { position: absolute; inset: auto 0 0 0; padding: 18px 9px 7px; font-size: 12.5px; color: var(--white); background: linear-gradient(to top, rgba(var(--bg-rgb),.85), transparent); line-height: 1.3; }
.room:hover img { filter: saturate(1) brightness(.95); }
.room.active { border-color: var(--accent); }
.room.active .t { color: var(--accent); }

#loading { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 15; opacity: 0; transition: opacity .25s; }
#loading.show { opacity: 1; }
#loading span { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(var(--accent-rgb),.15); border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#flash { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; font-size: 13px; color: var(--accent); opacity: 0; transition: opacity .25s; z-index: 40; pointer-events: none; }
#flash.show { opacity: 1; }

body.in-vr .ui, body.in-vr .hint, body.in-vr #btn-show { display: none; }
.a-enter-vr, .a-enter-ar { display: none !important; }

/* ---------- edit mode panel ---------- */
#edit-panel { position: fixed; z-index: 30; top: 76px; inset-inline-end: 16px; width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 160px); overflow: auto; border-radius: 16px; padding: 14px; font-size: 13px; background: rgba(var(--bg-rgb),.78); border-color: rgba(var(--strong-rgb),.5); }
#edit-panel h3 { margin: 0 0 6px; font-size: 14px; color: var(--strong); font-family: var(--font-body); font-weight: 700; }
#edit-panel p { margin: 6px 0; color: var(--muted); line-height: 1.6; }
#edit-panel select { width: 100%; background: #0c0d10; color: var(--text); border: 1px solid var(--glass-line); border-radius: 8px; padding: 6px; font: inherit; }
#edit-panel ul { padding-inline-start: 18px; margin: 6px 0; }
#edit-panel li { margin: 4px 0; }
#edit-panel li button, #edit-panel .row button, #edit-panel .row a { background: rgba(var(--accent-rgb),.08); border: 1px solid var(--glass-line); border-radius: 6px; padding: 4px 10px; }
#edit-panel .row { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
#edit-coords { direction: ltr; font-family: ui-monospace, monospace; color: var(--strong); }
code { direction: ltr; unicode-bidi: embed; font-size: 11px; color: var(--muted); }

@media (max-width: 560px) {
  .top { grid-template-columns: 40px 1fr 40px; gap: 8px; top: 12px; inset-inline: 12px; }
  .icon-btn { width: 40px; height: 40px; }
  .title { padding: 7px 14px 7px 10px; }
  .title strong { font-size: 14px; }
  .bottom { bottom: 12px; gap: 8px; }
  .vr-btn .lbl { display: none; }
  .vr-btn { padding: 0 14px; }
  .bar button .lbl { display: none; }
}

/* ---------- home page ---------- */
.home-body { background: var(--bg); }
.home-body::before { content: ""; position: fixed; inset: 0; background: radial-gradient(120% 80% at 50% 0%, rgba(var(--tint-rgb),.55), transparent 60%), var(--bg); z-index: -2; }
.home-body::after { content: ""; position: fixed; bottom: -40px; inset-inline-end: -40px; width: clamp(200px, 30vw, 380px); aspect-ratio: 1; background: var(--pattern, none) center / cover; opacity: .07; z-index: -1; pointer-events: none; }
.home { min-height: 100%; display: flex; flex-direction: column; align-items: center; padding: clamp(36px, 7vh, 72px) 16px 32px; }
.home header { text-align: center; max-width: 620px; display: flex; flex-direction: column; align-items: center; }
.home .logo { width: clamp(130px, 20vw, 180px); height: auto; margin-bottom: clamp(28px, 5vh, 44px); }
.home .eyebrow { display: inline-flex; align-items: center; gap: 12px; color: var(--strong); font-size: 13px; margin: 0 0 14px; }
.home .eyebrow::before, .home .eyebrow::after { content: ""; width: 26px; height: 1px; background: var(--strong); opacity: .6; }
.home h1 { margin: 0 0 12px; font-family: var(--font-head); font-size: clamp(32px, 5.4vw, 52px); font-weight: 900; color: var(--white); }
.home header p { margin: 0; color: var(--muted); line-height: 1.9; font-size: 15px; }
.cards { margin-top: clamp(28px, 5vh, 44px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; width: 100%; max-width: 900px; }
.card { position: relative; display: block; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 3.1; border: 1px solid var(--glass-line); transition: border-color .3s, transform .4s var(--ease); }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform .8s var(--ease); }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(var(--bg-rgb),.88) 0%, rgba(var(--bg-rgb),.25) 45%, rgba(var(--bg-rgb),0) 70%); }
.card:hover, .card:focus-visible { border-color: rgba(var(--accent-rgb),.5); transform: translateY(-2px); outline: none; }
.card:hover img { transform: scale(1.06); }
.card .meta { position: absolute; z-index: 1; inset: auto 14px 14px 14px; padding: 16px 18px; border-radius: 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.card h2 { margin: 0 0 4px; font-family: var(--font-body); font-size: 20px; font-weight: 700; color: var(--white); }
.card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.card .go { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--on-accent); background: var(--accent); }
.card .go svg { width: 18px; height: 18px; }
.card .badge { position: absolute; z-index: 1; top: 14px; inset-inline-start: 14px; padding: 5px 11px; border-radius: 999px; font-size: 12px; color: var(--accent); }
.howto { margin-top: 28px; max-width: 900px; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.howto div { border: 1px solid var(--glass-line); border-radius: 14px; padding: 14px 16px; color: var(--muted); font-size: 13.5px; line-height: 1.8; }
.howto b { display: block; color: var(--accent); margin-bottom: 2px; font-family: var(--font-body); font-weight: 600; font-size: 13.5px; }
.home footer { margin-top: auto; padding-top: 36px; color: rgba(var(--text-rgb),.4); font-size: 12px; font-family: var(--font-latin); letter-spacing: .08em; }
