/* ============================================
   FT Sicherheitstechnik — Apple-Style Demo Components
   3D Viewer · Video Demo · Before/After · Scroll Sequence
   ============================================ */

/* ============================================
   3D VIEWER
   ============================================ */
.ap-3d-section {
  padding: clamp(80px, 10vw, 140px) var(--gutter);
  background: var(--grad-product-bg);
  text-align: center;
}
.ap-3d-section__title {
  font-family: 'Clash Grotesk', system-ui, sans-serif;
  font-size: clamp(2rem, 2.5vw + 1rem, 4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 auto 14px;
  max-width: 760px;
}
.ap-3d-section__title em { font-style: normal; color: var(--color-text-secondary); }
.ap-3d-section__lead {
  font-size: clamp(1.05rem, 0.9rem + 0.5vw, 1.25rem);
  color: var(--color-text-secondary);
  max-width: 620px;
  margin: 0 auto 36px;
  line-height: 1.5;
}
.ap-3d-canvas {
  width: 100%;
  max-width: 720px;
  height: 520px;
  margin: 0 auto;
  position: relative;
  touch-action: none;
}
.ap-3d-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 8px 16px;
  border-radius: 980px;
}
.ap-3d-hint svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

@media (max-width: 640px) {
  .ap-3d-canvas { height: 400px; }
}

/* ============================================
   VIDEO DEMO
   ============================================ */
.ap-video-section {
  padding: clamp(80px, 10vw, 140px) 0;
  background: var(--color-bg);
}
.ap-video-section__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.ap-video-section__header {
  text-align: center;
  margin-bottom: 56px;
}
.ap-video-section__eyebrow {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-cta);
  margin-bottom: 14px;
}
.ap-video-section__title {
  font-family: 'Clash Grotesk', system-ui, sans-serif;
  font-size: clamp(2rem, 2.5vw + 1rem, 4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 auto 18px;
  max-width: 820px;
}
.ap-video-section__title em { font-style: normal; color: var(--color-text-secondary); }
.ap-video-section__lead {
  font-size: clamp(1.05rem, 0.9rem + 0.5vw, 1.25rem);
  color: var(--color-text-secondary);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.5;
}
.ap-video {
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-strong);
  position: relative;
}
.ap-video video {
  width: 100%;
  height: auto;
  display: block;
}
.ap-video__caption {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: #fff;
  pointer-events: none;
  font-family: 'Clash Grotesk', system-ui, sans-serif;
}
.ap-video__caption-title {
  font-size: clamp(1.5rem, 1.5vw + 1rem, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6);
  margin: 0 0 4px;
}
.ap-video__caption-sub {
  font-size: 1rem;
  opacity: 0.85;
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
  margin: 0;
  font-family: 'Satoshi', system-ui, sans-serif;
}

/* ============================================
   BEFORE / AFTER SLIDER
   ============================================ */
.ap-compare-section {
  padding: clamp(80px, 10vw, 140px) 0;
  background: var(--color-surface);
  text-align: center;
}
.ap-compare-section__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.ap-compare-section__title {
  font-family: 'Clash Grotesk', system-ui, sans-serif;
  font-size: clamp(2rem, 2.5vw + 1rem, 4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 auto 14px;
  max-width: 760px;
}
.ap-compare-section__title em { font-style: normal; color: var(--color-text-secondary); }
.ap-compare-section__lead {
  font-size: clamp(1.05rem, 0.9rem + 0.5vw, 1.25rem);
  color: var(--color-text-secondary);
  max-width: 680px;
  margin: 0 auto 48px;
  line-height: 1.5;
}

.ap-compare {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  user-select: none;
  cursor: ew-resize;
  box-shadow: var(--shadow-strong);
  background: #000;
}
.ap-compare__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ap-compare__img--top {
  clip-path: inset(0 50% 0 0);
  transition: clip-path 0.05s linear;
}
.ap-compare__label {
  position: absolute;
  top: 20px;
  font-family: 'Clash Grotesk', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 980px;
  pointer-events: none;
  letter-spacing: 0;
}
.ap-compare__label--bad { left: 20px; }
.ap-compare__label--good { right: 20px; background: rgba(34, 197, 94, 0.85); }

.ap-compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #fff;
  pointer-events: none;
  transform: translateX(-50%);
}
.ap-compare__handle::before,
.ap-compare__handle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 60px;
  transform: translateX(-50%);
}
.ap-compare__handle-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
  color: #1d1d1f;
  pointer-events: none;
  font-size: 1.5rem;
  font-weight: 600;
}
.ap-compare__handle-knob::before,
.ap-compare__handle-knob::after {
  content: '';
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.ap-compare__handle-knob::before { border-right: 8px solid #1d1d1f; margin-right: 4px; }
.ap-compare__handle-knob::after  { border-left: 8px solid #1d1d1f;  margin-left: 4px; }

/* ============================================
   SCROLL SEQUENCE (Apple AirPods-style)
   The product image stays sticky; scroll triggers
   reveal of large feature labels around it
   ============================================ */
.ap-sequence {
  position: relative;
  background: var(--color-bg);
  padding: 80px 0 0;
}
.ap-sequence__intro {
  text-align: center;
  padding: 0 var(--gutter) 60px;
}
.ap-sequence__eyebrow {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-cta);
  margin-bottom: 14px;
  display: inline-block;
}
.ap-sequence__title {
  font-family: 'Clash Grotesk', system-ui, sans-serif;
  font-size: clamp(2rem, 2.5vw + 1rem, 4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 auto;
  max-width: 760px;
}
.ap-sequence__title em { font-style: normal; color: var(--color-text-secondary); }

.ap-sequence__stage {
  position: relative;
  height: 400vh; /* 4 frames × 100vh = total scroll distance */
}
.ap-sequence__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ap-sequence__product {
  position: absolute;
  width: 40vmin;
  max-width: 420px;
  height: auto;
  z-index: 2;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.35));
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .ap-sequence__product { filter: drop-shadow(0 30px 60px rgba(0,0,0,0.18)); }
}
:root[data-theme="light"] .ap-sequence__product { filter: drop-shadow(0 30px 60px rgba(0,0,0,0.18)); }

.ap-sequence__label {
  position: absolute;
  z-index: 3;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  max-width: 320px;
  text-align: left;
}
.ap-sequence__label.is-active { opacity: 1; transform: translateY(0); }
.ap-sequence__label-num {
  font-family: 'Clash Grotesk', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-cta);
  margin-bottom: 8px;
  display: block;
}
.ap-sequence__label-title {
  font-family: 'Clash Grotesk', system-ui, sans-serif;
  font-size: clamp(1.3rem, 1vw + 1rem, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--color-text);
  margin: 0 0 12px;
}
.ap-sequence__label-desc {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin: 0;
}

.ap-sequence__label--tl { top: 12vh;  left: 8vw; }
.ap-sequence__label--tr { top: 12vh;  right: 8vw; text-align: right; }
.ap-sequence__label--bl { bottom: 16vh; left: 8vw; }
.ap-sequence__label--br { bottom: 16vh; right: 8vw; text-align: right; }

/* Mobile: stack labels below product */
@media (max-width: 760px) {
  .ap-sequence__product { width: 60vmin; }
  .ap-sequence__label   { position: static; max-width: 80vw; margin: 32px auto 0; text-align: center !important; }
  .ap-sequence__label-num { display: block; }
  .ap-sequence__sticky  { flex-direction: column; justify-content: flex-start; padding-top: 12vh; }
}
