/* harryfilming — phone layout (≤760px). Loaded LAST on every page. Desktop untouched.
   Built 2 Dec 2026. Goal: every page reads like it was designed on a phone:
   verticals never wider than ~60% of the screen, media grouped into tight blocks, less scrolling. */
@media (max-width: 760px) {

  /* ---------- Header on phones (2 Dec): logo left (not on Home, the big wordmark is there), Menu button right ---------- */
  .site-header { justify-content: space-between !important; padding-left: 16px; padding-right: 12px; }
  .site-header .site-nav { display: none !important; }
  .site-header .mark { display: block !important; font-size: 19px; }
  body:has(.home-main) .site-header .mark { visibility: hidden; }
  .m-menu-btn {
    display: inline-flex; align-items: center; gap: 9px; margin-left: auto;
    font: 500 14px/1 var(--display); letter-spacing: .03em; color: #fff;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.55); border-radius: 999px;
    padding: 8px 13px 8px 15px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .m-menu-btn i { display: flex; flex-direction: column; gap: 4px; width: 18px; }
  .m-menu-btn i b { display: block; height: 2px; border-radius: 2px; background: currentColor; }
  /* the slide-out panel */
  .m-menu { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
  .m-menu__scrim { position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .3s; }
  .m-menu__panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(82vw, 340px); background: #0b0b0b;
    border-left: 1px solid rgba(255,255,255,.12); padding: 18px 26px 28px;
    display: flex; flex-direction: column; transform: translateX(100%); transition: transform .38s cubic-bezier(.2,.7,.2,1);
  }
  .m-menu.open { pointer-events: auto; }
  .m-menu.open .m-menu__scrim { opacity: 1; }
  .m-menu.open .m-menu__panel { transform: none; }
  .m-menu__close { align-self: flex-end; margin-bottom: 34px; }
  .m-menu nav { display: flex; flex-direction: column; gap: 6px; }
  .m-menu nav a {
    font: 600 34px/1.15 var(--display); letter-spacing: -.02em; color: #8a8a8a; text-decoration: none; padding: 4px 0;
  }
  .m-menu nav a[aria-current="page"] { color: #fff; }
  .m-menu nav a[aria-current="page"]::after { content: ' ·'; color: #fff; }

  /* Phones tap, no cursor: the viewfinder cursor (site.js) stays off at phone width, even with a mouse (e.g. the phone preview) */
  .vf-cur { display: none !important; }
  html.vf-cursor, html.vf-cursor * { cursor: revert !important; }

  /* ---------- Home ---------- */
  /* Phones intro: crop the 16:9 frame to a square. The two phones sit in the middle 36% of the frame,
     so the square keeps them whole and shows them ~1.8x bigger. */
  .home-reel .reel video { aspect-ratio: 12 / 13; object-fit: cover; }
  .home-reel .reel { border-radius: 10px; overflow: hidden; }
  .home-reel .sound-btn { position: absolute; left: 50%; right: auto; bottom: 6px; transform: translateX(-50%); margin: 0; font-size: 11px; padding: 6px 12px; }
  .home-main { padding-top: 84px; }                 /* header is 68px and fixed: keep the wordmark fully below it */
  .home-title h1 { font-size: clamp(34px, 11vw, 48px); }
  .home-title .sub { font-size: 11px; }
  .home-intro { margin-top: 26px; }
  .home-intro h2 { font-size: clamp(30px, 9vw, 40px); }
  .home-intro p { font-size: 15.5px; }
  .home-melt { height: clamp(280px, 52vh, 420px); }
  /* Story teaser: camera and copy side by side instead of stacked */
  .home-story { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: center; }
  .home-story__copy h2 { font-size: clamp(20px, 6vw, 26px); margin-bottom: 8px; }
  .home-story__copy p:not(.label) { font-size: 13.5px; line-height: 1.45; }
  .home-story__copy .cta { margin-top: 12px; font-size: 13px; }

  /* ---------- Stills: 2-column masonry (mobile.js places the photos), no full-width landscapes ---------- */
  .pg-grid.is-masonry { display: flex; gap: 8px; align-items: flex-start; }
  .pg-grid.is-masonry .pg-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
  .pg-grid.is-masonry .pg-item { grid-column: auto; grid-row: auto; }
  .pg-item figcaption { margin-top: 5px; font-size: 11px; }
  .pg-item figcaption span:last-child { font-size: 10px; }
  .pg-main { padding-top: 84px; }
  .pg-head { margin-bottom: 22px; }

  /* ---------- Case pages: shared ---------- */
  .case section { margin-bottom: 36px; }
  .case-head { margin-bottom: 14px !important; }
  .case-title { font-size: clamp(34px, 10vw, 44px); margin-bottom: 14px; }
  .case-reel__frame { border-radius: 8px; }
  .case .sound-btn, .ms-wrap .sound-btn, .nsc-item .sound-btn {
    left: auto; right: 6px; bottom: 6px; transform: none; font-size: 9.5px; padding: 5px 7px; gap: 6px; white-space: nowrap;
  }
  .case .sound-btn .dot { width: 6px; height: 6px; }
  /* any tile in the phone grids fills its box (tap still opens the full photo) */
  .case-top.m-grid a, .case-top.m-grid figure { margin: 0; min-width: 0; min-height: 0; aspect-ratio: auto !important; border-radius: 6px; overflow: hidden; }
  .case-top.m-grid a img { width: 100%; height: 100%; object-fit: cover; }
  .case-top.m-grid .case-reel__frame { height: 100%; }
  .case-top.m-grid video { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
  .case-top.m-grid .case-stills, .case-top.m-grid .photo-row { display: contents; }
  .case-top.m-grid { align-items: stretch; }
  /* lone vertical reels lower down: ~60% of the screen, centred */
  .case-row:not(.case-row--photo) > .case-reel { width: min(62%, 240px) !important; justify-self: center; order: 2; }
  .case-copy { gap: 18px; }
  .case-story h2 { font-size: 21px; }
  .case-story p { font-size: 15px; }
  .case-next { padding: 22px 16px 28px; }
  .case-next__name { font-size: 30px; }

  /* ---------- Drink Leuca top (v2, 2 Dec): reel ~45% wide (was 58%), photos packed round it in one rectangle.
     Row 1: the two portraits side by side · Row 2: the wide crowd shot · Row 3 (full width): the other three. ---------- */
  .case-top.m-leuca { display: grid; gap: 8px; grid-template-columns: repeat(22, minmax(0, 1fr)); grid-template-rows: auto auto 86px; }
  .m-leuca > .case-reel { grid-column: 1 / 11; grid-row: 1 / 3; width: auto !important; position: relative; }
  .m-leuca > .case-reel video { aspect-ratio: 9 / 16; height: auto; }
  .m-leuca .photo-row > a { position: relative; }
  .m-leuca .photo-row > a img { position: absolute; inset: 0; }
  .m-leuca .photo-row:first-child > a:nth-child(1) { grid-column: 11 / 17; grid-row: 1; }   /* portrait */
  .m-leuca .photo-row:nth-child(2) > a:nth-child(1)  { grid-column: 17 / 23; grid-row: 1; }   /* portrait */
  .m-leuca .photo-row:first-child > a:nth-child(3) { grid-column: 11 / 23; grid-row: 2; }   /* wide */
  .m-leuca .photo-row:first-child > a:nth-child(2) { grid-column: 1 / 8;   grid-row: 3; }
  .m-leuca .photo-row:nth-child(2) > a:nth-child(2)  { grid-column: 8 / 17;  grid-row: 3; }
  .m-leuca .photo-row:nth-child(2) > a:nth-child(3)  { grid-column: 17 / 23; grid-row: 3; }

  /* ---------- Nova Surf Festival top: reel + 2 portraits beside it, panorama + portrait, two drone shots ---------- */
  .case-top.m-fest { display: grid; gap: 8px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .m-fest > .case-reel { grid-column: 1 / 8; grid-row: 1 / 3; width: auto !important; }
  .m-fest > .case-reel video { aspect-ratio: 9 / 16; height: auto; }
  .m-fest .photo-row:first-child > :nth-child(1) { grid-column: 8 / 13; grid-row: 1; position: relative; }
  .m-fest .photo-row:first-child > :nth-child(2) { grid-column: 8 / 13; grid-row: 2; position: relative; }
  .m-fest .photo-row:first-child > :nth-child(1) img, .m-fest .photo-row:first-child > :nth-child(2) img { position: absolute; inset: 0; }
  .m-fest .photo-row:first-child > :nth-child(3) { grid-column: 1 / 10; grid-row: 3; aspect-ratio: 1.863 !important; }
  .m-fest .photo-row:first-child > :nth-child(4) { grid-column: 10 / 13; grid-row: 3; }
  .m-fest .photo-row:nth-child(2) > :nth-child(1) { grid-column: 1 / 7; grid-row: 4; aspect-ratio: 16 / 9 !important; }
  .m-fest .photo-row:nth-child(2) > :nth-child(2) { grid-column: 7 / 13; grid-row: 4; aspect-ratio: 16 / 9 !important; }

  /* ---------- Other projects top: reel left, the three 16:9 clips stacked right (fits exactly, no cropping) ---------- */
  .case-top.m-personal { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, auto); }
  .m-personal > .case-reel { grid-column: 1; grid-row: 1 / 4; width: auto !important; }
  .m-personal > .case-reel video { aspect-ratio: 9 / 16; height: auto; }
  .m-personal .case-reel--wide { grid-column: 2; aspect-ratio: 16 / 9 !important; align-self: center; }
  .ig-strip .ig-clip { width: calc(150px * var(--r)); }
  .case-cam { width: min(58%, 240px); }
  .case-story-link a { flex-direction: row; align-items: center; gap: 14px; }
  .case-story-link__line { font-size: 17px; }

  /* ---------- Nova Club top: 3 verticals in a row, then portrait + two 16:9 stacked (fits exactly) ---------- */
  .nsc-row { --g: 8px; gap: 8px; }
  .nsc-row > .nsc-item:nth-child(-n+3) { width: calc((100% - 16px) / 3); aspect-ratio: 9 / 16; }
  .nsc-row > .nsc-item:nth-child(4) { width: 43.9%; aspect-ratio: .7004; }
  .nsc-row > .nsc-stack { display: flex; flex-direction: column; gap: 8px; width: calc(56.1% - 8px); }
  .nsc-row .nsc-item--stack { width: 100%; aspect-ratio: 16 / 9; height: auto; }
  .nsc-merch__media { --h: 210px; --g: 8px; }

  /* ---------- Maple: all three reels in one row, drone full width, then the copy ----------
     The wrappers step aside (display: contents) so the reels can sit together on a 6-column grid. */
  .ms-wrap { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; align-items: start; }
  .ms-wrap > .back, .ms-wrap .ms-title, .ms-wrap .ms-drone, .ms-wrap .ms-copy { grid-column: 1 / -1; }
  .ms-top, .ms-band, .ms-lower, .ms-pair { display: contents; }
  .ms-wrap .ms-title { font-size: clamp(34px, 10vw, 44px); margin: 0 0 6px; }
  .ms-wrap .ms-r1, .ms-pair .case-reel { grid-column: span 2; width: auto !important; flex: none; order: 1; }
  .ms-wrap .ms-drone { width: 100%; order: 2; }
  .ms-wrap .ms-copy { order: 3; margin-top: 24px; }
  .ms-wrap > .back, .ms-wrap .ms-title { order: 0; }


  /* ---------- Nova Club + Festival: the photo of Harry sits beside Industry / Services / Period, under the write-up ---------- */
  .case-row--photo:has(.case-side) { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr) !important; gap: 20px 16px; align-items: center; }
  .case-row--photo:has(.case-side) > .case-copy { display: contents; }
  .case-row--photo:has(.case-side) .case-story { grid-column: 1 / -1; grid-row: 1; }
  .case-row--photo:has(.case-side) > .case-photo { grid-column: 1; grid-row: 2; max-width: none; margin: 0; }
  .case-row--photo:has(.case-side) .case-side { grid-column: 2; grid-row: 2; display: block; border-top: 0; padding-top: 0; }
  .case-row--photo:has(.case-side) .case-side div + div { margin-top: 14px; }

  /* ---------- Other projects: niche intro inside the write-up, same size as before ---------- */
  .case-inline-reel { width: min(58%, 240px); margin: 30px auto 34px; }
  .case-inline-reel .sound-btn { left: 50%; right: auto; transform: translateX(-50%); bottom: 8px; }

  /* ---------- Contact: whole computer on screen (screen + full keyboard), as big as the phone allows.
     First screen: contact list near the bottom, computer centred in the space above it. ---------- */
  .contact-main { padding-top: 68px; }
  .desk { padding-top: 0; display: flex; flex-direction: column; min-height: calc(100svh - 68px); }
  .desk__stage { width: calc(100vw - 12px); margin: auto; flex: none;
    transform-origin: 50.17% 34.27%;            /* centre of the screen (.crt) inside the photo */
    transition: transform .4s cubic-bezier(.2,.7,.2,1); }
  .contact-card { flex: none; margin: 0 auto 26px; transition: opacity .3s; }
  /* tap into a field: zoom onto the screen (mobile.js sets --z so the screen fills the width; dock stays in view) */
  .desk.is-zoomed .desk__stage { transform: scale(var(--z, 1.42)); position: relative; z-index: 5; }
  .desk.is-zoomed .contact-card { opacity: .12; }
  /* zoomed: the computer body drops into shadow so only the green screen is lit */
  .desk__computer { transition: filter .45s ease; }
  .desk.is-zoomed .desk__computer { filter: brightness(.22) saturate(.5); }
  /* smaller screen: trim the spacing inside it so step 1 fits above the icon dock (inputs stay 16px so iOS doesn't zoom) */
  .crt__inner { padding-top: 1cqw; padding-bottom: .4cqw; }
  .crt .field input { line-height: 1.05; }
  .crt .field { margin-bottom: 1.5px; }

  /* ---------- Work (cinema): carousel pulled up under "Take a seat." (cards same size), taller seats with 2 more rows ---------- */
  .work-main { --seats-old: clamp(120px, 22vh, 200px); --lift: 64px; --seats-h: calc(var(--seats-old) + var(--lift) + 50px); }
  .work-top { position: relative; z-index: 3; }
  .work-main .melt-stage, .work-main #melt-fallback {
    flex: none; height: calc(100svh - 118px - var(--seats-old) * .7);   /* same height as before = same card size */
    margin-top: calc(-1 * var(--lift)); margin-bottom: 0;
  }
  .work-hint .hint-mouse { display: none; }
  .work-hint .hint-touch { display: inline; }

  /* ---------- Story ---------- */
  .story-hero { min-height: 0 !important; height: auto !important; padding-top: 80px; padding-bottom: 24px; margin-bottom: 36px; }

}

/* Touch screens: no "dim everything else on hover" (a tap would leave the grid dimmed) */
@media (hover: none) {
  .pg-grid:hover .pg-item img, .case-stills:hover img, .nsc-row:hover a img, .nsc-merch__media:hover a img { filter: none; opacity: 1; }
}

/* Phone menu pieces never show on laptop */
@media (min-width: 761px) { .m-menu-btn, .m-menu { display: none !important; } }
