/* ============================================================
   Phone layout (chosen 2026-10-18 from demos: "A" = headline top, story bottom).
   Hero art placement for phones lives in scenes.js (`mob` per layer).
   Targets iPhone 15 Pro (393 × 659 visible in Safari) and Pro Max (430 × 739).
   ============================================================ */
@media (max-width: 600px) {
  .lens { display: none; }   /* phones never show the cursor dot (also hides it in the desktop viewer) */

  /* ---------- header: compact, and a quiet bar once the hero is left ---------- */
  .hdr { padding: 14px 16px; transition: background .5s var(--ease), padding .5s var(--ease); }
  .hdr-l { height: 36px; gap: 18px; }
  .logo { font-size: 19px; }
  .lang { font-size: 11px; gap: 4px; }
  .hdr .btn-line { height: 34px; gap: 12px; padding: 0 11px 0 12px; font-size: 11px; letter-spacing: .02em; }
  .hdr .btn-line svg { width: 10px; height: 10px; }
  .hdr.is-scrolled {
    padding-top: 10px; padding-bottom: 10px;
    background: rgba(8,8,8,.72); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  }
  .hdr.is-scrolled .btn-line { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

  /* ---------- hero copy, shared ---------- */
  .copy { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 0 20px; }
  .hl { font-size: clamp(36px, 10vw, 46px); line-height: .9; }
  .hl em { font-size: .48em; }
  .side { max-width: none; gap: 0; padding: 0; }
  .side p { font-size: 14.5px; line-height: 1.45; color: rgba(252,252,252,.88); max-width: 34ch; }
  .side .btn-line { display: none; }
  .deck-ui { height: 64px; padding: 0 12px 0 20px; }
  .count { font-size: 12px; } .count b { font-size: 14px; }
  .arrows { height: 42px; } .arrows button { width: 46px; }

  /* headline under the header, story above the counter */
  .copy { justify-content: space-between; padding-top: 88px; padding-bottom: 76px; }
  .shade { background:
      linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.18) 26%, transparent 38%),
      linear-gradient(0deg, rgba(0,0,0,.66) 0%, rgba(0,0,0,.3) 18%, transparent 30%); }

  /* ---------- manifesto ---------- */
  /* the corner cards stay clear of the header */

  /* ---------- section heads ---------- */
  .big { font-size: clamp(34px, 9.6vw, 44px); }
  .cap-list h3 { font-size: clamp(30px, 8.6vw, 40px); }
  .cap-list p { font-size: 16px; }
  .faq-list .q { font-size: 16px; }
  .cta-hl { font-size: clamp(46px, 13.5vw, 60px); }
}

/* 2026-11-12: frosted panel on phones: lighter blur, and none once the tint is solid (main.js) */
@media (pointer: coarse) {
  .zoom { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .zoom.noblur { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* 2026-11-12: Selected work lands with its title clear of the (now solid) nav bar */
@media (max-width: 760px) {
  .sw .o { padding-top: 92px !important; }
}

/* 2026-11-12: phone hero v2 — the UFO scene's field strip is lifted (scenes.js), grass colour fills the gap under it */
@media (max-width: 600px) and (orientation: portrait) {
  #spSets img[src*="man-field"] { box-shadow: 0 70px 0 0 rgb(19,22,19), 0 140px 0 0 rgb(19,22,19), 0 210px 0 0 rgb(19,22,19); }
  /* the fill sits below the strip's box, so the exit (sized to the box) left it hanging at the top of the next
     scene for a second = the black box behind the headline. Leaving sets (.lv, index.html) drop it at once. */
  #spSets .lv img[src*="man-field"], #spSets .set:not(.on) img[src*="man-field"] { box-shadow: none; }
  /* its lower half is near-black grass, so sliding out it read as a black bar over the next scene: fade it as it leaves */
  #spSets img[src*="man-field"] { transition: opacity .3s ease; }
  #spSets .lv img[src*="man-field"] { opacity: 0; }
}

/* 2026-11-12: no filter layer on the hero backgrounds on touch screens (see scenes.js NOFX) */
@media (pointer: coarse) {
  .sp .bg.on .mv { will-change: transform; }
}

/* 2026-11-12: while the phone reveal / hard stop freezes the page (body fixed, index.html), the hero and the
   panel would redraw as if scrolled to the top behind the work: keep them hidden for those few hundred ms */
html.kw-frozen .worlds, html.kw-frozen #zoom { visibility: hidden; }

/* 2026-11-12 v5: phone work mode — everything above Selected work leaves the layout (index.html enterWork) */
html.kw-work main > *:not(#work):not(#showcase):not(#faq):not(#cta):not(script):not(#zoom) { display: none !important; }
html.kw-work:not(.kw-dive) #zoom { display: none !important; }
html.kw-work #work { margin-top: 0 !important; }

/* 2026-11-12 v6: phone panel transition played by time (index.html): the panel is fixed over the still page */
html.kw-dive #zoom { display: block !important; position: fixed !important; inset: 0 !important; height: 100vh !important; height: 100svh !important;
  margin: 0 !important; z-index: 8000; pointer-events: none; will-change: transform; border-radius: 0; }
html.kw-dive #zoom .zoom-pin { position: absolute; inset: 0; height: auto; }
