/* Evo Virtual Tour — V1 prototype (demo mode) */

:root {
  --ink: #131313;
  --paper: #f4f1ec;
  --paper-dim: rgba(244, 241, 236, 0.88);
  --tan: #c98e57;
  --sage: #9db4a0;
  --scrim: rgba(10, 10, 11, 0.55);
  --panel: rgba(16, 16, 17, 0.82);
  --hairline: rgba(244, 241, 236, 0.42);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: "Avenir Next", "Helvetica Neue", -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

.eyebrow {
  font-size: 12.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--tan);
  font-weight: 600;
}

/* ---------- hero layers ---------- */

#stage { position: fixed; inset: 0; }

.hero-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1100ms var(--ease);
  will-change: opacity, transform;
}
.hero-layer.visible { opacity: 1; }

.kb-in-right { animation: kbInRight 26s linear forwards; }
.kb-in-left  { animation: kbInLeft 26s linear forwards; }
@keyframes kbInRight {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.11) translate3d(-1.6%, -0.8%, 0); }
}
@keyframes kbInLeft {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.11) translate3d(1.6%, -1.0%, 0); }
}

/* Sweep transition, in two moves:
   1. PAN LEFT through the path stops (sweep:true) — like turning your head left
      toward the window. Turning the head left sweeps the scene to the RIGHT, so
      content translates from left to right (linear = constant angular speed).
   2. DOLLY FORWARD into the destination room — a zoom-in push, "move forward
      into" the next stop, eased so it decelerates as it arrives.
   Scale 1.2 gives 10% overscan each side so the 9% pan never exposes an edge. */
.hero-layer.pan-left, .hero-layer.pan-right, .hero-layer.dolly-fwd { transition: opacity 300ms var(--ease); }
.hero-layer.pan-left  { animation: panLeft  1100ms linear forwards; }
.hero-layer.pan-right { animation: panRight 1100ms linear forwards; }
@keyframes panLeft  {
  from { transform: scale(1.2) translate3d(-9%, 0, 0); }
  to   { transform: scale(1.2) translate3d(9%, 0, 0); }
}
@keyframes panRight {
  from { transform: scale(1.2) translate3d(9%, 0, 0); }
  to   { transform: scale(1.2) translate3d(-9%, 0, 0); }
}
.hero-layer.dolly-fwd { animation: dollyFwd 1500ms var(--ease) forwards; }
@keyframes dollyFwd {
  from { transform: scale(1.03); }
  to   { transform: scale(1.17); }
}

/* Scrim lives INSIDE each hero layer (below the markers, above the photo) so
   markers are never dimmed by it. It cannot be #stage::after: the Ken Burns
   transform makes each layer its own stacking context, which would paint the
   gradient over the markers. */
.hero-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(to top, rgba(8,8,9,0.86) 0%, rgba(8,8,9,0.5) 24%, rgba(8,8,9,0) 46%),
    linear-gradient(to bottom, rgba(8,8,9,0.62) 0%, rgba(8,8,9,0) 22%);
  pointer-events: none;
}

/* ---------- chrome ---------- */

header.chrome {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 30px;
  z-index: 40;
  /* Display-only (logo + byline, nothing interactive), but it spans the full
     width at z-index 40, so it was swallowing clicks on any hotspot near the top
     of the frame. Same fix already applied to #stopinfo: let clicks pass through
     so markers can be pinned anywhere in the photo. */
  pointer-events: none;
}
.wordmark { display: flex; align-items: center; gap: 14px; }
.wordmark .logo { height: 34px; width: auto; opacity: 0.96; }
.wordmark .byline { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--paper-dim); padding-top: 4px; }

/* ---------- mini-map ---------- */

#minimap {
  position: fixed;
  top: 76px; left: 30px;
  width: 300px;
  z-index: 30;
  background: rgba(244, 241, 236, 0.94);
  border: 1px solid rgba(19, 19, 19, 0.15);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms var(--ease) 400ms;
}
body.touring #minimap { opacity: 1; pointer-events: auto; }
body.map-hidden #minimap { opacity: 0; pointer-events: none; }
#minimap .plan-wrap { position: relative; }
#minimap img { display: block; width: 100%; height: auto; }
#minimap .route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#minimap .route polyline {
  fill: none;
  stroke: var(--tan);
  stroke-width: 2.5;
  stroke-dasharray: 4 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.75;
  vector-effect: non-scaling-stroke;
}
#minimap .here {
  position: absolute;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--tan);
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 0 rgba(201, 142, 87, 0.65);
  animation: herePulse 2.2s infinite;
  transform: translate(-50%, -50%);
  transition: left 900ms var(--ease), top 900ms var(--ease);
}
@keyframes herePulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 142, 87, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(201, 142, 87, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 142, 87, 0); }
}
@media (max-width: 820px) { #minimap { display: none; } }
.draft-tag {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244,241,236,0.92);
  background: rgba(12,12,13,0.6);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 7px 13px;
}

/* ---------- intro ---------- */

#intro {
  position: fixed; inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  z-index: 50;
  background: radial-gradient(ellipse at center, rgba(8,8,9,0.64) 0%, rgba(8,8,9,0.84) 100%);
  backdrop-filter: blur(2px);
  transition: opacity 900ms var(--ease), visibility 900ms;
}
/* tour chrome stays hidden until the tour starts */
#nav, #dots, #notes-toggle, #stopinfo { opacity: 0; pointer-events: none; }
body.touring #nav, body.touring #dots, body.touring #notes-toggle {
  opacity: 1; pointer-events: auto; transition: opacity 600ms var(--ease) 400ms;
}
/* stopinfo is display-only text; let clicks pass through to markers beneath it */
body.touring #stopinfo { pointer-events: none; }
#intro.hidden { opacity: 0; visibility: hidden; }
.intro-card { max-width: 640px; padding: 0 32px; }
.intro-card h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.06;
  margin: 18px 0 14px;
}
.intro-card h1 em { font-style: italic; font-weight: 400; }
.intro-card p { color: var(--paper); font-size: 17.5px; line-height: 1.5; font-weight: 400; max-width: 44ch; margin: 0 auto; }
#begin {
  margin-top: 36px;
  padding: 15px 44px;
  border: 1px solid var(--paper);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  transition: background 300ms var(--ease), color 300ms var(--ease);
}
#begin:hover { background: var(--paper); color: var(--ink); }
.intro-foot {
  position: absolute;
  bottom: 26px; left: 0; right: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244,241,236,0.78);
}

/* ---------- stop info ---------- */

#stopinfo {
  position: fixed;
  left: 30px; bottom: 74px;
  max-width: 560px;
  z-index: 30;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms var(--ease) 250ms, transform 700ms var(--ease) 250ms;
}
#stopinfo.visible { opacity: 1; transform: none; }
#stopinfo h2 {
  font-size: clamp(32px, 4.2vw, 48px);
  font-weight: 300;
  line-height: 1.08;
  margin: 10px 0 10px;
  text-shadow: 0 1px 16px rgba(0,0,0,0.5);
}
#stopinfo .line { color: var(--paper); font-weight: 400; font-size: 19px; line-height: 1.4; text-shadow: 0 1px 14px rgba(0,0,0,0.6); }

/* ---------- nav ---------- */

#nav {
  position: fixed;
  right: 30px; bottom: 66px;
  display: flex;
  align-items: center;
  gap: 18px;
  z-index: 30;
}
.navbtn {
  width: 56px; height: 56px;
  border: 1.5px solid rgba(244,241,236,0.6);
  border-radius: 999px;
  display: grid; place-items: center;
  font-size: 21px;
  backdrop-filter: blur(6px);
  background: rgba(12,12,13,0.72);
  transition: background 250ms var(--ease), border-color 250ms var(--ease);
}
.navbtn:hover { background: rgba(244,241,236,0.14); border-color: var(--paper); }
.navbtn:disabled { opacity: 0.3; cursor: default; }
.navbtn:disabled:hover { background: rgba(12,12,13,0.68); border-color: var(--hairline); }

#dots { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 9px; z-index: 30; }
#dots button {
  width: 32px; height: 26px;
  padding: 10px 0;
  box-sizing: border-box;
  border-radius: 3px;
  background: rgba(244,241,236,0.6);
  background-clip: content-box;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.55));
  transition: background 300ms, padding 300ms;
}
#dots button:hover { background: rgba(244,241,236,0.92); }
#dots button.active { padding: 7px 0; background-color: var(--tan); }

#notes-toggle {
  position: fixed;
  right: 30px; top: 78px;
  z-index: 30;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 12px 20px;
  backdrop-filter: blur(6px);
  background: rgba(12,12,13,0.68);
  transition: background 250ms var(--ease);
}
#notes-toggle:hover, #notes-toggle.on { background: rgba(244,241,236,0.16); }

/* ---------- presenter notes ---------- */

#notes {
  position: fixed;
  top: 128px; right: 30px;
  width: 330px;
  z-index: 30;
  background: rgba(16, 16, 17, 0.93);
  backdrop-filter: blur(14px);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 22px 22px 18px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 350ms var(--ease), transform 350ms var(--ease);
  /* A long note set used to run off the bottom of the screen. Cap the panel to
     the space between its top edge (128px) and the nav, and scroll inside it. */
  max-height: calc(100vh - 128px - 108px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(244,241,236,0.28) transparent;
}
#notes::-webkit-scrollbar { width: 8px; }
#notes::-webkit-scrollbar-track { background: transparent; }
#notes::-webkit-scrollbar-thumb {
  background: rgba(244,241,236,0.28);
  border-radius: 999px;
}
#notes::-webkit-scrollbar-thumb:hover { background: rgba(244,241,236,0.45); }
#notes.open { opacity: 1; transform: none; pointer-events: auto; }
#notes h3 {
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--sage); margin-bottom: 12px; font-weight: 600;
}
#notes p { font-size: 15.5px; font-weight: 400; line-height: 1.6; color: rgba(244,241,236,0.96); margin-bottom: 11px; }
#notes p::before { content: "—"; color: var(--tan); margin-right: 8px; }

/* ---------- hotspots ---------- */

.hotspot {
  position: absolute;
  /* Anchor on the DOT, not the dot+tag group: the dot is the first child (24px,
     so its center is 12px from the left edge). translate(-12px,-50%) puts the
     dot center on the point, so the marker sits on the spot and drags under the
     cursor while the tag extends to the right. */
  transform: translate(-12px, -50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hotspot .dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--tan);
  border: 3px solid #fff;
  background-clip: padding-box;
  box-shadow: 0 0 0 0 rgba(201,142,87,0.85), 0 2px 12px rgba(0,0,0,0.65);
  animation: pulse 2s infinite;
  transition: transform 250ms var(--ease);
  cursor: pointer;
}
.hotspot:hover .dot { transform: scale(1.28); animation-play-state: paused; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(201,142,87,0.85), 0 2px 12px rgba(0,0,0,0.65); }
  70% { box-shadow: 0 0 0 20px rgba(201,142,87,0), 0 2px 12px rgba(0,0,0,0.65); }
  100% { box-shadow: 0 0 0 0 rgba(201,142,87,0), 0 2px 12px rgba(0,0,0,0.65); }
}
.hotspot .tag {
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(12,12,13,0.78);
  backdrop-filter: blur(6px);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 7px 13px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 250ms var(--ease), transform 250ms var(--ease);
  white-space: nowrap;
}
.hotspot:hover .tag { opacity: 1; transform: none; }

/* Right-edge markers: put the dot on the right and open the tag leftward, so a
   long label near the frame edge stays on screen. The anchor math mirrors the
   default: the dot is now the LAST child, so shift by (-100% + 12px) to keep
   the dot's center on the point. */
.hotspot.flip { flex-direction: row-reverse; transform: translate(calc(-100% + 12px), -50%); }
.hotspot.flip .tag { transform: translateX(6px); }
.hotspot.flip:hover .tag, .hotspot.flip:focus-visible .tag { transform: none; }

/* ---------- hotspot overlay ---------- */

#overlay {
  position: fixed; inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: var(--scrim);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 400ms var(--ease), visibility 400ms;
}
#overlay.open { opacity: 1; visibility: visible; }
.card {
  display: flex;
  gap: 0;
  max-width: min(880px, calc(100vw - 80px));
  max-height: calc(100vh - 120px);
  background: #161617;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  overflow: hidden;
  transform: translateY(16px) scale(0.985);
  transition: transform 450ms var(--ease);
}
#overlay.open .card { transform: none; }
.card .media { flex: 0 0 340px; background: #0d0d0e; display: grid; place-items: center; }
.card .media img, .card .media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.card.no-media .media { display: none; }
/* a hotspot showing two images: stack them in the media column */
.card.multi-media .media { display: flex; flex-direction: column; gap: 3px; }
.card.multi-media .media img, .card.multi-media .media video { height: 50%; flex: 1 1 0; }

/* ---- EVO branded end card --------------------------------------------- */
#endcard {
  position: fixed; inset: 0; z-index: 45; display: none;
  background: #ffffff; color: #333e48;
  align-items: center; justify-content: center; padding: 6vw;
}
#endcard[aria-hidden="false"] { display: flex; }
#endcard .ec-accent { position: absolute; top: 0; left: 0; right: 0; height: 6px; background: #c98e57; }
#endcard .ec-inner { display: flex; align-items: center; gap: 6vw; max-width: 1080px; width: 100%; }
#endcard .ec-naut {
  width: min(44%, 460px); aspect-ratio: 4 / 3; height: auto; object-fit: cover;
  display: block; flex: 0 0 auto; border-radius: 10px; box-shadow: 0 24px 60px rgba(43,51,60,0.22);
}
#endcard .ec-copy { flex: 1 1 auto; }
#endcard .ec-logo { width: 184px; height: auto; display: block; margin: 0 0 26px; }
#endcard .ec-eyebrow {
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 12px; font-weight: 700;
  color: #c98e57; margin-bottom: 14px;
}
#endcard .ec-head {
  font-family: var(--sans, system-ui, sans-serif);
  font-size: clamp(28px, 3.6vw, 44px); font-weight: 300; line-height: 1.1;
  letter-spacing: -0.01em; margin: 0 0 18px; color: #2b333c;
}
#endcard .ec-sub { font-size: 17px; line-height: 1.55; color: #55606b; max-width: 46ch; margin: 0 0 30px; }
#endcard .ec-cta {
  display: inline-flex; align-items: center; gap: 9px; background: #333e48; color: #fff;
  text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: 0.02em;
  padding: 15px 30px; border-radius: 999px; transition: background 0.2s, transform 0.2s;
}
#endcard .ec-cta::after { content: "\2192"; }
#endcard .ec-cta:hover { background: #c98e57; transform: translateY(-1px); }
@media (max-width: 820px) {
  #endcard .ec-inner { flex-direction: column; gap: 24px; text-align: center; }
  #endcard .ec-naut { width: min(78%, 360px); }
  #endcard .ec-logo, #endcard .ec-sub { margin-left: auto; margin-right: auto; }
}
/* on the end card, hide EVO chrome and lift nav/dots above the white panel */
body.endcard-active .chrome, body.endcard-active #minimap, body.endcard-active #stopinfo,
body.endcard-active #notes-toggle, body.endcard-active #notes { opacity: 0 !important; pointer-events: none !important; }
/* Transition slides carry no rep notes, so the Notes button has nothing to open.
   Hide the button and the panel there, same treatment the end card gets.
   body.touring puts a 600ms fade with a 400ms delay on #notes-toggle, which would
   leave the button lingering for about a second into a transition, so the timing
   is overridden here to clear it promptly. */
body.transition-active #notes-toggle,
body.transition-active #notes {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 220ms var(--ease) !important;
}
body.endcard-active #nav, body.endcard-active #dots { z-index: 55; }
body.endcard-active .navbtn { border-color: rgba(51,62,72,0.35); color: #333e48; background: rgba(255,255,255,0.7); }
body.endcard-active #dots button { background-color: rgba(51,62,72,0.25); }
body.endcard-active #dots button.active { background-color: #c98e57; }
.card .copy { padding: 40px 42px; align-self: center; max-width: 460px; }
.card .copy h3 { font-size: 28px; font-weight: 300; margin: 12px 0 12px; }
.card .copy p { font-size: 16.5px; font-weight: 400; line-height: 1.62; color: rgba(244,241,236,0.95); }
.card .copy .caption { margin-top: 14px; font-size: 13.5px; color: rgba(244,241,236,0.8); font-style: italic; }
#overlay-close {
  position: absolute;
  top: 26px; right: 30px;
  width: 48px; height: 48px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 16px;
  display: grid; place-items: center;
  background: rgba(12,12,13,0.4);
}
#overlay-close:hover { background: rgba(244,241,236,0.14); }

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .card { flex-direction: column; max-width: calc(100vw - 40px); }
  .card .media { flex: 0 0 240px; }
  #notes { width: calc(100vw - 60px); }
  #stopinfo { left: 22px; right: 22px; bottom: 108px; }
  #nav { right: 22px; bottom: 30px; }
  #dots { display: none; }
}


/* ---------- accessibility ---------- */

:focus-visible {
  outline: 3px solid #e8b47f;
  outline-offset: 3px;
}
.hotspot:focus-visible .tag { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .kb-in-right, .kb-in-left { animation: none; transform: scale(1.04); }
  .hotspot .dot, #minimap .here { animation: none; }
  .hero-layer { transition-duration: 200ms; }
  #stopinfo, #notes, #overlay, .card, #minimap .here { transition-duration: 1ms; }
}
