/* play.css — styles used only by play.html ("Fun — Alaa Adil"). */

:root {
  --gap: 12px;
}

/* ── Layout — persistent left sidebar, identical position/sizing
   to the home page's and case studies' sidebar. ── */
.case-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Content column ── */
.content-col {
  flex: 1;
  min-width: 0;
  /* side padding (max 120px) shrinks first on narrower screens */
  padding: 60px clamp(48px, calc((100vw - var(--sidebar-total) - 1046px) / 2), 120px) 0;
}

/* ── Play intro ── */
.play-intro { margin-bottom: 0; }
.play-intro-title {
  font-family: "Geist Sans", "Inter", sans-serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 0.01em;
  line-height: 1.4;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.play-intro-body {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  line-height: 1.5;
  color: var(--text-muted);
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Project masonry — same two-column layout as the home page's
   feed, reused here (per Figma node 717:7769). ── */
.projects-list {
  padding-top: 40px;
  padding-bottom: 80px;
  display: flex;
  flex-direction: row;
  gap: var(--gap);
  align-items: flex-start;
  animation: fadeUp 400ms ease-out both;
}
.projects-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.project-entry-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.project-entry-title {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-transform: capitalize;
  color: var(--text-muted);
}
.project-entry-media {
  border-radius: 0;
  overflow: hidden;
  position: relative;
  width: 100%;
  background: var(--line);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.project-entry-link:hover .project-entry-media { transform: scale(0.995); }
.project-entry-media img, .project-entry-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Skeleton shimmer ── */
.skeleton {
  position: absolute;
  inset: 0;
  background: var(--line);
  overflow: hidden;
  z-index: 2;
  transition: opacity 0.4s ease;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
  animation: skeleton-shimmer 1.6s infinite;
}
.skeleton.hidden {
  opacity: 0;
  pointer-events: none;
}
@keyframes skeleton-shimmer {
  100% { transform: translateX(200%); }
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0;
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 5px;
  background: var(--page);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--strong);
  font-size: 20px;
  transition: background-color 150ms;
}
.lightbox-close:hover { background: var(--soft); }

/* ── Project Modal (Mental Pictures) ── */
.project-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.project-modal.open {
  display: flex;
  animation: modalFadeIn 0.35s cubic-bezier(0.34, 1.06, 0.64, 1) both;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.project-modal-window {
  position: relative;
  width: 100%;
  max-width: 1080px;
  height: 85vh;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 0.5px rgba(255,255,255,0.12);
  animation: modalScaleIn 0.35s cubic-bezier(0.34, 1.06, 0.64, 1) both;
}
@keyframes modalScaleIn {
  from {
    transform: scale(0.94);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.project-modal-window iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.project-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 5px;
  background: var(--page);
  border: 1px solid var(--soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--strong);
  z-index: 10;
  transition: background-color 150ms;
}
.project-modal-close:hover { background: var(--soft); }
@media (max-width: 1100px) {
  /* ── Responsive ── */
  .content-col { padding: 48px 48px 0; }
}

@media (max-width: 900px) {
  .case-layout { flex-direction: column; }
  .content-col { padding: 32px 20px 0; }
  .projects-list {
    flex-direction: column;
    gap: 40px;
  }
}

/* Mobile bottom sheet */
.mobile-sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 3000;
  align-items: flex-end;
}
.mobile-sheet-overlay.open {
  display: flex;
  animation: sheetFadeIn 0.25s ease both;
}
@keyframes sheetFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.mobile-sheet {
  width: 100%;
  background: var(--paper);
  border-radius: 0;
  padding: 28px 24px 40px;
  animation: sheetSlideUp 0.35s cubic-bezier(0.34, 1.06, 0.64, 1) both;
}
@keyframes sheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.mobile-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--line);
  border-radius: 0;
  margin: 0 auto 20px;
}
.mobile-sheet-icon {
  width: 44px;
  height: 44px;
  background: var(--line);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.mobile-sheet h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.mobile-sheet p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.mobile-sheet-btn {
  width: 100%;
  padding: 14px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: "Inter", sans-serif;
}

/* Chat open (desktop): the 420px chat column takes its space from the
   side padding first, so the content only narrows slightly instead of
   shrinking to half. Animates in step with the panel. */
.content-col { transition: padding var(--panel-duration) var(--panel-ease); }
@media (min-width: 901px) {
  body.chat-open .content-col { padding-left: 48px; padding-right: 48px; }
}
