/* ==========================================================================
   Dow 360 tour: LIGHT THEME. Tokens match dow-2615-industrial-presentation.
   --gold        #8a6310  TEXT only (5.2:1 on #fbfaf8)
   --gold-bright #b8871f  FILLS only (3.1:1, fails as text, never use for type)
   ========================================================================== */
:root {
  --paper: #fbfaf8;
  --card: #ffffff;
  --raised: #f4f2ee;
  --ink-000: #161d29;
  --ink-100: #5a6472;
  --ink-200: #8a93a1;
  --hairline: rgba(22, 29, 41, 0.12);
  --hairline-strong: rgba(22, 29, 41, 0.22);
  --gold: #8a6310;
  --gold-bright: #b8871f;
  --gold-soft: rgba(184, 135, 31, 0.14);
  --band: #161d29;              /* dark footer band */
  --shadow-sm: 0 1px 2px rgba(22,29,41,.06), 0 2px 8px rgba(22,29,41,.04);
  --shadow-md: 0 2px 6px rgba(22,29,41,.08), 0 12px 28px rgba(22,29,41,.10);
  --sans: -apple-system, "Segoe UI", system-ui, sans-serif;
  --r: 14px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--paper); }
body {
  font-family: var(--sans);
  color: var(--ink-000);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .14em;
  font-size: 11px; font-weight: 650; color: var(--gold);
}

/* Unverified values: visible, gold italic, impossible to miss. */
.needs { color: var(--gold) !important; font-style: italic; background: var(--gold-soft); border-radius: 4px; padding: 0 4px; }
.needs-link { outline: 2px dashed var(--gold-bright); outline-offset: 2px; cursor: not-allowed; }

/* ---------- viewer ---------- */
#pano { position: fixed; inset: 0; background: #e9e6e0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.btn-gold { background: var(--gold-bright); color: #fff; border-color: var(--gold-bright); }
.btn-gold:hover { background: #a6781a; }
/* white on #b8871f is 3.1:1, so gold buttons use bold 14px+ (large-ish, UI control) */
.btn-gold:disabled { background: var(--raised); color: var(--ink-200); border-color: var(--hairline); cursor: progress; }
.btn-ghost { background: var(--card); color: var(--ink-000); border-color: var(--hairline-strong); }
.btn-ghost:hover { background: var(--raised); }

/* ---------- top bar ---------- */
#topbar {
  position: fixed; z-index: 20; left: 0; right: 0; top: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + var(--safe-t)) 16px 10px calc(16px + var(--safe-l));
  background: rgba(251, 250, 248, .92);
  backdrop-filter: saturate(1.2) blur(12px); -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { height: 34px; width: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-text strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#scene-name { font-size: 13px; color: var(--ink-100); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 8px; flex: none; }

/* ---------- control rail ---------- */
#controls {
  position: fixed; z-index: 20; left: calc(16px + var(--safe-l)); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 6px; padding: 6px;
  background: rgba(255,255,255,.94); border: 1px solid var(--hairline); border-radius: 999px;
  box-shadow: var(--shadow-md);
}
.ctl {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent;
  display: grid; place-items: center; color: var(--ink-000);
}
.ctl svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ctl:hover { background: var(--raised); }
.ctl[aria-pressed="true"], .ctl[aria-expanded="true"] { background: var(--gold-bright); color: #fff; }
.ctl:focus-visible, .btn:focus-visible, .scene-list button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- side panels ---------- */
.panel {
  position: fixed; z-index: 19; top: calc(72px + var(--safe-t)); left: calc(84px + var(--safe-l));
  max-height: calc(100% - 88px - var(--safe-t)); width: 340px; max-width: calc(100vw - 100px);
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r);
  box-shadow: var(--shadow-md); padding: 18px; overflow-y: auto;
  animation: panelIn .18s ease-out;
}
@keyframes panelIn { from { opacity: 0; transform: translateX(-6px); } }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-close {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--hairline);
  background: var(--card); font-size: 20px; line-height: 1; color: var(--ink-100);
}
.panel-close:hover { background: var(--raised); color: var(--ink-000); }
.panel h2 { font-size: 22px; line-height: 1.2; }

.scene-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.scene-list button {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; background: transparent;
  font-size: 14px; font-weight: 550;
}
.scene-list button:hover { background: var(--raised); }
.scene-list button.current { background: var(--gold-soft); border-color: rgba(184,135,31,.35); }
.scene-num { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--ink-200); font-weight: 650; }
.scene-list button.current .scene-num { color: var(--gold); }

.floorplan { position: relative; margin-bottom: 14px; border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; background: var(--paper); }
.floorplan img { display: block; width: 100%; height: auto; }
#floorplan-pins { position: absolute; inset: 0; }
.fp-pin {
  position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; padding: 0;
  border-radius: 50%; border: 2px solid #fff; background: var(--ink-100); box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.fp-pin.current { background: var(--gold-bright); width: 22px; height: 22px; margin: -11px 0 0 -11px; box-shadow: 0 0 0 6px var(--gold-soft), 0 1px 4px rgba(0,0,0,.35); }

.detail-address { color: var(--ink-100); font-size: 14px; margin: 6px 0 16px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--hairline); border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; }
.detail-cell { background: var(--card); padding: 12px; min-width: 0; }
.detail-cell dt { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-200); font-weight: 650; }
.detail-cell dd { margin: 0; font-size: 17px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.detail-cell:last-child:nth-child(odd) { grid-column: 1 / -1; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------- hotspots ---------- */
.hs-link {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 0; background: none; padding: 0; transform: translate(-50%, -50%);
}
.hs-ring {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.92); border: 3px solid var(--gold-bright);
  box-shadow: 0 2px 10px rgba(0,0,0,.35); transition: transform .15s ease;
}
.hs-ring svg { width: 24px; height: 24px; fill: none; stroke: var(--ink-000); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hs-link:hover .hs-ring, .hs-link:focus-visible .hs-ring { transform: scale(1.08); }
.hs-label {
  font-size: 12px; font-weight: 650; padding: 4px 10px; border-radius: 999px;
  background: rgba(22,29,41,.82); color: #fff; white-space: nowrap;
  opacity: 0; transform: translateY(-2px); transition: opacity .15s, transform .15s;
}
.hs-link:hover .hs-label, .hs-link:focus-visible .hs-label { opacity: 1; transform: none; }
body.touch .hs-label { opacity: 1; transform: none; }

.hs-info { position: relative; transform: translate(-50%, -50%); }
.hs-info-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff;
  background: var(--gold-bright); color: #fff; font-weight: 800; font-style: italic; font-family: Georgia, serif; font-size: 17px;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.hs-info-card {
  display: none; position: absolute; left: 46px; top: -6px; width: 240px;
  background: var(--card); border: 1px solid var(--hairline); border-radius: 12px; padding: 12px 14px;
  box-shadow: var(--shadow-md); font-size: 13px; color: var(--ink-100); line-height: 1.45;
}
.hs-info-card strong { display: block; color: var(--ink-000); font-size: 14px; margin-bottom: 4px; }
.hs-info.open .hs-info-card { display: block; }

/* ---------- splash ---------- */
#splash {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(1200px 600px at 50% 0%, #ffffff 0%, var(--paper) 60%, #f1eee8 100%);
  transition: opacity .4s ease;
}
#splash.out { opacity: 0; pointer-events: none; }
.splash-card { width: min(440px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.splash-mark { height: 64px; width: auto; margin-bottom: 6px; }
.splash-card h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.1; }
.splash-address { color: var(--ink-100); font-size: 15px; line-height: 1.45; }
.splash-tagline { color: var(--ink-000); font-size: 16px; margin-top: 2px; }
.splash-progress { width: 180px; height: 3px; border-radius: 3px; background: var(--hairline); overflow: hidden; margin: 14px 0 6px; }
#splash-bar { display: block; height: 100%; width: 10%; background: var(--gold-bright); transition: width .25s ease; }
#splash-enter { height: 48px; padding: 0 28px; font-size: 15px; }
.splash-hint { font-size: 13px; color: var(--ink-200); }
.splash-brokerage { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hairline); width: 100%; display: flex; justify-content: center; }

/* CB&A mark is a TALL stacked lockup (404x505). Size by height ~46px.
   Never cap it with a wide-mark height or "COMMERCIAL" drops to ~2px. */
.cba-mark { height: 46px; width: auto; }

/* ---------- contact sheet ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px;
  background: rgba(22,29,41,.42); animation: fade .15s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.sheet-card {
  position: relative; width: min(640px, 100%); max-height: calc(100% - 16px); overflow-y: auto;
  background: var(--card); border-radius: 18px; box-shadow: var(--shadow-md); padding: 24px 24px 0;
}
.sheet-card > .panel-close { position: absolute; top: 14px; right: 14px; }
.sheet-card h2 { font-size: 24px; margin: 4px 0 18px; }
/* Equal co-listing agents: identical cards, equal columns, no primary/secondary styling. */
.agent-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.agent-card {
  border: 1px solid var(--hairline); border-radius: 14px; padding: 18px; background: var(--paper);
  display: flex; flex-direction: column; gap: 2px;
}
.agent-avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 10px;
  background: var(--gold-soft); color: var(--gold); font-weight: 750; font-size: 15px; letter-spacing: .02em;
}
.agent-name { font-size: 18px; }
.agent-title { font-size: 13px; color: var(--ink-100); }
.agent-brokerage { font-size: 13px; color: var(--gold); font-weight: 650; margin-bottom: 10px; }
.agent-line { font-size: 14px; color: var(--ink-000); text-decoration: none; padding: 6px 0; border-top: 1px solid var(--hairline); }
.agent-email { font-size: 13.5px; }
.agent-line:hover { color: var(--gold); }
.sheet-foot {
  margin: 22px -24px 0; padding: 16px 24px calc(16px + var(--safe-b));
  background: var(--band); display: flex; align-items: center; justify-content: space-between; border-radius: 0 0 18px 18px;
}
.foot-dow { height: 36px; width: auto; }

/* ---------- fatal ---------- */
#fatal {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 32px; text-align: center;
  background: var(--paper); color: var(--ink-000); font-size: 15px; line-height: 1.5;
}

/* ---------- mobile ---------- */
@media (max-width: 720px) {
  #topbar { padding-left: 12px; padding-right: 12px; }
  .brand-mark { height: 28px; }
  #btn-brochure span { display: none; }
  #btn-brochure { padding: 0 11px; }
  #controls {
    top: auto; transform: none; left: 50%; translate: -50% 0;
    bottom: calc(14px + var(--safe-b)); flex-direction: row;
  }
  .panel {
    left: 8px; right: 8px; width: auto; max-width: none;
    top: auto; bottom: calc(82px + var(--safe-b)); max-height: 58vh;
    animation-name: sheetUp;
  }
  @keyframes sheetUp { from { opacity: 0; transform: translateY(8px); } }
  .sheet { place-items: end center; padding: 0; }
  .sheet-card { border-radius: 18px 18px 0 0; max-height: 88vh; }
  .sheet-foot { border-radius: 0; }
  .hs-ring { width: 48px; height: 48px; }
}
