/* ================================================================
   ROOF TEAR-OFF SCROLL SCRUBBER — Apple-style canvas 2D
   122 frames from Higgsfield Kling 4K video, no WebGL needed
   Created: 2026-07-19 — Mobile fix v2
   ================================================================ */

.roof-tearoff-section {
  position: relative;
  width: 100%;
  height: 600vh;
  background: #0d0d0f;
  overflow: hidden;
}

.roof-tearoff-pin {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

#roof-tearoff-canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.roof-tearoff-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
  z-index: 2;
}

.roof-tearoff-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.roof-tearoff-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 6px 12px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(245, 158, 11, 0.08);
  font-family: 'Inter', sans-serif;
}

.roof-tearoff-progress {
  width: 200px;
  flex-shrink: 0;
}

.roof-tearoff-progress .label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  text-align: right;
  font-family: 'Inter', sans-serif;
}

.roof-tearoff-progress .track {
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.roof-tearoff-progress .fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #6366f1);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
  transition: width 0.05s linear;
}

.roof-tearoff-caption {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.roof-tearoff-caption.on {
  opacity: 1;
}

.roof-tearoff-caption .num {
  font-size: 0.7rem;
  color: #f59e0b;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}

.roof-tearoff-caption h2 {
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 800;
  margin: 0.4rem 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9);
  font-family: 'Montserrat', sans-serif;
}

.roof-tearoff-caption p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  line-height: 1.5;
  font-family: 'Inter', sans-serif;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
}

.roof-tearoff-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0d0d0f;
  z-index: 5;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.roof-tearoff-loader.off {
  opacity: 0;
  visibility: hidden;
}

.roof-tearoff-loader .ring {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(245, 158, 11, 0.2);
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: roof-tearoff-spin 0.8s linear infinite;
}

@keyframes roof-tearoff-spin {
  to { transform: rotate(360deg); }
}

.roof-tearoff-loader .txt {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'Inter', sans-serif;
  text-align: center;
}

/* ===== MOBILE: hide entire section ===== */
@media (max-width: 768px) {
  .roof-tearoff-section {
    display: none !important;
  }
}
