/* ==========================================================================
   Scroll-Scrub Hero, reusable component styles
   website-builder-v4 / True2 Digital Marketing

   Scope: every rule is namespaced under .ssh-* so this file can be dropped
   into any client page without colliding with that page's own CSS.
   Swap points are marked with "CLIENT SWAP:".
   ========================================================================== */

:root {
  --ssh-accent: #c9a84c;          /* CLIENT SWAP: brand accent color */
  --ssh-bg: #07060a;
  --ssh-glass-bg: rgba(255,255,255,0.10);
  --ssh-glass-border: rgba(255,255,255,0.22);
  --ssh-text-1: #ffffff;
  --ssh-text-2: rgba(255,255,255,0.68);
}

.ssh-pin {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--ssh-bg);
  isolation: isolate;
}

/* ---------- background layer (video or 3D canvas) ---------- */
.ssh-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(120% 100% at 50% 30%, #1a1812 0%, #0c0a0d 55%, #05050a 100%);
}

.ssh-canvas,
.ssh-video,
.ssh-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ssh-canvas { touch-action: none; }

.ssh-poster {
  z-index: 2;
  opacity: 1;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.ssh-poster.is-hidden { opacity: 0; }

.ssh-loading {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  font: 500 12px/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ssh-text-2);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.ssh-loading.is-visible { opacity: 1; }
.ssh-loading::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: var(--ssh-accent);
  animation: ssh-spin 0.8s linear infinite;
}
@keyframes ssh-spin { to { transform: rotate(360deg); } }

.ssh-overlay-gradient {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 24%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.55) 100%);
}

/* ---------- intro title ---------- */
.ssh-intro {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  padding: 0 24px;
}
.ssh-intro .ssh-eyebrow {
  font: 600 12px/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ssh-accent);
  margin-bottom: 18px;
}
.ssh-intro h1 {
  font: 600 clamp(34px, 6vw, 76px)/1.05 'Playfair Display', Georgia, serif;
  color: var(--ssh-text-1);
  margin: 0 0 16px;
  max-width: 16ch;
}
.ssh-intro p {
  font: 400 clamp(14px, 1.4vw, 18px)/1.6 'Inter', system-ui, sans-serif;
  color: var(--ssh-text-2);
  max-width: 46ch;
  margin: 0;
}

.ssh-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ssh-text-2);
  font: 500 11px/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  pointer-events: none;
}
.ssh-scroll-hint svg { width: 16px; height: 24px; animation: ssh-bob 1.8s ease-in-out infinite; }
@keyframes ssh-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- floating glass cards ---------- */
.ssh-cards {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.ssh-card {
  position: absolute;
  width: clamp(230px, 24vw, 330px);
  opacity: 0;
  will-change: transform, opacity;
  pointer-events: none;
}

.ssh-card-inner {
  background: var(--ssh-glass-bg);
  border: 1px solid var(--ssh-glass-border);
  border-radius: 20px;
  padding: 22px 24px;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 8px 30px rgba(0,0,0,0.28);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.ssh-card.is-active { pointer-events: auto; }
.ssh-card.is-active .ssh-card-inner:hover {
  transform: scale(1.035);
  box-shadow: 0 18px 46px rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.4);
}

.ssh-card-num {
  display: inline-block;
  font: 600 11px/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.14em;
  color: var(--ssh-accent);
  margin-bottom: 10px;
}
.ssh-card-inner h3 {
  font: 600 19px/1.25 'Playfair Display', Georgia, serif;
  color: var(--ssh-text-1);
  margin: 0 0 8px;
}
.ssh-card-inner p {
  font: 400 13.5px/1.55 'Inter', system-ui, sans-serif;
  color: var(--ssh-text-2);
  margin: 0;
}

/* card screen-space positions, CLIENT SWAP: reposition per layout */
.ssh-card[data-card="0"] { left: 6%;  bottom: 14%; }
.ssh-card[data-card="1"] { right: 6%; top: 16%; }
.ssh-card[data-card="2"] { right: 7%; bottom: 14%; }

@media (max-width: 760px) {
  .ssh-card { width: min(78vw, 300px); }
  .ssh-card[data-card="0"] { left: 50%; bottom: 16%; transform: translateX(-50%); }
  .ssh-card[data-card="1"] { left: 50%; top: 16%;    transform: translateX(-50%); }
  .ssh-card[data-card="2"] { left: 50%; bottom: 16%; transform: translateX(-50%); }
}

/* ---------- progress rail ---------- */
.ssh-progress {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 10px;
}
.ssh-progress .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: background 0.3s ease, transform 0.3s ease;
}
.ssh-progress .dot.is-active {
  background: var(--ssh-accent);
  transform: scale(1.5);
}

/* ---------- mode toggle (demo-only utility) ---------- */
.ssh-mode-toggle {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 30;
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.ssh-mode-toggle button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ssh-text-2);
  font: 600 11px/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.ssh-mode-toggle button.is-active {
  background: var(--ssh-accent);
  color: #1a1408;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ssh-scroll-hint svg { animation: none; }
  .ssh-loading::before { animation: none; }
}
