/* lucent-qa 2026-11-27 — phone hero + top bar (Pete 3:03–3:04 AM PST, iPhone shot App-Developer/pete-phone-hero-0304.png):
   "put the menu on the right hand side on the phone and dont include a play button on phone it doesnt need to auto play on phone"
   Loaded last on the home page only; touches the top bar, the hero and the fixed full-screen layers, nothing in #clients / #press. */

/* iOS URL bar: fixed full-screen layers sized to the LARGE viewport, so they do not resize on every frame while the bar
   hides on the first scroll (the hero "jump"). main.js lays their contents out to the same height (VH()). */
@media (pointer: coarse) {
  .hero-loop, .still, #vision, .dawn, .lbox { bottom: auto; height: 100lvh; }
}

@media (max-width: 760px) {
  /* top bar: logo left · Propose · sound · menu at the far right. No "Play the show" on phones (the page just scrolls). */
  .topbar .playshow, .topbar .keys, .topbar .esc-hint { display: none !important; }
  .topbar .pages { margin-left: auto; }
  .topbar .tools { order: 3; margin-left: 8px; }
  .topbar .m-menu { order: 4; margin: 0 0 0 8px; }
  /* the menu's side is ONE switch: <header class="topbar" data-menu-side="right|left"> (Pete 3:04 said right, 3:20 'left'
     — app-developer is asking him; right until he answers) */
  .topbar[data-menu-side="left"] .m-menu { order: -1; margin: 0 10px 0 0; }
  .topbar[data-menu-side="left"] .m-menu nav { right: auto; left: -4px; }
  .topbar .m-menu summary { width: 44px; height: 40px; }                     /* tap target ≥ 44 px wide */

  /* the menu opens from the right edge as a solid panel, above everything (the Concept Render tag sat on PRESS) */
  .topbar:has(.m-menu[open]) { z-index: 60; }
  .topbar .m-menu nav { right: -4px; width: min(86vw, 340px); background: #0b0907; border-color: rgba(232,196,122,.5); box-shadow: 0 18px 40px rgba(0,0,0,.7); }
  .topbar .m-menu nav a { padding: 16px 22px; }
  html:has(.m-menu[open]) .concept-tag { opacity: 0 !important; }

  /* hero: the eyebrow is one clean, fully legible line above the quote (it was wide-tracked onto two lines) */
  .hero-eyebrow { letter-spacing: .16em; font-size: 10px; line-height: 1.4; color: var(--fg); margin: 18px 0 14px; text-wrap: balance; }

  /* hero ends cleanly: copy centred (no 9vh lift leaving a dark band under SCROLL), no half-dial medallions cut by the caption */
  .hero-copy { transform: none; }
  .hero { min-height: 100svh; }                                             /* no 20vh pin of an empty band before the press */
  html.in-hero .calrail { opacity: 0 !important; }
  /* hero -> press: the hero words leave with the hero backdrop, instead of lying over the press photos and the temple
     backdrop for ~150px of scroll (measured double exposure at y 300-400) */
  #home .hero-copy { transition: opacity .35s ease; }
  html:not(.in-hero) #home .hero-copy, html:not(.in-hero) #plabel { opacity: 0 !important; }
}
/* Pete 3:20 AM: no photo credits on phone. Hero / 3D-scene credits are these two (lucent-dossier does #clients/about/worlds). */
@media (max-width: 700px) { #vlabel, #plabel { display: none !important; } }

/* phones: soft presentation photographs in the black bands (main.js FILL, Pete 2026-11-27 3:55 AM PST) */
@media (max-width: 760px) {
  .ph-fill { position: absolute; left: 0; right: 0; pointer-events: none; background: center / cover no-repeat; mix-blend-mode: screen; opacity: .85;
    -webkit-mask-image: radial-gradient(ellipse 78% 60% at 50% 50%, #000 52%, transparent 100%); mask-image: radial-gradient(ellipse 78% 60% at 50% 50%, #000 52%, transparent 100%);
    animation: phDrift 38s ease-in-out infinite alternate; }
  .ph-end { bottom: 0; height: 80svh; }
  .ph-start { top: 0; height: 80svh; }
  .vis-up .ph-pin { opacity: 0; transition: opacity .4s; }   /* the chapter's own photograph is up: no second picture under it */
  .ph-pin { bottom: 0; height: 52%; z-index: -1; opacity: .7; }
  @keyframes phDrift { from { background-position: 42% 50%; transform: scale(1.04); } to { background-position: 58% 50%; transform: scale(1.1); } }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) { .ph-fill { animation: none; } }

/* one layer of text at a time on phones (app-developer 2026-11-27): copy that scrolls under the fixed chrome is hidden by
   a solid back, and the hint pill and spin arrows step aside (main.js wheels: hint-covered / .spin-arrow.covered) */
@media (max-width: 760px) {
  .topbar.scrolled { background: linear-gradient(180deg, #020c0c 0, #020c0c 78%, rgba(2,12,12,0) 100%); }
  .secnav .sn-toggle { background: #020e0e; }
  html.hint-covered .spin-hint { opacity: 0 !important; animation: none; }
  .spin-arrow.covered { opacity: 0 !important; pointer-events: none !important; }
}
/* app-developer 133630Z: every subpage (body.lp) gets the same phone header as home: page links in the right-hand menu,
   only Contact stays inline (pages.css:17 re-showed them for subpages, which pushed Contact off the right edge) */
@media (max-width: 760px) {
  body.lp .topbar .pages a:not(.propose) { display: none; }
  body.lp .topbar .pages { margin-left: auto; margin-right: 0; }
  body.lp .topbar .pages a.propose { padding: 7px 10px; letter-spacing: .18em; font-size: 10px; }
}

/* lucent-qa home crawl (app-developer 140250Z): the sound toggle was a 36 x 34 px target beside the 44 px menu; same size now */
@media (max-width: 760px) {
  .topbar .sound.icon { width: 44px; height: 40px; }
}

/* lucent-qa final regression (app-developer 171735Z): on the light pages the bar's .95/.88 soot let the bright parchment card
   titles read through behind the logo and Contact (acts, 390 + 430). Opaque soot, then a short fade. temple.css keeps its own. */
body.lp .topbar { background: linear-gradient(180deg, rgb(22,10,6) 0, rgb(22,10,6) 84%, rgba(22,10,6,0) 100%); }

/* tap targets ≥ 44 px on every page header and button (the /videos/ check measured 26-43 px) */
@media (max-width: 760px) {
  .topbar .m-menu summary { height: 44px; }
  .topbar .m-menu nav a { min-height: 44px; display: flex; align-items: center; box-sizing: border-box; }
  .topbar .pages a.propose { display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; }
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
}

/* lucent-dossier crawl 2026-11-27 (#105/#96): the phone tap targets still under 44 px (webkit 390 measured 10-34 px).
   Blocks grow to 44; links inside a line of text get a taller hit area without moving the text (padding + equal negative margin). */
@media (max-width: 760px) {
  .lp-foot nav { gap: 0 14px; }
  .lp-foot a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
  .secnav .sn-toggle { min-height: 44px; box-sizing: border-box; }
  .secnav ol a { min-height: 44px; box-sizing: border-box; display: flex; align-items: center; }
  #cat-list a { display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; }
  .process a { min-height: 44px; }
  .vol-more { min-height: 44px; padding: 4px 14px; }
  .topbar .sound.icon { height: 44px; }
  /* WebKit draws a native select at its own 27 px and ignores padding/min-height: draw it ourselves */
  #propose select, .lp select { -webkit-appearance: none; appearance: none; min-height: 44px; box-sizing: border-box; padding: 10px 38px 10px 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236a3d28' stroke-width='1.8'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: right 14px center !important; }
  .t-els span, #interests span, form label:has(> input[type=checkbox]) > span { display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; }
  #coverage li a { display: inline-flex; align-items: center; min-height: 44px; }
  .contact-card .who a, .contact-card .foot-links a, .cl-temple a, .lp figcaption a { display: inline-block; padding: 16px 8px; margin: -16px -8px; }
}

/* app-developer crawl (phone): the four "How a production is made" cards were two ~150 px columns of cramped text; one column on phones */
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
/* #242: the Sections pill slides out while reading downward (secnav.js) */
@media (max-width: 760px) { .secnav { transition: transform .35s cubic-bezier(.3,.6,.3,1), opacity .3s; } .secnav.sn-hide { transform: translateY(140%); opacity: 0; pointer-events: none; } }
@media (max-width: 760px) and (prefers-reduced-motion: reduce) { .secnav { transition: none; } }

/* #243 fm-ux-mobile pass (223758Z) */
.secnav[hidden] { display: none !important; }                                              /* F03: no empty Sections */
#propose > *, #propose label.f, #propose fieldset { min-width: 0; }                         /* F04: fields inside the card */
#propose input:not([type="checkbox"]):not([type="radio"]), #propose select, #propose textarea { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
#propose input[type="date"] { -webkit-appearance: none; appearance: none; min-height: 47px; }
input, select, textarea { scroll-margin-top: 120px; }                                      /* F05: a bad field lands below the header */
@media (max-width: 760px) {
  html.has-secnav main:not(:has(> .ch)) { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }   /* F01: last CTA clears the pill */
  dialog.sheet .sheet-x, dialog.sheet .sg-nav { width: 44px; height: 44px; }               /* F08 */
  #press .press-marks { row-gap: 20px !important; }                                               /* F10: 44 px hit areas, chips unchanged */
  #press .press-marks .pm-btn::before { inset: -10px -5px !important; }
  .secnav ol { background: #031212; box-shadow: 0 -10px 30px rgba(0,0,0,.6); }            /* F16 */
  html:has(.m-menu[open])::after { content: ''; position: fixed; inset: 0; z-index: 59; background: rgba(0,0,0,.45); }   /* F07 scrim */
  #work .reading-date { position: relative; z-index: 3; display: inline-block; padding: 4px 12px; background: rgba(6,4,3,.78); }   /* F13 */
  #work .arrive > .eyebrow { position: relative; z-index: 3; width: fit-content; margin-left: auto; margin-right: auto; padding: 3px 10px; background: rgba(6,4,3,.78); color: var(--gold) !important; }   /* F13 P2: the BOOKINGS kicker gets the same backing */
  .t-door-copy .eyebrow { text-shadow: 0 0 10px #000, 0 1px 3px #000, 0 0 2px #000; }   /* F14 */
  .press-reader .pr-shot img { cursor: zoom-in; }                                          /* F06: tap the page to read it */
  .press-reader .pr-shot.zoom { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .press-reader .pr-shot.zoom img { width: 250%; max-width: none; cursor: zoom-out; }
  .press-reader .pr-shot:not(.zoom)::after { content: 'Tap the page to enlarge it'; display: block; padding: 6px 2px 0; font: 500 12px/1.3 var(--sans); letter-spacing: .08em; color: rgba(234,214,173,.75); }
}
@media (orientation: landscape) and (max-height: 500px) {                                  /* F09: a turned phone gets a full-height film */
  .vl-box-in { width: calc(100vw - 24px); }
  .vl-frame { max-height: calc(100dvh - 16px); width: min(100%, calc((100dvh - 16px) * var(--r, 16/9))); }
  .vl-cap { display: none; }
  .vl-x { top: 4px; right: 4px; z-index: 3; background: rgba(0,0,0,.6); }
}
/* #243: on phones the press photo hit-area (fixed, z 6) lay over the press card, so tapping VOGUE opened a photo instead
   of the quote. It now ends where the card starts (press.js sets --press-t). */
@media (max-width: 760px) { .spin-hit[data-ch="press"] { top: 64px !important; height: max(0px, calc(var(--press-t, 100vh) - 64px)) !important; } }
/* #243 fm-ux-mobile F12: no reading text under 11 px on phones (overlines, card labels, form labels, credits, the Sections list) */
@media (max-width: 760px) {
  .eyebrow, .w-open, .secnav, .disciplines li, #propose label.f, .face small, #quotes figcaption, .t-hall figcaption, .t-hall p.el, .t-hall a,
  #timeline small, .hero-sound, .sound .vh, .topbar a.propose, .secnav .sn-toggle, .perfect-photo span, .is-wrap figcaption, .footnote,
  .contact-card .music, .glow-cue em, .spin-hint { font-size: 11px !important; }
}
/* #159 phone pass (lucent-dossier 5:29 PM PST 11-30): bigger tap areas + legible temple eyebrow */
@media (max-width: 760px) {
  #press .press-marks .pm-btn::before { inset: -16px -6px !important; }
  a[href^="mailto:"] { display: inline-block; padding-block: 12px; margin-block: -12px; }
}
.t-door-copy .eyebrow { text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 0 14px rgba(0,0,0,.75); }
@media (max-width: 760px) { .t-door-copy .eyebrow { display: inline-block; padding: 4px 10px; background: rgba(8,6,20,.72); border-radius: 2px; } }
/* #159-5: the play HUD sat over each page's own bottom controls (Open article, carousel arrows); on phones it rides under the top bar */
@media (max-width: 760px) { .hud { top: calc(env(safe-area-inset-top, 0px) + 70px); bottom: auto; } }
/* #159 re-pass nit: page text scrolling under the HUD showed through it; give the HUD its own solid plate */
@media (max-width: 760px) { .hud { padding: 8px 12px; background: rgba(9,5,14,.94); border: 1px solid rgba(232,196,122,.28); border-radius: 2px; color: #e9dcc0; box-shadow: 0 2px 14px rgba(0,0,0,.6); } .hud:empty { display: none; } }
/* #159-7: the client names and festivals line read faint on the bright stained glass behind #clients (phone, Play end ~50 s) */
@media (max-width: 760px) {
  #clients .guests .cl-names, #clients .guests .cl-more { background: rgba(8,6,20,.74); padding: 8px 12px; border-radius: 2px; text-shadow: 0 1px 2px rgba(0,0,0,.9); }
  #clients .guests .cl-more { color: #e8dcc0; margin-top: 6px; }
}
@media (max-width: 760px) { #clients .cl-temple a:not(.secret-door) { text-shadow: 0 1px 2px #000, 0 0 10px rgba(0,0,0,.9), 0 0 18px rgba(0,0,0,.7); } }
/* portrait tablets (761 px+ and taller than wide, e.g. iPad 820x1180): the right-hand chapter rail's labels ran across
   the chapter cards and the "swipe to spin" hint sat on the card's button (QA 12-03). Phones already drop the rail;
   portrait tablets do too, and the hint rides at the very foot of the screen, under the cards. */
@media (min-width: 761px) and (max-aspect-ratio: 1/1) {
  .rail { display: none !important; }
  .spin-hint { left: 50% !important; top: auto; bottom: max(10px, env(safe-area-inset-bottom)) !important; transform: translateX(-50%); }
}
