/* ============================================================
   Harsight Technologies — Platform Demo Shell
   Brand: Forest #0F2E2E · Ink #152929 · Cream #F5F0E6 ·
          Card #FBF8F1 · Signal Orange #E56B4C (one moment) ·
          Gold #D18C47
   Type:  Montserrat 700/800 · Inter · JetBrains Mono
   ============================================================ */

:root {
  --forest: #0F2E2E;
  --ink: #152929;
  --cream: #F5F0E6;
  --card: #FBF8F1;
  --orange: #E56B4C;
  --gold: #D18C47;
  --cream-60: rgba(245, 240, 230, 0.6);
  --cream-80: rgba(245, 240, 230, 0.8);
  --ink-shadow: rgba(10, 24, 24, 0.55);
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--forest);
  color: var(--cream);
  font-family: "Inter", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }

/* ---------- Background ---------- */

.bg-stage { position: fixed; inset: 0; z-index: 0; }

.bg-plate {
  position: absolute; inset: -2%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  will-change: opacity, transform;
  transition: filter 0.9s ease;
}

/* When a deck is playing, the backdrop steps back so the tiles own the screen */
.bg-stage.focused .bg-plate { filter: blur(7px) brightness(0.8) saturate(0.85); }

.bg-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 46, 46, 0.88) 0%, rgba(15, 46, 46, 0.55) 34%, rgba(15, 46, 46, 0.18) 60%, rgba(15, 46, 46, 0.34) 100%),
    linear-gradient(0deg, rgba(15, 46, 46, 0.82) 0%, rgba(15, 46, 46, 0.12) 30%, rgba(15, 46, 46, 0.28) 100%);
}

/* ---------- Top bar ---------- */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px 0;
}

.brand {
  text-align: right;
  flex: 0 0 auto;
  margin-left: 26px;
  padding-left: 26px;
  border-left: 1px solid rgba(245, 240, 230, 0.18);
}
.brand img { height: 30px; display: block; margin-left: auto; }
.brand-line {
  margin-top: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: rgba(245, 240, 230, 0.6);
  white-space: nowrap;
}

.deck-tiles { display: flex; gap: 14px; margin-left: auto; }

.deck-tile {
  width: 212px;
  padding: 11px 13px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 11px;
  background: rgba(251, 248, 241, 0.06);
  border: 1px solid rgba(245, 240, 230, 0.22);
  border-radius: 11px;
  color: var(--cream);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  transition: background 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

/* unified master-tile signature: a gold hairline that ignites on hover/active */
.deck-tile::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(209, 140, 71, 0), rgba(209, 140, 71, 0.9), rgba(209, 140, 71, 0));
  opacity: 0;
  transition: opacity 0.35s ease;
}
.deck-tile:hover::after, .deck-tile.active::after { opacity: 1; }

.tile-icon {
  flex: 0 0 36px;
  width: 36px; height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #E3B076;
  background: rgba(209, 140, 71, 0.13);
  border: 1px solid rgba(209, 140, 71, 0.35);
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.tile-icon svg { width: 19px; height: 19px; display: block; }

.deck-tile.active .tile-icon {
  color: #B8722F;
  background: rgba(15, 46, 46, 0.07);
  border-color: rgba(15, 46, 46, 0.22);
}

.tile-text { min-width: 0; }

.deck-tile:hover {
  background: rgba(251, 248, 241, 0.13);
  border-color: rgba(245, 240, 230, 0.45);
  transform: translateY(-2px);
}

.deck-tile.active {
  background: var(--card);
  color: var(--ink);
  border-color: var(--card);
}

.deck-tile.active .tile-kicker { color: var(--gold); }

.tile-kicker {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: #E3B076;
  margin-bottom: 5px;
  white-space: nowrap;
}

.tile-name {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.25;
}

/* ---------- Password gate ---------- */

.pw-gate {
  position: fixed; inset: 0;
  z-index: 400;
  background: var(--forest, #0F2E2E);
  display: flex; align-items: center; justify-content: center;
}
.pw-gate[hidden] { display: none; }
.pw-card {
  width: min(420px, 88vw);
  background: var(--card, #FBF8F1);
  border-radius: 18px;
  padding: 44px 40px 40px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  text-align: center;
}
.pw-card img { height: 34px; margin-bottom: 26px; }
.pw-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.22em;
  color: var(--gold, #D18C47);
  margin-bottom: 10px;
}
.pw-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 800; font-size: 24px;
  color: var(--ink, #152929);
  margin-bottom: 22px;
}
.pw-input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(21, 41, 41, 0.25);
  border-radius: 10px;
  font: 500 15px "Inter", sans-serif;
  color: var(--ink, #152929);
  background: #fff;
  margin-bottom: 14px;
  outline: none;
}
.pw-input:focus { border-color: var(--ink, #152929); }
.pw-btn {
  width: 100%;
  padding: 13px 16px;
  border: none; border-radius: 10px;
  background: var(--orange, #E56B4C);
  color: var(--ink, #152929);
  font: 700 15px "Montserrat", sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.pw-btn:hover { filter: brightness(1.05); }
.pw-err {
  min-height: 18px;
  margin-top: 12px;
  font: 500 13px "Inter", sans-serif;
  color: #A3352C;
}

/* ---------- Idle hero ---------- */

.idle-hero {
  position: fixed;
  left: 64px;
  top: 19vh;
  z-index: 20;
  max-width: 560px;
}

.idle-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 18px;
}

.idle-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: clamp(46px, 5.4vw, 76px);
  line-height: 1.02;
  text-shadow: 0 4px 30px var(--ink-shadow);
}

.idle-sub {
  margin-top: 22px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--cream-80);
  max-width: 460px;
  text-shadow: 0 2px 14px var(--ink-shadow);
}

/* ---------- Details column ---------- */

.details {
  position: fixed;
  left: 64px;
  top: 21vh;
  z-index: 20;
  width: 30vw;
  max-width: 470px;
  opacity: 0;
  pointer-events: none;
}

.d-eyebrow-box { height: 26px; overflow: hidden; }

.d-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--gold);
  position: relative;
  padding-left: 42px;
}

.d-eyebrow::before {
  content: "";
  position: absolute;
  left: 0; top: 45%;
  width: 30px; height: 3px;
  border-radius: 99px;
  background: var(--gold);
}

.d-title-box { margin-top: 14px; overflow: hidden; padding-bottom: 6px; }

.d-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: clamp(34px, 3.4vw, 52px);
  line-height: 1.06;
  text-shadow: 0 4px 30px var(--ink-shadow);
}

.d-desc-box { margin-top: 16px; overflow: hidden; }

.d-desc {
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--cream-80);
  max-width: 430px;
  text-shadow: 0 2px 14px var(--ink-shadow);
}

.d-count {
  margin-top: 26px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--cream-60);
}

/* ---------- Cards ---------- */

.card {
  position: absolute;
  left: 0; top: 0;
  z-index: 30;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid rgba(245, 240, 230, 0.24);
  box-shadow: 0 18px 50px rgba(10, 24, 24, 0.5);
  cursor: pointer;
  will-change: transform, width, height;
}

.card .shot {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: top center;
}

.card .card-chrome {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 22px;
  background: var(--ink);
  display: flex;
  align-items: center;
  gap: 5px;
  padding-left: 10px;
}

.card .card-chrome i {
  width: 6px; height: 6px;
  border-radius: 99px;
  background: rgba(245, 240, 230, 0.35);
}

.card .shot { top: 22px; }

.card .card-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 12px 9px;
  background: linear-gradient(0deg, rgba(21, 41, 41, 0.92), rgba(21, 41, 41, 0));
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: var(--cream);
  letter-spacing: 0.02em;
}

.card.featured { cursor: pointer; }

.card .pause-hint {
  position: absolute;
  right: 12px; top: 34px;
  z-index: 5;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--cream);
  background: rgba(21, 41, 41, 0.78);
  border-radius: 6px;
  padding: 5px 9px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card.featured:hover .pause-hint { opacity: 1; }

/* ---------- Guide dock ---------- */

.guide-dock {
  position: fixed;
  left: 48px;
  bottom: 36px;
  z-index: 40;
  display: flex;
  gap: 14px;
  align-items: stretch;
  width: 368px;
  background: rgba(176, 137, 104, 0.97);
  color: var(--ink);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 18px 50px rgba(10, 24, 24, 0.45);
  transform: translateY(140%);
}

.guide-face {
  position: relative;
  background: #B08968;
  width: 152px;
  min-width: 152px;
  height: 152px;
  align-self: center;
  border-radius: 10px;
  background: var(--forest);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.guide-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guide-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: rgba(15, 46, 46, 0.38);
  color: var(--cream);
  transition: background 0.2s ease;
}

.guide-play svg { width: 30px; height: 30px; filter: drop-shadow(0 2px 6px rgba(10, 24, 24, 0.5)); }
.guide-play:hover { background: rgba(15, 46, 46, 0.22); }
.guide-play.hidden { display: none; }

.guide-wave {
  position: absolute;
  bottom: 9px;
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 14px;
}

.guide-wave span {
  width: 3px;
  border-radius: 99px;
  background: var(--gold);
  height: 4px;
  animation: wave 1.1s ease-in-out infinite;
}

.guide-wave span:nth-child(2) { animation-delay: 0.15s; }
.guide-wave span:nth-child(3) { animation-delay: 0.3s; }
.guide-wave span:nth-child(4) { animation-delay: 0.45s; }
.guide-wave span:nth-child(5) { animation-delay: 0.6s; }

.guide-dock.paused .guide-wave span { animation-play-state: paused; }

@keyframes wave {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

.guide-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--ink);
  opacity: 0.75;
  margin-bottom: 6px;
}

.guide-caption {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  min-height: 60px;
}

/* ---------- Controls ---------- */

.guide-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.guide-caption { flex: 1; }

/* compact transport row at the base of the guide dock */
.controls {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}

.ctl {
  width: 26px; height: 26px;
  min-width: 26px;
  border-radius: 99px;
  border: 1.5px solid rgba(21, 41, 41, 0.35);
  background: rgba(15, 46, 46, 0.5);
  color: var(--cream);
  display: grid;
  place-items: center;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.ctl:hover { border-color: var(--ink); background: rgba(15, 46, 46, 0.75); }

.ctl svg { width: 11px; height: 11px; stroke-width: 2; }

.progress-track {
  flex: 1;
  min-width: 24px;
  height: 3px;
  border-radius: 99px;
  background: rgba(21, 41, 41, 0.25);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 99px;
  background: var(--gold);
}

.slide-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink);
  opacity: 0.75;
  min-width: 34px;
  text-align: right;
}

/* ---------- Walkthrough tile (the one orange moment) ---------- */

.walkthrough-tile {
  position: fixed;
  right: 364px;
  bottom: 36px;
  z-index: 40;
  width: 300px;
  padding: 16px 18px 15px;
  border-radius: 14px;
  background: var(--orange);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 18px 50px rgba(10, 24, 24, 0.45);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.walkthrough-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 60px rgba(10, 24, 24, 0.55);
}

.wt-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  margin-bottom: 6px;
  color: rgba(21, 41, 41, 0.75);
}

.wt-name {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.3;
}

.wt-cta {
  margin-top: 9px;
  font-size: 12.5px;
  font-weight: 600;
}

.wt-arrow { display: inline-block; transition: transform 0.3s ease; }

.walkthrough-tile:hover .wt-arrow { transform: translateX(4px); }

.platform-tile {
  position: fixed;
  right: 48px;
  bottom: 36px;
  z-index: 40;
  width: 300px;
  padding: 16px 18px 15px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid rgba(15, 46, 46, 0.18);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 18px 50px rgba(10, 24, 24, 0.35);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.platform-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 60px rgba(10, 24, 24, 0.45);
}

.pt-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  margin-bottom: 6px;
  color: #d18c47;
}

.pt-name {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.3;
  color: var(--forest);
}

.pt-cta {
  margin-top: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--forest);
}

.pt-arrow { display: inline-block; transition: transform 0.3s ease; }

.platform-tile:hover .pt-arrow { transform: translateX(4px); }

/* ---------- Tour ---------- */

/* Finale intro card — slides in from the right, grows, plays the walkthrough intro */
.finale-intro-card {
  position: fixed;
  top: 0; left: 0;
  z-index: 96;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(245, 240, 230, 0.14);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.finale-intro-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.finale-skip {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 5;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(245, 240, 230, 0.35);
  background: rgba(15, 46, 46, 0.65);
  color: var(--cream, #F5F0E6);
  font: 600 12px/1 "Inter", sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.finale-skip:hover { background: rgba(15, 46, 46, 0.9); border-color: rgba(245, 240, 230, 0.6); }
.finale-intro-card.blocked { cursor: pointer; }
.finale-intro-card.blocked::after {
  content: "\25B6";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 54px; color: var(--cream, #F5F0E6);
  background: rgba(15, 46, 46, 0.35);
}

.tour { position: fixed; inset: 0; z-index: 90; }

.tour-scrim {
  position: absolute; inset: 0;
  background: rgba(15, 46, 46, 0.55);
  backdrop-filter: blur(2px);
}

/* the fixed container of the tour target is lifted above the scrim,
   and its non-target children are dimmed */
.tour-lift { z-index: 95 !important; }

.tour-dim { opacity: 0.3; filter: saturate(0.6); transition: opacity 0.3s ease; }

.tour-card {
  position: absolute;
  z-index: 96;
  width: 380px;
  background: var(--card);
  color: var(--ink);
  border-radius: 14px;
  padding: 20px 22px 16px;
  box-shadow: 0 24px 70px rgba(10, 24, 24, 0.6);
}

.tour-card::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  background: var(--card);
  transform: rotate(45deg);
}

.tour-card.point-up::after { top: -8px; left: var(--arrow-x, 40px); }
.tour-card.point-down::after { bottom: -8px; left: var(--arrow-x, 40px); }
.tour-card.point-none::after { display: none; }

.tour-step-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 8px;
}

.tour-text { font-size: 14.5px; line-height: 1.55; }

.tour-actions {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tour-skip {
  background: none;
  border: none;
  font-size: 12.5px;
  color: rgba(21, 41, 41, 0.55);
  text-decoration: underline;
}

.tour-dots { display: flex; gap: 6px; }

.tour-dots i {
  width: 6px; height: 6px;
  border-radius: 99px;
  background: rgba(21, 41, 41, 0.2);
}

.tour-dots i.on { background: var(--gold); }

.tour-next {
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 99px;
  padding: 9px 22px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.tour-next:hover { background: var(--forest); }

/* ---------- Small screens ---------- */

.small-screen {
  position: fixed; inset: 0;
  z-index: 200;
  background: var(--forest);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 40px;
  text-align: center;
}

.small-screen img { width: 220px; }

.small-screen p { color: var(--cream-80); font-size: 15px; line-height: 1.6; max-width: 320px; }

@media (max-width: 980px), (max-height: 560px) {
  .small-screen { display: flex; }
}

/* Five master tiles: keep the brand corner on screen at laptop widths */
@media (max-width: 1680px) {
  .deck-tile { width: 196px; }
}
@media (max-width: 1560px) {
  .deck-tile { width: 178px; padding: 10px 11px; gap: 9px; }
  .tile-kicker { letter-spacing: 0.1em; }
}
@media (max-width: 1460px) {
  .topbar { padding: 16px 28px 0; }
  .deck-tiles { gap: 10px; }
  .deck-tile { width: 168px; }
  .brand-line { display: none; }
  .brand { margin-left: 16px; padding-left: 16px; }
  .brand img { height: 26px; }
}
@media (max-width: 1460px) {
  .tile-kicker { font-size: 9px; letter-spacing: 0.06em; }
  .tile-name { font-size: 12.5px; }
  .tile-icon { display: none; }
  .deck-tile { width: 158px; }
}
