/* ── MACBOOK SCROLL ──
   A laptop that opens as you scroll, then scrolls through a website on its screen.
   Vanilla port of Aceternity UI's Macbook Scroll; motion lives in js/macbook-scroll.js */
.mb-scroll { background: var(--bg); overflow: hidden; }

.mb-stage {
  position: relative;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.mb-title {
  position: absolute; left: 5vw; right: 5vw; top: 0;
  text-align: center;
  font-family: var(--font-title);
  font-size: 2rem; font-weight: 800; line-height: 1.05;
  letter-spacing: -0.02em; text-transform: uppercase;
  color: var(--text);
}

/* Fixed 32rem wide; the script scales it to fit the screen */
.mb-device {
  position: absolute; left: 50%; top: 0;
  width: 32rem; margin-left: -16rem;
  transform-origin: 50% 0;
}

/* ── Lid ── */
.mb-lid { position: relative; perspective: 800px; }

.mb-lid-back {
  position: relative;
  height: 12rem; width: 32rem;
  padding: 0.5rem;
  border-radius: 1rem;
  background: #010101;
  transform: perspective(800px) rotateX(-25deg) translateZ(0);
  transform-origin: bottom;
  transform-style: preserve-3d;
}

.mb-lid-inner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0.5rem;
  background: #010101;
  box-shadow: 0 2px 0 2px #171717 inset;
}

.mb-lid-logo {
  width: 1.6rem; aspect-ratio: 1079.42 / 487.69;
  background-color: var(--text);
  -webkit-mask: url('../images/logos/w-footer-logo.svg') no-repeat center / contain;
  mask: url('../images/logos/w-footer-logo.svg') no-repeat center / contain;
}

.mb-screen {
  position: absolute; inset: 0;
  height: 24rem; width: 32rem;
  padding: 0.5rem;
  border-radius: 1rem;
  background: #010101;
  transform-origin: top;
  transform-style: preserve-3d;
}

.mb-view {
  position: absolute; inset: 0;
  display: block;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #272729;
}

.mb-view img { display: block; width: 100%; height: auto; will-change: transform; }

/* Reduced motion: the laptop stands open and the site scrolls by itself inside the screen */
.mb-scroll.is-still .mb-view { overflow-y: auto; }

/* ── Base ── */
.mb-base {
  position: relative; z-index: -1;
  height: 22rem; width: 32rem;
  overflow: hidden;
  border-radius: 1rem;
  background: #272729;
}

.mb-hinge { position: relative; height: 2.5rem; width: 100%; }
.mb-hinge::before {
  content: ''; position: absolute; left: 0; right: 0;
  margin: 0 auto;
  height: 1rem; width: 80%;
  background: #050505;
}

.mb-deck { position: relative; display: flex; }
.mb-speaker-col { width: 10%; margin: 0 auto; overflow: hidden; }
.mb-speaker {
  margin-top: 0.5rem; height: 10rem;
  background-image: radial-gradient(circle, #08080a 0.5px, transparent 0.5px);
  background-size: 3px 3px;
}
.mb-keys-col { width: 80%; margin: 0 auto; }

.mb-trackpad {
  margin: 0.25rem auto;
  height: 8rem; width: 40%;
  border-radius: 0.75rem;
  box-shadow: 0 0 1px 1px #00000020 inset;
}

.mb-notch {
  position: absolute; left: 0; right: 0; bottom: 0;
  margin: 0 auto;
  height: 0.5rem; width: 5rem;
  border-radius: 1.5rem 1.5rem 0 0;
  background: linear-gradient(to top, #272729, #050505);
}

/* ── Keyboard ── */
.mb-keypad {
  margin: 0 0.25rem;
  padding: 0.25rem;
  border-radius: 0.375rem;
  background: #050505;
  transform: translateZ(0);
}

.mb-row { display: flex; flex-shrink: 0; gap: 2px; width: 100%; margin-bottom: 2px; }

.mb-key {
  padding: 0.5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 25px -5px #fff, 0 8px 10px -6px #fff;
  transform: translateZ(0);
}

.mb-cap {
  display: flex; align-items: center; justify-content: center;
  height: 1.5rem; width: 1.5rem;
  border-radius: 3.5px;
  background: #0a090d;
  box-shadow: 0 -0.5px 2px 0 #0d0d0f inset, -0.5px 0 2px 0 #0d0d0f inset;
}

.mb-cap > span {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%;
  font-family: var(--font-body);
  font-size: 5px; line-height: 1.4;
  color: #fff;
}

.mb-cap.is-left { align-items: flex-end; justify-content: flex-start; padding: 0 0 2px 4px; }
.mb-cap.is-right { align-items: flex-end; justify-content: flex-end; padding: 0 4px 2px 0; }
.mb-cap.is-left > span { align-items: flex-start; }
.mb-cap.is-right > span { align-items: flex-end; }
.mb-cap.is-mod > span { height: 100%; justify-content: space-between; align-items: stretch; padding: 4px 0; }
.mb-cap.is-mod i { font-style: normal; padding: 0 0.25rem; }
.mb-cap.is-mod i:first-child { text-align: right; }

.mb-power {
  height: 1rem; width: 1rem; padding: 1px;
  border-radius: 50%;
  background: linear-gradient(to bottom, #171717 20%, #000 50%, #171717 95%);
}
.mb-power::after { content: ''; display: block; height: 100%; border-radius: 50%; background: #000; }

.mb-arrows {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  height: 1.5rem; width: 4.9rem;
  margin-top: 2px; padding: 0.5px;
}
.mb-arrows > div { display: flex; }
.mb-arrows .mb-cap { height: 0.75rem; }

/* Tablets and phones: without the sections' default padding, less empty space above the laptop */
@media (max-width: 1024px) {
  .mb-scroll { padding: 0; }
}
