/* Phone art direction. The same URLs adapt to the viewport; desktop stays intact. */
@media (max-width: 820px), (max-width: 1000px) and (max-height: 520px) and (pointer: coarse) {
  :root {
    --header-h: 76px;
    --gutter: clamp(18px, 5.2vw, 30px);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --page-left: max(var(--gutter), env(safe-area-inset-left, 0px));
    --page-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  }
  html { scroll-padding-top: calc(var(--header-h) + var(--safe-top) + 20px); }
  body { -webkit-text-size-adjust: 100%; }
  button, a { touch-action: manipulation; }
  a:focus-visible, button:focus-visible { outline-offset: 3px; }
  .home-page .site-header {
    height: calc(var(--header-h) + var(--safe-top));
    min-height: 0;
    padding: calc(12px + var(--safe-top)) var(--page-right) 12px var(--page-left);
    gap: 12px;
  }
  .home-page .brand b { font-size: 1.65rem; }
  .home-page .brand small { font-size: .6rem; letter-spacing: .12em; }
  .home-page .menu-toggle {
    display: block; flex: 0 0 48px; width: 48px; height: 48px;
    border: 1px solid #ffffff40; border-radius: 50%; padding: 13px;
  }
  .menu-toggle span { transition: transform .3s, opacity .3s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .home-page .site-header.menu-open { background: #0b0c0e; border-color: #ffffff26; backdrop-filter: none; }
  .home-page .header-panel {
    position: fixed; inset: calc(var(--header-h) + var(--safe-top)) 0 0;
    height: calc(100dvh - var(--header-h) - var(--safe-top));
    display: none; padding: 30px var(--page-right) calc(28px + var(--safe-bottom)) var(--page-left);
    background: #0b0c0e; border: 0; overflow-y: auto; overscroll-behavior: contain;
  }
  .home-page .header-panel.open { display: flex; flex-direction: column; align-items: stretch; gap: 32px; animation: mobile-menu-in .28s ease both; }
  .home-page .main-nav { display: flex; flex-direction: column; gap: 0; counter-reset: mobile-nav; }
  .home-page .main-nav a {
    display: flex; align-items: baseline; gap: 18px; padding: 20px 0;
    border-bottom: 1px solid #ffffff26; font: 400 clamp(2.3rem, 10vw, 4rem)/1.15 var(--font-display);
    letter-spacing: -.025em; color: #f7f6f2;
  }
  .home-page .main-nav a::before {
    counter-increment: mobile-nav; content: '0' counter(mobile-nav);
    font: 400 .75rem/1 var(--font-ui); color: #b4b5ae; letter-spacing: .05em;
  }
  .home-page .header-panel .language-switcher { margin-top: auto; gap: 12px; }
  .home-page .header-panel .language-switcher button { min-width: 56px; min-height: 48px; border: 1px solid #ffffff26; }
  html.menu-open { overflow: hidden; }
  body.menu-open { position: fixed; width: 100%; overflow: hidden; }
  @keyframes mobile-menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

  .home-page .cinema-hero {
    min-height: 560px; height: 100svh; max-height: 1100px;
    padding: calc(var(--header-h) + var(--safe-top) + 24px) var(--page-right) calc(20px + var(--safe-bottom)) var(--page-left);
    display: flex; flex-direction: column;
  }
  .home-page .cinema-frame { position: absolute; inset: 0; width: 100%; aspect-ratio: auto; z-index: -1; }
  .home-page .cinema-frame img { object-fit: cover; object-position: 54% center; }
  .home-page .hero-topline { order: 0; }
  .home-page .hero-topline > span { display: none; }
  .home-page .hero-kicker { font-size: .6875rem; letter-spacing: .13em; }
  .home-page .cinema-copy { order: 1; padding: 36px 0 0; margin: auto 0 0; }
  .home-page .cinema-copy h1 { font-size: clamp(2.6rem, 12vw, 5.5rem); line-height: 1.08; max-width: 100%; white-space: nowrap; }
  .home-page .cinema-copy h1 .hero-surname { display: inline; margin-left: .12em; }
  .home-page .cinema-copy > p { font-size: .6875rem; letter-spacing: .08em; max-width: 29ch; margin: 0 0 16px; line-height: 1.6; }
  .home-page .hero-explore { margin-top: 18px; min-height: 48px; gap: 34px; padding: 10px 0; font-size: .875rem; }
  .home-page .hero-bottom { order: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-top: 24px; padding-top: 14px; }
  .home-page .hero-credit { display: grid; min-width: 0; gap: 4px; }
  .home-page .hero-credit > span { font-size: .625rem; letter-spacing: .05em; }
  .home-page .hero-credit > b { font-size: .75rem; line-height: 1.35; max-width: 15ch; }
  .home-page .hero-controls { gap: 4px; }
  .home-page .hero-controls button { width: 44px; height: 44px; min-height: 44px; font-size: .6875rem; padding-bottom: 9px; }
  .home-page .hero-controls button[data-frame]::before, .home-page .hero-controls button i { bottom: 4px; width: 32px; }
  .home-page .hero-controls #heroPause { width: 44px; height: 44px; min-height: 44px; margin-left: 0; }
  .home-page .hero-shade { display: block; background: linear-gradient(180deg, #0008, transparent 28%, #0003 40%, #000b 74%, #000e); }

  .selected-frames { padding: 58px 0 36px; }
  .frames-heading { display: block; margin: 0 var(--gutter) 28px; }
  .frames-heading .section-kicker { margin-bottom: 18px; font-size: .6875rem; }
  .frames-heading h2 { font-size: clamp(2.25rem, 9vw, 3.4rem); max-width: 13ch; }
  .frames-navigation { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
  .frames-navigation p { font-size: .875rem; max-width: 24ch; line-height: 1.55; }
  .film-buttons { flex-shrink: 0; gap: 6px; }
  .film-buttons button { width: 44px; height: 44px; }
  .filmstrip { gap: 16px; padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); -webkit-overflow-scrolling: touch; }
  .film-frame, .film-frame:nth-child(even) { width: calc(100vw - 64px); max-width: 420px; padding-top: 0; scroll-snap-align: start; }
  .film-photo img, .film-frame:nth-child(even) img { height: min(105vw, 470px); max-height: none; object-fit: contain; }
  .film-photo::after { opacity: 1; transform: none; width: 32px; height: 32px; right: 12px; bottom: 12px; }
  .film-frame figcaption { gap: 12px; padding-top: 14px; font-size: .8125rem; line-height: 1.5; }
  .filmstrip-bottom { font-size: .75rem; margin-top: 22px; gap: 20px; }
  .filmstrip-bottom > span:first-child { max-width: 30ch; }
  .home-page .collection-index { padding: 12px var(--gutter); gap: 12px; scrollbar-width: none; scroll-padding-inline: var(--gutter); }
  .home-page .collection-index::-webkit-scrollbar { display: none; }
  .home-page .collection-index a { min-height: 46px; padding: 0 14px; border: 1px solid #ffffff26; border-radius: 3px; font-size: .8125rem; gap: 9px; }
  .home-page .collection-index a.is-active { border-color: #e0d2b480; background: #e0d2b410; }
  .home-page .projects-section { padding: 58px var(--gutter) 44px; }
  .home-page .projects-heading { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 32px; }
  .home-page .projects-heading .section-kicker { margin-bottom: 0; }
  .home-page .projects-heading h2 { font-size: clamp(2.25rem, 9vw, 3.4rem); max-width: 13ch; }
  .home-page .projects-heading > p:last-child { font-size: .9375rem; max-width: 40ch; padding: 0; }
  .home-page .project-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .home-page .portfolio-card { scroll-margin-top: calc(var(--header-h) + var(--safe-top) + 18px); }
  .home-page .portfolio-card:nth-child(even) { padding-top: 0; }
  .home-page .portfolio-card:last-child:nth-child(odd) { display: block; grid-column: auto; }
  .home-page .portfolio-card:last-child:nth-child(odd) .card-link { display: block; }
  .home-page .card-alternate { display: none; }
  .home-page .card-heading { padding: 18px 0 13px; gap: 14px; }
  .home-page .card-heading h3 { font-size: clamp(2rem, 8.5vw, 3.1rem); line-height: 1.12; overflow-wrap: anywhere; }
  .home-page .card-count { top: 12px; right: 12px; }
  .home-page .card-open { width: 44px; height: 44px; right: 12px; bottom: 12px; }
  .home-page .card-details { flex-wrap: wrap; gap: 4px 16px; line-height: 1.5; }
  .home-page .portfolio-card > p { font-size: .9375rem; margin-top: 12px; }
  .home-page .manifest-section { grid-template-columns: minmax(0, 1fr); min-height: 0; margin: 14px 0 56px; padding: 44px var(--gutter); gap: 35px; }
  .home-page .manifest-visual { width: 84%; max-width: 360px; }
  .home-page .manifest-copy blockquote { font-size: clamp(2.25rem, 9vw, 3.4rem); }
  .home-page .about-section { grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 0 var(--gutter) 58px; }
  .home-page .about-photo { max-width: 420px; width: 100%; }
  .home-page .about-copy h2, .home-page .contact-section h2 { font-size: clamp(2.3rem, 9vw, 3.5rem); line-height: 1.08; }
  .home-page .about-copy .section-kicker { margin-bottom: 18px; }
  .home-page .about-copy > p:not(.section-kicker) { margin-top: 20px; }
  .home-page .about-copy .about-lead { font-size: 1rem; }
  .home-page .about-facts { padding: 20px 0; margin: 24px 0 14px; }
  .home-page .contact-section { padding: 52px var(--gutter) 42px; }
  .home-page .contact-section h2 { margin: 22px 0; max-width: 15ch; }
  .home-page .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 30px; }
  .home-page .contact-grid > a, .home-page .contact-grid > a:first-child { grid-column: auto; gap: 10px; padding: 22px 0; }
  .home-page .contact-value { font-size: clamp(1rem, 4.8vw, 1.5rem); }
  .site-footer { flex-direction: column; gap: 6px; padding: 24px var(--page-right) calc(24px + var(--safe-bottom)) var(--page-left); font-size: .75rem; }

  /* A photograph gets its own space; controls sit above and below it. */
  .frame-lightbox[open] { grid-template-rows: calc(64px + var(--safe-top)) minmax(0, 1fr) calc(124px + var(--safe-bottom)); }
  .frame-lightbox-top { padding: calc(10px + var(--safe-top)) var(--page-right) 10px var(--page-left); gap: 16px; }
  .frame-lightbox-top > span { font-size: 1.25rem; line-height: 1.2; min-width: 0; }
  .frame-lightbox-top button { flex-shrink: 0; width: 44px; height: 44px; }
  .frame-stage { padding: 0 max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left)); touch-action: pan-y pinch-zoom; }
  .frame-arrow { position: fixed; top: auto; bottom: calc(68px + var(--safe-bottom)); transform: none; width: 44px; height: 44px; border: 1px solid #ffffff45; border-radius: 50%; font-size: 2rem; }
  .frame-arrow.previous { left: var(--page-left); }
  .frame-arrow.next { right: var(--page-right); }
  .frame-lightbox-bottom { position: relative; display: flex; justify-content: center; align-items: end; padding: 12px var(--gutter) calc(12px + var(--safe-bottom)); }
  .frame-lightbox-bottom > span { position: absolute; inset: 12px 72px auto; text-align: center; line-height: 44px; }
  .frame-lightbox-bottom a { max-width: 100%; min-height: 44px; font-size: .8125rem; align-items: center; gap: 16px; }

  .project-page .project-header { height: calc(var(--header-h) + var(--safe-top)); min-height: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr) 132px; gap: 8px; padding: calc(12px + var(--safe-top)) max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left)); }
  .project-page .project-back { display: grid; place-items: center; width: 44px; height: 44px; font-size: 1.5rem; }
  .project-page .project-back span:last-child { display: none; }
  .project-page .project-header .brand { justify-self: center; min-width: 0; }
  .project-page .project-header .brand b { font-size: clamp(1.1rem, 4.8vw, 1.5rem); }
  .project-page .project-header .brand small { display: none; }
  .project-page .project-header .language-switcher { display: flex; gap: 0; padding: 0; border: 0; }
  .project-page .project-header .language-switcher button { min-width: 44px; min-height: 44px; padding: 0; font-size: .75rem; }
  .project-page .project-opening { min-height: 0; grid-template-columns: minmax(0, 1fr); padding: calc(var(--header-h) + var(--safe-top) + 24px) var(--gutter) 32px; gap: 26px; }
  .project-page .project-opening-media { height: auto; min-height: 0; }
  .project-page .project-opening-media .responsive-picture { height: auto; }
  .project-page .project-opening-media #projectHeroImage { width: auto !important; height: auto !important; max-width: 100% !important; max-height: 58svh !important; }
  .project-page .project-opening-copy { gap: 18px; }
  .project-page .project-opening h1, .project-page .project-opening h1.title-long, .project-page .project-opening h1.title-extra-long { font-size: clamp(2.65rem, 11.7vw, 4.6rem) !important; line-height: 1.06 !important; max-width: 15ch; overflow-wrap: anywhere; hyphens: auto; }
  .project-page .project-opening-copy > p { font-size: .9375rem; }
  .project-page .project-opening .text-link { min-height: 48px; }
  .project-page .gallery-section { width: calc(100% - var(--gutter) * 2); padding: 30px 0 55px; }
  .project-page .gallery-heading { margin-bottom: 24px; padding-bottom: 14px; }
  .project-page .gallery-heading::after { display: none; }
  .project-page .gallery-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 28px !important; }
  .project-page .gallery-note { font-size: .9375rem; line-height: 1.65; }
  .project-page .gallery-action { left: 10px; bottom: 10px; padding: 10px; font-size: .6875rem !important; }
  .project-page .gallery-action span { padding-left: 0; }
  .project-page .gallery-action i { padding-right: 0; }
  .project-page .project-continuation { width: calc(100% - var(--gutter) * 2); padding-bottom: 50px; }
  .project-page .continuation-top { align-items: start; flex-direction: column; gap: 16px; }
  .project-page .previous-project-link { flex-wrap: wrap; min-height: 44px; gap: 8px 12px; }
  .project-page .next-project-canvas { display: block; min-height: 0; }
  .project-page .next-project-media { height: auto; min-height: 0; padding: 14px; }
  .project-page .next-project-media .responsive-picture { height: auto; }
  .project-page .next-project-image { max-height: 50svh !important; }
  .project-page .next-project-copy { position: static; grid-template-columns: minmax(0, 1fr) auto; margin: 0 18px; padding: 20px 0 22px; gap: 12px; text-shadow: none; }
  .project-page .next-project-copy small { grid-column: 1 / -1; }
  .project-page .next-project-copy strong { font-size: clamp(2.2rem, 9.6vw, 3.8rem); line-height: 1.1; }
  .project-page .project-contact { width: calc(100% - var(--gutter) * 2); padding: 38px 0; grid-template-columns: minmax(0, 1fr) !important; gap: 28px !important; }
  .project-page .project-contact h2 { font-size: clamp(2.3rem, 9vw, 3.5rem); max-width: 16ch; }
  .project-page .contact-details-list { width: 100%; }
  .project-page .contact-detail-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 20px 0; }
  .project-page .contact-detail-row small { grid-column: 1 / -1; }
  .project-page .contact-detail-row strong { font-size: clamp(1rem, 4.8vw, 1.5rem); line-height: 1.4; }
  .project-page .project-lightbox .lightbox-ui { opacity: 1; pointer-events: auto; }
  .project-page .lightbox-close { width: 44px; height: 44px; top: calc(10px + var(--safe-top)); right: var(--page-right); }
  .project-page .lightbox-image-wrap { inset: calc(64px + var(--safe-top)) 0 calc(76px + var(--safe-bottom)); padding: 0 max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left)); }
  .project-page .lightbox-arrow { top: auto; bottom: calc(16px + var(--safe-bottom)); transform: none; width: 44px; height: 44px; border: 1px solid #ffffff45; border-radius: 50%; font-size: 2rem; }
  .project-page .lightbox-prev { left: var(--page-left); }
  .project-page .lightbox-next { right: var(--page-right); }
  .project-page .lightbox-counter { left: 50%; bottom: calc(16px + var(--safe-bottom)); transform: translateX(-50%); height: 44px; display: grid; place-items: center; background: none; border: 0; padding: 0; }
  .project-lightbox-title { display: block; position: absolute; left: var(--page-left); right: calc(var(--page-right) + 62px); top: calc(10px + var(--safe-top)); min-height: 44px; align-content: center; font: 400 1.25rem/1.2 var(--font-display); }
  .project-page .project-lightbox, .project-page .lightbox-stage { touch-action: pinch-zoom; }
  .motion-ready .reveal, .project-page .gallery-item.reveal { transition-duration: .55s; }
}
.project-lightbox-title { pointer-events: none; }
@media (min-width: 821px) and (min-height: 521px), (min-width: 1001px), (min-width: 821px) and (pointer: fine) { .project-lightbox-title { display: none; } }
.lightbox-status { position: absolute; z-index: 8; left: 50%; top: 50%; transform: translate(-50%, -50%); width: max-content; max-width: calc(100% - 40px); padding: 10px 16px; text-align: center; background: #101211e6; color: #fff; font-size: .875rem; }
.lightbox-status:empty { display: none; }
@media (max-width: 1000px) and (max-height: 520px) and (orientation: landscape) {
  .home-page .cinema-hero { height: auto; min-height: 480px; max-height: none; padding-top: calc(var(--header-h) + 22px); }
  .home-page .cinema-copy { padding-top: 28px; }
  .home-page .cinema-copy h1 { font-size: clamp(3rem, 8vw, 5rem); white-space: nowrap; }
  .home-page .cinema-copy h1 .hero-surname { display: inline; margin-left: .12em; }
  .home-page .cinema-copy > p { max-width: none; margin-bottom: 12px; }
  .home-page .hero-explore { margin-top: 10px; }
  .home-page .hero-bottom { margin-top: 16px; }
  .home-page .header-panel.open { flex-direction: row; align-items: start; gap: 36px; }
  .home-page .main-nav { flex: 1; }
  .home-page .main-nav a { font-size: 1.8rem; padding: 12px 0; }
  .home-page .header-panel .language-switcher { margin-top: 12px; }
}
@media (hover: none) and (pointer: coarse) {
  .hero-slide.is-current img { animation: none; transform: none; }
  .home-page .portfolio-card .card-link:hover img { transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .home-page .header-panel.open { animation: none; }
  .menu-toggle span { transition: none; }
  .project-page .gallery-item.reveal { opacity: 1; transform: none; transition: none; }
}
