/**
 * RoccOS Scene — Laptop-in-Landscape
 * Desktop starts at scale 0.9 with landscape visible in margins.
 * Scroll zooms to 1.0 and locks. Shutdown reverses back to 0.9.
 */

/* ── Scene Container ── */
.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* ── Scenic Landscape Background ── */
.scene-bg {
  position: absolute;
  inset: -30px; /* Bleed for drift movement */
  z-index: var(--z-scene-bg);
  opacity: 0;
  pointer-events: none;
  will-change: transform;
}

/* ── CSS Laptop Frame ── */
.laptop {
  position: absolute;
  z-index: var(--z-laptop);
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(80%);
  width: 65vw;
  max-width: 900px;
  opacity: 0;
  pointer-events: none;
}

/* Lid (screen + bezel) */
.laptop-lid {
  background: linear-gradient(180deg, #d4c8b0 0%, #c8bca4 100%);
  border-radius: 12px 12px 0 0;
  padding: 14px 14px 8px;
  border: 2px solid #a89880;
  border-bottom: none;
  box-shadow:
    0 -2px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.laptop-bezel {
  position: relative;
  background: radial-gradient(ellipse at 50% 60%, #1E1C1A, #0A0A0A);
  border-radius: 6px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6);
}

/* Subtle screen glow */
.laptop-bezel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(80, 100, 120, 0.12), transparent 70%);
  pointer-events: none;
}

/* Webcam dot */
.laptop-cam {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #333;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.5);
}

/* Screen cutout outline (decorative) */
.laptop-screen-outline {
  position: absolute;
  inset: 14px 4px 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  pointer-events: none;
}

/* Base (keyboard area) */
.laptop-base {
  position: relative;
  background: linear-gradient(180deg, #c8bca4 0%, #bfb49a 100%);
  height: 3.5vw;
  max-height: 50px;
  min-height: 24px;
  border-radius: 0 0 8px 8px;
  border: 2px solid #a89880;
  border-top: 1px solid #b0a590;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Trackpad */
.laptop-trackpad {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 28%;
  height: 60%;
  background: linear-gradient(180deg, #bfb49a 0%, #b5aa90 100%);
  border: 1px solid #a89880;
  border-radius: 4px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* LED indicator on base (decorative, static) */
.laptop-led {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #444;
}

/* ── Hint Text ── */
.scene-hint {
  position: absolute;
  bottom: 25vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-scene-hint);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-system);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.scene-hint[hidden] {
  display: none;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .scene-bg {
    will-change: auto;
  }
}

/* ── Mobile: skip scene visuals ── */
@media (max-width: 767px) {
  .scene-bg,
  .laptop,
  .scene-hint {
    display: none !important;
  }
}
