/* ==========================================================================
   Product Tour (.pt) — dark showcase stage: pill tabs with a sliding
   highlight, a laptop mockup whose screen pans down each screenshot, a
   floating info card with a step ring, and a thumbnail filmstrip.
   The rules below are the dark look; the light-mode overrides are at the end
   of this file. The laptop and the lightbox stay dark in both themes.
   ========================================================================== */
.pt {
  --pt-ink: #eef2ff;
  --pt-muted: #9aa5c8;
  --pt-line: rgba(255, 255, 255, 0.1);
  --pt-glass: rgba(18, 24, 52, 0.72);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--pt-ink);
  background: linear-gradient(180deg, #070b1e 0%, #0b1130 55%, #080c22 100%);
}
.pt-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.pt-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 55%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 55%, #000 20%, transparent 75%);
}
.pt-orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.55; }
.pt-orb-a { width: 520px; height: 520px; top: 18%; left: -180px; background: rgba(47, 91, 255, 0.55); }
.pt-orb-b { width: 480px; height: 480px; top: 30%; right: -160px; background: rgba(139, 92, 246, 0.5); }
.pt-orb-c { width: 420px; height: 320px; bottom: -160px; left: 40%; background: rgba(255, 199, 0, 0.22); }

/* ---- Heading ---- */
.pt-head { text-align: center; max-width: 720px; margin: 0 auto clamp(1.5rem, 3vw, 2.25rem); }
.pt-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--pt-line);
  color: #c7d2fe;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pt-head h2 { margin: 0.9rem 0 0.6rem; color: #fff; }
.pt-head p { margin: 0; color: var(--pt-muted); font-size: var(--fs-lead); }
.pt-grad {
  background: linear-gradient(120deg, #7ea0ff, #c084fc, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Pill tabs with sliding highlight ---- */
.pt-tabs-wrap { display: flex; justify-content: center; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
/* Numbered tabs on a rail; the glider is a bright bar that slides along it */
.pt-tabs {
  position: relative;
  display: inline-flex;
  gap: 0.25rem;
  max-width: 100%;
  counter-reset: pt-step;
  box-shadow: inset 0 -2px 0 var(--pt-line);
  overflow-x: auto;
  scrollbar-width: none;
}
.pt-tabs::-webkit-scrollbar { display: none; }
.pt-tabs-glider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #ffc700, #2f5bff 55%, #8b5cf6);
  transition: transform 0.45s var(--ease-out-quart), width 0.45s var(--ease-out-quart);
}
.pt-tab {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.25rem 0.85rem 0.6rem;
  border: 0;
  background: transparent;
  color: var(--pt-muted);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  counter-increment: pt-step;
  transition: color var(--transition-fast);
}
/* Slanted icon tile that straightens when active */
.pt-tab i {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  border: 1px solid var(--pt-line);
  font-size: 0.9rem;
  transform: rotate(-8deg);
  transition: transform var(--transition-base), background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}
/* Step number above the title (CSS only, so the title text stays clean for the script) */
.pt-tab span::before {
  content: counter(pt-step, decimal-leading-zero);
  display: block;
  margin-bottom: 0.1rem;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.7;
}
.pt-tab:hover { color: #fff; }
.pt-tab:hover i { transform: rotate(0); }
.pt-tab.is-active { color: #fff; }
.pt-tab.is-active i {
  transform: rotate(0);
  border-color: transparent;
  background: linear-gradient(135deg, #2f5bff, #8b5cf6);
  color: #fff;
}
.pt-tab.is-active span::before { color: #ffd43b; opacity: 1; }

/* ---- Stage ---- */
.pt-stage {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 clamp(0rem, 4vw, 3.5rem);
}
.pt-spot {
  position: absolute;
  left: 50%;
  top: 8%;
  width: 80%;
  height: 80%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(99, 102, 241, 0.45), transparent);
  filter: blur(40px);
  z-index: 0;
}

/* Laptop */
.pt-laptop { position: relative; z-index: 1; }
.pt-lid {
  position: relative;
  padding: 14px 14px 18px;
  border-radius: 22px 22px 6px 6px;
  background: linear-gradient(180deg, #1e2544, #121731);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.pt-cam {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: #2b3358;
  box-shadow: 0 0 0 2px #171d3b;
}
.pt-screen {
  overflow: hidden;
  border-radius: 10px;
  background: #0b1024;
  cursor: zoom-in;
}
.pt-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.8rem;
  background: #151c3a;
  border-bottom: 1px solid var(--pt-line);
}
.pt-bar > span:nth-child(-n+3) { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.pt-bar > span:nth-child(1) { background: #ff5f57; }
.pt-bar > span:nth-child(2) { background: #febc2e; }
.pt-bar > span:nth-child(3) { background: #28c840; }
.pt-url {
  margin: 0 auto;
  min-width: 0;
  max-width: 60%;
  padding: 0.22rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  color: var(--pt-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pt-url i { color: #34d399; font-size: 0.6rem; margin-right: 0.25rem; }
.pt-url b { color: #fff; font-weight: 600; }

/* Screen: images cross-fade; the active one pans from top to bottom */
/* Same shape as the app screenshots (1920x945), so nothing is cropped */
.pt-view { position: relative; aspect-ratio: 1920 / 945; background: #0b1024; }
.pt-view .pt-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.6s ease, transform 0.8s var(--ease-out-quart);
}
.pt-view .pt-img.is-active { opacity: 1; transform: none; }
.pt.is-running .pt-view .pt-img.is-active { animation: pt-pan var(--pt-ms, 5s) ease-in-out forwards; }
@keyframes pt-pan {
  0%, 15% { object-position: left top; }
  85%, 100% { object-position: left bottom; }
}
.pt-zoom {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  background: rgba(8, 12, 34, 0.8);
  border: 1px solid var(--pt-line);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  pointer-events: none;
}
.pt-screen:hover .pt-zoom { opacity: 1; transform: none; }

/* Laptop base */
.pt-base {
  position: relative;
  height: 16px;
  margin: 0 -5%;
  border-radius: 2px 2px 18px 18px;
  background: linear-gradient(180deg, #2a3157, #151a36);
  box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.9);
}
.pt-base span {
  position: absolute;
  top: 0;
  left: 50%;
  width: 16%;
  height: 6px;
  transform: translateX(-50%);
  border-radius: 0 0 10px 10px;
  background: #0f1430;
}

/* ---- Floating info card ---- */
.pt-info {
  position: absolute;
  z-index: 3;
  left: 0;
  bottom: 9%;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  width: min(290px, 40%);
  padding: 0.75rem 0.85rem;
  border-radius: 18px;
  background: var(--pt-glass);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.8);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.pt-info.is-swap { opacity: 0; transform: translateY(8px); }
.pt-ring { position: absolute; left: 0.6rem; top: 0.6rem; width: 52px; height: 52px; transform: rotate(-90deg); }
.pt-ring circle { fill: none; stroke-width: 3; }
.pt-ring-bg { stroke: rgba(255, 255, 255, 0.12); }
.pt-ring-fg {
  stroke: #7ea0ff;
  stroke-linecap: round;
  stroke-dasharray: 119.4;
  stroke-dashoffset: 119.4;
}
.pt.is-running .pt-ring-fg { animation: pt-ring var(--pt-ms, 5s) linear forwards; }
@keyframes pt-ring { to { stroke-dashoffset: 0; } }
.pt-info-ic {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin: 2px 0 0 2px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2f5bff, #8b5cf6);
  color: #fff;
  font-size: 0.85rem;
}
.pt-info-txt { min-width: 0; padding-left: 0.6rem; }
.pt-info-txt small { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; color: var(--pt-muted); }
.pt-info-txt small b { color: #ffd43b; }
.pt-info-txt strong { display: block; margin: 0.1rem 0 0.25rem; font-family: var(--font-heading); font-size: 1.05rem; color: #fff; }
.pt-info-txt p { margin: 0; font-size: 0.78rem; line-height: 1.4; color: #c3cbe6; }

/* Small floating chips */
.pt-chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--pt-glass);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.8);
  animation: pt-bob 5s ease-in-out infinite;
}
.pt-chip i { color: #34d399; }
.pt-chip-a { right: 0; top: 10%; }
.pt-chip-b { right: 3%; bottom: 18%; animation-delay: -2.5s; }
.pt-chip-b i { color: #ffd43b; }
@keyframes pt-bob { 50% { transform: translateY(-7px); } }

/* Prev / next */
.pt-nav {
  position: absolute;
  z-index: 4;
  top: 42%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--pt-glass);
  backdrop-filter: blur(12px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast);
}
.pt-nav:hover { transform: scale(1.08); background: rgba(47, 91, 255, 0.6); }
.pt-prev { left: -0.5rem; }
.pt-next { right: -0.5rem; }

/* ---- Filmstrip ---- */
.pt-film {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  flex-wrap: wrap;
}
.pt-thumb {
  position: relative;
  width: 180px;
  padding: 0.4rem 0.4rem 0.55rem;
  border-radius: 14px;
  border: 1px solid var(--pt-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--pt-muted);
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.pt-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: left top;
  border-radius: 9px;
  opacity: 0.55;
  transition: opacity var(--transition-fast);
}
.pt-thumb span {
  display: block;
  margin-top: 0.45rem;
  padding: 0 0.2rem;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pt-thumb:hover { transform: translateY(-3px); }
.pt-thumb:hover img { opacity: 0.85; }
.pt-thumb.is-active { border-color: rgba(126, 160, 255, 0.6); background: rgba(47, 91, 255, 0.12); color: #fff; }
.pt-thumb.is-active img { opacity: 1; }
.pt-thumb-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #2f5bff, #8b5cf6);
}
.pt-thumb.is-active .pt-thumb-bar { width: 100%; }
.pt.is-running .pt-thumb.is-active .pt-thumb-bar { animation: pt-fill var(--pt-ms, 5s) linear forwards; }
@keyframes pt-fill { from { width: 0; } to { width: 100%; } }

/* ---- Lightbox ---- */
.pt-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 3rem 1rem 1.5rem;
  background: rgba(4, 6, 16, 0.9);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
  animation: pt-lb-in 0.25s ease;
}
.pt-lightbox[hidden] { display: none; }
@keyframes pt-lb-in { from { opacity: 0; } }
.pt-lightbox img {
  max-width: min(1400px, 100%);
  max-height: calc(100vh - 7rem);
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  cursor: default;
}
.pt-lightbox p { margin: 0; color: #e2e8f0; font-weight: 600; font-size: 0.9rem; }
.pt-lb-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ---- Responsive ---- */
/* Wide screens have room beside the laptop: keep the cards mostly off the app screen */
@media (min-width: 1200px) {
  .pt-info { left: -2.5rem; bottom: 6%; }
  .pt-chip-a { right: -3rem; top: 6%; }
  .pt-chip-b { right: -3.5rem; bottom: 10%; }
}
@media (max-width: 991.98px) {
  .pt-info-txt p { font-size: 0.84rem; }
  .pt-info { position: relative; left: auto; bottom: auto; width: 100%; margin-top: 1.25rem; }
  .pt-chip-b { display: none; }
  .pt-tabs-wrap { justify-content: flex-start; }
}
@media (max-width: 575.98px) {
  .pt-lid { padding: 8px 8px 10px; border-radius: 14px 14px 4px 4px; }
  .pt-url { max-width: 78%; }
  .pt-base { height: 10px; }
  .pt-chip, .pt-zoom { display: none; }
  .pt-nav { width: 36px; height: 36px; top: 36%; }
  .pt-prev { left: -0.35rem; }
  .pt-next { right: -0.35rem; }
  .pt-tab { padding: 0.5rem 0.9rem 0.7rem 0.4rem; font-size: 0.84rem; }
  .pt-tab i { width: 32px; height: 32px; }
  .pt-film { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: -16px; padding: 0 16px 0.25rem; scrollbar-width: none; }
  .pt-film::-webkit-scrollbar { display: none; }
  .pt-thumb { flex: 0 0 140px; width: 140px; }
}
/* ---- Light mode ---- */
:root:not([data-theme="dark"]) .pt {
  --pt-ink: var(--text-primary);
  --pt-muted: var(--text-secondary);
  --pt-line: rgba(15, 23, 42, 0.1);
  --pt-glass: rgba(255, 255, 255, 0.88);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 55%, #f8fafc 100%);
}
:root:not([data-theme="dark"]) .pt-grid {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
}
:root:not([data-theme="dark"]) .pt-orb { opacity: 0.28; }
:root:not([data-theme="dark"]) .pt-spot { opacity: 0.45; }
:root:not([data-theme="dark"]) .pt-badge { background: #fff; color: var(--color-blue); }
:root:not([data-theme="dark"]) .pt-head h2 { color: var(--text-primary); }
:root:not([data-theme="dark"]) .pt-grad { background-image: linear-gradient(120deg, #2f5bff, #8b5cf6, #0891b2); }
:root:not([data-theme="dark"]) .pt-tab:hover,
:root:not([data-theme="dark"]) .pt-tab.is-active { color: var(--text-primary); }
:root:not([data-theme="dark"]) .pt-tab.is-active span::before { color: #b45309; }
/* the laptop's own address bar keeps its dark colours */
:root:not([data-theme="dark"]) .pt-bar { border-bottom-color: rgba(255, 255, 255, 0.1); }
:root:not([data-theme="dark"]) .pt-url { color: #9aa5c8; }
:root:not([data-theme="dark"]) .pt-lid { box-shadow: 0 50px 90px -40px rgba(15, 23, 42, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
:root:not([data-theme="dark"]) .pt-base { box-shadow: 0 24px 40px -18px rgba(15, 23, 42, 0.5); }
:root:not([data-theme="dark"]) .pt-info,
:root:not([data-theme="dark"]) .pt-chip,
:root:not([data-theme="dark"]) .pt-nav {
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 22px 44px -22px rgba(15, 23, 42, 0.4);
}
:root:not([data-theme="dark"]) .pt-info-txt strong,
:root:not([data-theme="dark"]) .pt-chip,
:root:not([data-theme="dark"]) .pt-nav { color: var(--text-primary); }
:root:not([data-theme="dark"]) .pt-nav:hover { color: #fff; }
:root:not([data-theme="dark"]) .pt-info-txt p { color: var(--text-secondary); }
:root:not([data-theme="dark"]) .pt-info-txt small b { color: #b45309; }
:root:not([data-theme="dark"]) .pt-ring-bg { stroke: rgba(15, 23, 42, 0.12); }
:root:not([data-theme="dark"]) .pt-ring-fg { stroke: var(--color-blue); }
:root:not([data-theme="dark"]) .pt-chip i { color: #059669; }
:root:not([data-theme="dark"]) .pt-chip-b i { color: #b45309; }
:root:not([data-theme="dark"]) .pt-thumb { background: rgba(255, 255, 255, 0.8); }
:root:not([data-theme="dark"]) .pt-thumb img { opacity: 0.75; }
:root:not([data-theme="dark"]) .pt-thumb:hover img,
:root:not([data-theme="dark"]) .pt-thumb.is-active img { opacity: 1; }
:root:not([data-theme="dark"]) .pt-thumb.is-active { background: rgba(47, 91, 255, 0.08); border-color: rgba(47, 91, 255, 0.45); color: var(--text-primary); }

@media (prefers-reduced-motion: reduce) {
  .pt.is-running .pt-view .pt-img.is-active,
  .pt-chip,
  .pt.is-running .pt-ring-fg,
  .pt.is-running .pt-thumb.is-active .pt-thumb-bar { animation: none; }
  .pt-tabs-glider { transition: none; }
}
