/* ============================================================
   MacBook Showcase Component
   A CSS-only 3D MacBook frame for showcasing Screezy in the
   landing page. No scroll-hijacking — just reveal + parallax.
   ============================================================ */

/* ---- Container ---- */
.macbook-showcase-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1800px;
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.software-asset-cloud {
  position: absolute;
  inset: -90px -120px -30px;
  pointer-events: none;
  z-index: 1;
}

.software-asset {
  position: absolute;
  width: 118px;
  height: auto;
  opacity: 0.86;
}

.software-asset-record {
  left: -82px;
  top: 88px;
  width: 104px;
  transform: rotate(-12deg);
}

.software-asset-subtitles {
  left: 54px;
  bottom: 126px;
  width: 90px;
  transform: rotate(8deg);
}

.software-asset-export {
  right: 34px;
  top: 156px;
  width: 92px;
  transform: rotate(-8deg);
}

/* ---- Entire laptop body (screen + base) ---- */
.macbook-body {
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.2, 0, 0.2, 1);
  will-change: transform;
  position: relative;
  z-index: 2;
}

/* ---- Screen (lid) ---- */
.macbook-screen {
  position: relative;
  width: 100%;
  background: #0c0c0c;
  border-radius: 16px 16px 0 0;
  padding: 14px 14px 0 14px;
  box-shadow:
    inset 0 0 0 1.5px #2a2a2a,
    0 -1px 0 0 rgba(255,255,255,0.06);
}

/* Notch */
.macbook-notch {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 10px;
  background: #0c0c0c;
  border-radius: 0 0 8px 8px;
  z-index: 5;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.04);
}
.macbook-notch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1a1a1a;
  box-shadow: inset 0 0 0 0.5px #333;
}

/* Screen content (the app screenshot/video) */
.macbook-screen-content {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px 4px 0 0;
  background: #040804;
}
.macbook-screen-content img,
.macbook-screen-content video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Reflection overlay on screen */
.macbook-screen-content::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.04) 0%,
    transparent 50%,
    rgba(255,255,255,0.01) 100%
  );
  pointer-events: none;
}

/* ---- Base / Bottom chassis ---- */
.macbook-base {
  position: relative;
  width: 100%;
  height: 14px;
  background: linear-gradient(
    to bottom,
    #1c1c1e 0%,
    #141414 100%
  );
  border-radius: 0 0 6px 6px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 4px 16px rgba(0,0,0,0.6);
}

/* Hinge line */
.macbook-base::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.08) 20%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.08) 80%,
    transparent
  );
}

/* Trackpad indent */
.macbook-base::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
  border-top: none;
}

/* ---- Glow beneath MacBook ---- */
.macbook-glow {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 60px;
  background: radial-gradient(
    ellipse at center,
    rgba(75, 169, 40, 0.18) 0%,
    rgba(75, 169, 40, 0.06) 40%,
    transparent 70%
  );
  filter: blur(20px);
  pointer-events: none;
  z-index: -1;
}

/* ---- Reveal animation ---- */
.macbook-showcase-wrap {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-cinematic), transform 0.8s var(--ease-cinematic);
}
.macbook-showcase-wrap.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Section layout for the MacBook showcase ---- */
.macbook-showcase-section {
  position: relative;
  padding: 80px 0 100px;
  overflow: hidden;
}

.macbook-showcase-section .section-header-center {
  margin-bottom: 56px;
}

/* Context labels below MacBook */
.macbook-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.macbook-caption-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 6px 14px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.macbook-caption-item:hover {
  border-color: var(--border-glass);
  color: var(--text-primary);
}
.macbook-caption-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .macbook-showcase-section {
    display: none;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .macbook-showcase-wrap {
    max-width: 700px;
  }
  .software-asset-cloud {
    inset: -74px -52px -20px;
  }
  .software-asset {
    width: 82px;
    opacity: 0.7;
  }
  .software-asset-record {
    left: -20px;
  }
  .software-asset-subtitles {
    left: 24px;
  }
  .software-asset-export {
    right: 20px;
  }
  .macbook-screen {
    padding: 10px 10px 0 10px;
    border-radius: 12px 12px 0 0;
  }
  .macbook-notch {
    width: 44px;
    height: 8px;
    top: 4px;
  }
  .macbook-base {
    height: 11px;
  }
}
