/* 3D Perspective & Device Mockup Styling */
.perspective-stage {
  perspective: 1200px;
  transform-style: preserve-3d;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.device-frame-wrap {
  position: relative;
  width: 320px;
  max-width: 86vw;
  margin: 0 auto;
  transform-style: preserve-3d;
  transition: transform 0.15s cubic-bezier(0.2, 0, 0.2, 1);
  will-change: transform;
}

@media (min-width: 1024px) {
  .device-frame-wrap {
    width: 380px;
  }
}

/* iPhone Titanium Bezel Body */
.device-phone {
  position: relative;
  border-radius: 54px;
  background: #1e2220;
  padding: 12px;
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 0 4px #121514,
    0 30px 100px -20px rgba(0, 0, 0, 0.85),
    0 50px 140px rgba(212, 243, 74, 0.12);
  overflow: hidden;
}

/* Dynamic Island & Screen Glass */
.device-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  border-radius: 44px;
  overflow: hidden;
  background: #000;
}

.device-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dynamic-island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 28px;
  background: #000;
  border-radius: 20px;
  z-index: 30;
  box-shadow: 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Screen Glass Light Sheen */
.device-phone::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 40%, rgba(212, 243, 74, 0.04) 100%);
  pointer-events: none;
  z-index: 40;
  border-radius: 54px;
}

/* Viewfinder Floating HUD Layer */
.hud-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 24px 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.05em;
  will-change: transform, opacity;
  transition: transform 0.4s ease-out;
}

.hud-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hud-pill {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
}

.hud-center-focus {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
}

/* Focus Brackets */
.focus-bracket {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--accent);
  border-style: solid;
  border-width: 0;
}

.focus-bracket.top-left {
  top: 0; left: 0;
  border-top-width: 2px;
  border-left-width: 2px;
}

.focus-bracket.top-right {
  top: 0; right: 0;
  border-top-width: 2px;
  border-right-width: 2px;
}

.focus-bracket.bottom-left {
  bottom: 0; left: 0;
  border-bottom-width: 2px;
  border-left-width: 2px;
}

.focus-bracket.bottom-right {
  bottom: 0; right: 0;
  border-bottom-width: 2px;
  border-right-width: 2px;
}

.focus-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
}

/* Deconstructed Floating Elements */
.floating-metric-card {
  position: absolute;
  background: rgba(20, 24, 22, 0.85);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 16px 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  z-index: 50;
  will-change: transform;
  pointer-events: auto;
  transition: transform 0.2s ease-out;
}

.floating-metric-card.card-left {
  top: 35%;
  left: 20px;
}

.floating-metric-card.card-right {
  bottom: 25%;
  right: 20px;
}

@media (min-width: 1200px) {
  .floating-metric-card.card-left {
    left: 40px;
  }
  .floating-metric-card.card-right {
    right: 40px;
  }
}

@media (max-width: 900px) {
  .floating-metric-card {
    display: none;
  }
}

/* Scroll Parallax Sticky Stage */
.sticky-stage-container {
  position: relative;
  min-height: 220vh;
}

.sticky-stage-content {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Multi-layer Viewfinder Breakdown Section */
.viewfinder-grid-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 992px) {
  .viewfinder-grid-showcase {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.hud-parameter-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 36px;
}

.hud-parameter-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.hud-parameter-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateX(6px);
}

.hud-parameter-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(212, 243, 74, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.hud-parameter-title {
  font-size: 16px;
  font-weight: 650;
  color: #fff;
  margin-bottom: 4px;
}

.hud-parameter-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================
   Parallax 2.0 Engine Extensions
   ========================================================== */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #d4f34a 0%, #10b981 100%);
  z-index: 9999;
  box-shadow: 0 0 12px rgba(212, 243, 74, 0.7);
  pointer-events: none;
  transition: width 0.05s ease-out;
}

.device-screen-sheen {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 35%, rgba(212, 243, 74, 0.06) 60%, transparent 100%);
  pointer-events: none;
  z-index: 25;
  will-change: transform;
}

.ambient-bokeh {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(90px);
  will-change: transform;
  opacity: 0.5;
}

.bokeh-hero {
  top: 15%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 243, 74, 0.14) 0%, transparent 70%);
}

.bokeh-viewfinder {
  top: 30%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
}

.bokeh-film {
  top: 50%;
  left: 5%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.10) 0%, transparent 70%);
}

.bokeh-ai {
  top: 65%;
  right: 5%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.10) 0%, transparent 70%);
}

.bokeh-frames {
  top: 80%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.09) 0%, transparent 70%);
}

#heroDevice, #heroText, #metricLeft, #metricRight, #viewfinderDevice, #filmStrip, #compareSlider, .watermark-app-mockup, .real-frame-card, .privacy-card, #settingsAppDevice, .compare-tag, .hud-parameter-item {
  will-change: transform;
}
