/* ==========================================================================
   MOBILE: phones get the same motion as desktop.
   Loaded last. To undo, delete the <link ... css/mobile.css> line in index.html.
   ========================================================================== */

/* ---------- Work: the Orbit view works on phones too ---------- */
@media (max-width: 860px) {
  .work-orbit { height: 640px; margin: 4px -18px 0; }
  .orbit-name, .orbit-dur { display: none; }
  .orbit-thumb { width: 40px; height: 28px; border-radius: 6px; }
  .orbit-dot { width: 7px; height: 7px; }
  .orbit-item.is-active .orbit-thumb { transform: scale(1.3); }
  .orbit-frame { width: 132px; height: 234px; border-radius: 14px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent), 0 24px 50px -22px color-mix(in srgb, var(--accent) 80%, #000); }
  .orbit-preview[data-fmt="h"] .orbit-frame { width: 190px; height: 107px; }
  .orbit-cap { margin-top: 10px; max-width: 200px; margin-left: auto; margin-right: auto; }
  .orbit-cap b { font-size: .8rem; }
  .orbit-cap i { font-size: .66rem; }
  .orbit-hint { font-size: .72rem; padding: 0 20px; bottom: 6px; }
  .work-bar { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 18px; }
  .work-bar .work-view { order: -1; align-self: flex-start; }
  .work-bar .work-filters { margin-bottom: 0; }
}

/* ---------- Reel: the editor's floating labels, cursors, tool strip and trim handles stay on ---------- */
@media (max-width: 720px) {
  .reel-stage { padding: 30px 0 34px; }
  .reel-chip { font-size: .72rem; padding: 6px 11px; gap: 6px; }
  .reel-chip svg { width: 13px; height: 13px; }
  .reel-chip--b { display: inline-flex; top: 0; right: 12px; }
  .reel-chip--c { display: inline-flex; bottom: 0; left: 12px; }
  .reel-cursor { display: block; width: 20px; height: 20px; }
  .reel-cursor--a { top: 22px; left: 96px; }
  .reel-cursor--b { top: 22px; right: 150px; }
  .reel-handles { display: block; inset: 8px; }
  .reel-handles i { width: 6px; height: 6px; }
  .reel-handles i:nth-child(1) { top: -3px; left: -3px; }
  .reel-handles i:nth-child(2) { top: -3px; right: -3px; }
  .reel-handles i:nth-child(3) { bottom: -3px; left: -3px; }
  .reel-handles i:nth-child(4) { bottom: -3px; right: -3px; }
  .reel-body { flex-direction: column; gap: 10px; }
  .reel-tools { display: flex; flex-direction: row; align-self: flex-start; gap: 2px; padding: 4px; border-radius: 12px; }
  .reel-tool { width: 30px; height: 30px; border-radius: 9px; }
  .reel-transport { flex-wrap: wrap; row-gap: 6px; }
  .reel-note { display: block; margin-left: 0; flex-basis: 100%; font-size: .72rem; order: 9; }
}

/* ---------- Touch: no hover on phones, so a press gets the same lift the pointer hover gives ---------- */
@media (hover: none) {
  /* Tools dock: pressing an icon magnifies it and its neighbours, like the pointer does on desktop */
  .dock-item:active .mac-icon { transform: scale(1.48); }
  .dock-item:active + .dock-item .mac-icon, .dock-item:has(+ .dock-item:active) .mac-icon { transform: scale(1.24); }
  .dock-item:active + .dock-item + .dock-item .mac-icon, .dock-item:has(+ .dock-item + .dock-item:active) .mac-icon { transform: scale(1.1); }
  .dock-item:active .tool-name { opacity: 1; transform: translate(-50%, -34px); }
  body[data-theme="dark"] .dock-item:active .mac-icon { box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), inset 0 1px 0 rgba(255,255,255,.3), 0 18px 28px -8px rgba(160, 80, 200, 0.55); }
  .about-card, .pt-row, .work-tile-btn, .social-btn, .btn, .work-filter, .work-more-btn { -webkit-tap-highlight-color: transparent; }
  .about-card:active { transform: translateY(-3px); border-color: var(--border-strong); }
  .pt-row:active { background: rgba(255,255,255,.03); }
  .work-tile-btn:active { transform: scale(.97); }
  .social-btn:active { transform: translateY(-3px) scale(1.04); border-color: rgba(180,107,199,.7); box-shadow: 0 12px 26px -10px rgba(160,80,200,.6); }
  .btn:active { transform: scale(.97); }
  .work-tile-btn, .about-card, .btn, .social-btn { transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease; }
}

/* ---------- Layout fixes for small phones ---------- */
@media (max-width: 600px) {
  /* wider content: less padding inside the big cards */
  .section { margin: 0 12px 16px; padding: 56px 18px; }
  .first-card { margin: 8px 12px 16px; }
  .work-orbit { height: 560px; margin: 4px -18px 0; }
  /* the Tools dock: no stray divider at the end of a row */
  .dock-sep { display: none; }
  .dock { justify-content: center; }
  /* About: the photo caption card is smaller so it doesn't cover the whole photo */
  .about-card--4 { left: 12px; right: 12px; bottom: 12px; padding: 14px 16px 16px; }
  .about-card--4 h3 { font-size: 1.05rem; }
  .about-card--4 p { font-size: .82rem; line-height: 1.5; }
  .about-card--4 .about-card-num { margin-bottom: 2px; }
  .about-photo-card { min-height: 420px; }
}
@media (max-width: 720px) {
  /* Reel labels: smaller, tucked to the corners so they never collide */
  .reel-chip { font-size: .68rem; padding: 5px 10px; }
  .reel-chip--a { left: 8px; }
  .reel-chip--b { right: 8px; }
  .reel-chip--c { left: 8px; }
  .reel-cursor--a { left: 78px; top: 20px; }
  .reel-cursor--b { display: none; }
}
