/* GUARD GRC product tour — brand-matched to the app (src/app.css tokens).
   Self-contained: self-hosted Lato, zero third-party requests. */

@font-face { font-family: 'Lato'; font-weight: 400; font-display: swap; src: url('fonts/Lato-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Lato'; font-weight: 700; font-display: swap; src: url('fonts/Lato-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Lato'; font-weight: 900; font-display: swap; src: url('fonts/Lato-Black.ttf') format('truetype'); }

:root {
  --bg: #181510;
  --bg-deep: #0f0d09;
  --surface: #1f1c15;
  --gold: #cbb682;
  --gold-dim: rgba(203, 182, 130, 0.35);
  --text: #e8e0d0;
  --text-2: #9d9a8f;
  --text-3: #6b6560;
  --hairline: rgba(203, 182, 130, 0.18);
  --bar-h: 52px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  font-family: 'Lato', -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  overflow: hidden;
}

#app { display: flex; flex-direction: column; height: 100dvh; }

/* ── Bars ─────────────────────────────────────────────────────────────── */
.bar {
  height: var(--bar-h);
  flex: 0 0 var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  background: var(--bg);
  z-index: 30;
}
.bar--top { border-bottom: 1px solid var(--hairline); }
.bar--bottom { border-top: 1px solid var(--hairline); }
.bar__right { display: flex; align-items: center; gap: 14px; }
.bar__center { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }

.brand { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.brand__mark { width: 21px; height: 21px; color: var(--gold); flex: 0 0 auto; }
.brand__name { font-weight: 900; letter-spacing: 0.02em; font-size: 15px; }
.brand__tm { font-size: 8px; vertical-align: super; }
.brand__divider { width: 1px; height: 18px; background: var(--hairline); }
.brand__label { color: var(--text-2); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }

.step-counter { color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter 120ms ease, background 120ms ease, opacity 120ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn--gold { background: var(--gold); color: #221d12; }
.btn--gold:hover { filter: brightness(1.08); }
.btn--outline { background: transparent; color: var(--gold); border-color: var(--gold-dim); }
.btn--outline:hover { border-color: var(--gold); }
.btn--ghost { background: transparent; color: var(--text-2); }
.btn--ghost:hover { color: var(--text); }
.btn--ghost[disabled] { opacity: 0.3; cursor: default; }
.btn--ghost[disabled]:hover { color: var(--text-2); }
.btn--lg { font-size: 15px; padding: 12px 22px; }
.quiet-link {
  background: none; border: none; color: var(--text-3); font: inherit; font-size: 13px;
  cursor: pointer; margin-top: 26px;
}
.quiet-link:hover { color: var(--text-2); }

/* ── Stage & frame ────────────────────────────────────────────────────── */
.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.frame {
  position: relative;
  aspect-ratio: 16 / 10;
  max-width: 100%;
  max-height: 100%;
  /* JS sets explicit px so % overlays track the image exactly */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  background: var(--bg);
  outline: 1px solid var(--hairline);
}
.frame__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  -webkit-user-select: none;
}
.frame__img.is-swapping { opacity: 0; }
.frame__img { transition: opacity 160ms ease; }

/* ── Highlight ring ───────────────────────────────────────────────────── */
.highlight {
  position: absolute;
  border: 2px solid var(--gold);
  border-radius: 10px;
  /* Clickable (advances the tour — the first-beat hint promises this).
     Sits BELOW .hotspots so an explicit hotspot wins where they overlap. */
  cursor: pointer;
  animation: pulse 2.2s ease-in-out infinite;
  z-index: 10;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(203, 182, 130, 0.35), inset 0 0 24px rgba(203, 182, 130, 0.06); }
  50% { box-shadow: 0 0 0 9px rgba(203, 182, 130, 0), inset 0 0 24px rgba(203, 182, 130, 0.12); }
}

/* ── Hotspots ─────────────────────────────────────────────────────────── */
/* Container passes clicks through (else it would eat highlight clicks);
   only the hotspot buttons themselves are interactive. */
.hotspots { position: absolute; inset: 0; z-index: 15; pointer-events: none; }
.hotspot {
  position: absolute;
  cursor: pointer;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  padding: 0;
  pointer-events: auto;
  transition: border-color 120ms ease, background 120ms ease;
}
/* ?debug — visualise hotspot placement (capture runbook aid) */
.debug .hotspot { border-color: rgba(120, 200, 255, 0.8); background: rgba(120, 200, 255, 0.12); }
.hotspot:hover {
  border-color: var(--gold-dim);
  background: rgba(203, 182, 130, 0.07);
}

/* ── Caption card ─────────────────────────────────────────────────────── */
.caption {
  /* Cream card (app parchment idiom) — must POP against the dark screens */
  position: absolute;
  z-index: 20;
  width: min(390px, 44%);
  background: #f4f0e5; /* --color-linen */
  border: 1px solid rgba(155, 122, 74, 0.35); /* bronze hairline */
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 15px 17px 13px;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.65);
}
.caption__title { font-size: 15.5px; font-weight: 900; letter-spacing: 0.01em; margin-bottom: 6px; color: #221d12; }
.caption__text { font-size: 13.5px; line-height: 1.5; color: #4b4438; }
.caption__text strong { color: #221d12; font-weight: 700; }
.caption__hint { margin-top: 9px; font-size: 11.5px; color: #857c6a; }
.caption__hint kbd {
  font: inherit; border: 1px solid rgba(155, 122, 74, 0.4); border-radius: 4px; padding: 0 5px; color: #4b4438;
}

/* ── Progress dots ────────────────────────────────────────────────────── */
.dots { display: flex; gap: 7px; align-items: center; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  border: 1px solid var(--text-3);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.dot:hover { border-color: var(--gold); }
.dot.is-active { background: var(--gold); border-color: var(--gold); transform: scale(1.25); }
.dot.is-done { background: var(--gold-dim); border-color: transparent; }
.fictional-note { font-size: 10.5px; color: var(--text-3); letter-spacing: 0.02em; white-space: nowrap; }

/* ── Close screen ─────────────────────────────────────────────────────── */
.close-screen {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(1100px 520px at 50% -10%, rgba(203, 182, 130, 0.10), transparent 60%),
    var(--bg);
}
.close-screen__inner { max-width: 620px; padding: 32px; display: flex; flex-direction: column; align-items: center; }
.close-screen__mark { width: 46px; height: 46px; color: var(--gold); margin-bottom: 26px; }
.close-screen h2 { font-size: clamp(21px, 3.2vw, 30px); font-weight: 900; line-height: 1.25; margin-bottom: 16px; }
.close-screen p { color: var(--text-2); font-size: 14.5px; line-height: 1.6; max-width: 54ch; }
.close-screen__actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 30px; }
.close-screen__verify { margin-top: 18px; font-size: 13px; }
.close-screen__verify a { color: var(--gold); text-decoration: none; }
.close-screen__verify a:hover { text-decoration: underline; }

/* ── Booking modal ────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 8, 5, 0.72);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal__card {
  position: relative;
  width: min(980px, 96vw);
  height: min(720px, 88vh);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 44px 10px 30px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
.modal__card iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; background: var(--bg); }
.modal__close {
  position: absolute; top: 8px; right: 12px;
  background: none; border: none; color: var(--text-2);
  font-size: 26px; line-height: 1; cursor: pointer;
}
.modal__close:hover { color: var(--text); }
.modal__fallback { position: absolute; bottom: 7px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--text-3); }
.modal__fallback a { color: var(--text-2); }

/* ── Small screens ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .brand__label, .brand__divider { display: none; }
  .step-counter { display: none; }
  .stage { padding: 8px; }
  .caption {
    /* Dock to the viewport bottom (portrait letterboxing leaves the space
       under the frame empty) so the card never covers the small screen image */
    position: fixed;
    left: 10px !important;
    right: 10px;
    top: auto !important;
    bottom: calc(var(--bar-h) + 10px);
    width: auto;
    z-index: 40;
  }
  .caption__hint { display: none; }
  .fictional-note { display: none; }
  .bar { padding: 0 10px; }
  .btn { font-size: 12.5px; padding: 7px 12px; }
}
