/* ==========================================================================
   SPECIALIST HOUSE: PHONE VIDEO FRAMES
   Loaded on work.html only, after styles.css.

   Three CSS-drawn phone handsets with a vertical clip inside each. The video
   carries preload="none" and a poster image, so nothing downloads until the
   visitor actually presses play: three clips would otherwise cost ~7MB on
   page load. js/phones.js swaps in native controls on first play.
   ========================================================================== */

.phones-section {
  padding: 100px 0 80px;
  background-color: var(--bg-surface);
}

.phones-section__header {
  max-width: 640px;
  margin: 0 auto 4rem;
  text-align: center;
}
.phones-section__header h2 {
  margin-top: 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--text-primary);
}
.phones-section__header p {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.phones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  max-width: 900px;
  margin-inline: auto;
  align-items: start;
}

.phone { margin: 0; }

/* --------------------------------------------------------------------------
   The handset
   -------------------------------------------------------------------------- */
.phone__frame {
  position: relative;
  aspect-ratio: 9 / 19.5;
  border-radius: 2.2rem;
  background: #0C1D30;              /* the bezel */
  padding: 0.55rem;
  box-shadow:
    0 2px 4px rgba(12, 29, 48, 0.10),
    0 18px 40px rgba(12, 29, 48, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.10);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.phone__frame:hover {
  transform: translateY(-6px);
  box-shadow:
    0 4px 8px rgba(12, 29, 48, 0.10),
    0 28px 60px rgba(12, 29, 48, 0.30),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

/* the notch sits above the screen, inside the bezel */
.phone__notch {
  position: absolute;
  top: 0.55rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 38%;
  height: 1.1rem;
  background: #0C1D30;
  border-radius: 0 0 0.7rem 0.7rem;
  pointer-events: none;
}

.phone__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.75rem;
  background: #000;
}

/* --------------------------------------------------------------------------
   Play button
   -------------------------------------------------------------------------- */
.phone__play,
.laptop__play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(12, 29, 48, 0.18);
  cursor: pointer;
  border-radius: 2.2rem;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}
.phone__play:hover,
.laptop__play:hover { background: rgba(12, 29, 48, 0.30); }

.phone__play svg,
.laptop__play svg {
  width: 3.25rem;
  height: 3.25rem;
  padding: 0.9rem;
  color: #0C1D30;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease;
}
.phone__play:hover svg,
.laptop__play:hover svg { transform: scale(1.08); background: #fff; }

/* once playing, the overlay is removed from the flow entirely */
.phone.is-playing .phone__play,
.laptop.is-playing .laptop__play { display: none; }
.phone.is-playing .phone__notch { opacity: 0; }

/* --------------------------------------------------------------------------
   Caption
   -------------------------------------------------------------------------- */
.phone__caption {
  margin-top: 1.5rem;
  text-align: center;
}
.phone__tag {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-accent);
  margin-bottom: 0.4rem;
}
.phone__text {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Responsive, two up on tablet, one up on phones. A phone mockup shown at
   ~110px wide is unreadable, so the grid drops columns early.
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; max-width: 560px; }
  .phone:last-child { grid-column: 1 / -1; justify-self: center; width: calc(50% - 1rem); }
}

@media (max-width: 560px) {
  .phones-section { padding: 70px 0 60px; }
  .phones { grid-template-columns: 1fr; max-width: 300px; gap: 2.5rem; }
  .phone:last-child { grid-column: auto; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .phone__frame, .phone__play svg,
.laptop__play svg { transition: none; }
  .phone__frame:hover { transform: none; }
}

/* ==========================================================================
   LAPTOP FRAME, landscape clip, sits above the phone row
   Drawn in CSS like the handsets: a 16:10 screen in a bezel, with a tapered
   base below it. Its own row, since a wide frame beside tall phones reads
   as a mistake rather than a composition.
   ========================================================================== */
.laptop {
  max-width: 820px;
  margin: 0 auto 4.5rem;
}

.laptop__screen {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0C1D30;
  padding: 0.7rem 0.7rem 0.9rem;
  border-radius: 0.9rem 0.9rem 0.35rem 0.35rem;
  box-shadow:
    0 2px 4px rgba(12, 29, 48, 0.10),
    0 22px 50px rgba(12, 29, 48, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.10);
  overflow: hidden;
}

.laptop__notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 16%;
  height: 0.62rem;
  background: #0C1D30;
  border-radius: 0 0 0.4rem 0.4rem;
  pointer-events: none;
}

.laptop__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.3rem;
  background: #000;
}

.laptop__play { border-radius: 0.9rem 0.9rem 0.35rem 0.35rem; }
.laptop.is-playing .laptop__notch { opacity: 0; }

/* the hinge/base: wider than the lid, with a small centre indent */
.laptop__base {
  position: relative;
  width: 112%;
  height: 0.85rem;
  margin-left: -6%;
  background: linear-gradient(180deg, #24384a 0%, #16283a 55%, #0C1D30 100%);
  border-radius: 0 0 0.7rem 0.7rem;
  box-shadow: 0 8px 18px rgba(12, 29, 48, 0.22);
}
.laptop__base::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 11%;
  height: 0.28rem;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 0 0 0.3rem 0.3rem;
}

.laptop__caption {
  margin-top: 1.6rem;
  text-align: center;
}

@media (max-width: 560px) {
  .laptop { margin-bottom: 3rem; }
  .laptop__screen { padding: 0.45rem 0.45rem 0.6rem; border-radius: 0.6rem 0.6rem 0.25rem 0.25rem; }
  .laptop__play { border-radius: 0.6rem 0.6rem 0.25rem 0.25rem; }
  .laptop__base { height: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .laptop__play svg { transition: none; }
}
