/* Feedback pass: original cream palette, accessible type, image-first home. */
:root {
  --paper: #eeeddf;
  --muted: #62675c;
  --line: #cdd0c1;
  --portrait-radius: 16px;
  --header-height: 100px;
  --grain-opacity: 0.05;
  --grain-duration: 28s;
  --grain-live-duration: 1.25s;
  --grain-texture:image-set(url('assets/paper-grain-1080.webp') 1x,url('assets/paper-grain-2160.webp') 2x);
  /* Compensate for overlay's low contrast on this very light paper tint. */
  --grain-veil: color-mix(in srgb,var(--paper) calc(100% - var(--grain-opacity) * 600%),transparent);
}
/* One paper surface, behind the content. Keep the repeated image unblended:
   WebKit can lose background blending when painting tiled images (259081).
   overlay(paper, texture) = hard-light(texture, paper), so blend an opaque,
   non-repeating paper gradient instead. The veil and intensity stay intact. */
body { position:relative;isolation:isolate;min-height:100svh;min-height:100dvh; }
body > main,body > footer { position:relative;z-index:1; }
/* A document-height clip keeps the sampled texture inside the page bounds. */
.paper-background { position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:0; }
.paper-background::before,.header nav::before {
  content:"";pointer-events:none;z-index:0;
}
/* The root canvas supplies the same paper outside the document during elastic
   overscroll. The animated layer remains absolute and scrolls with the page. */
html,.paper-background::before,.header nav::before {
  background-color:var(--paper);
  background-image:linear-gradient(var(--grain-veil),var(--grain-veil)),linear-gradient(var(--paper),var(--paper)),var(--grain-texture);
  background-size:auto,auto,1080px 1080px;
  background-repeat:no-repeat,no-repeat,repeat;
  background-blend-mode:normal,hard-light,normal;
}
html { background-attachment:scroll;background-position:0 0,0 0,-18px -16px; }
.paper-background::before {
  position:absolute;inset:-64px;
  animation:paper-grain-live var(--grain-live-duration) steps(1,end) infinite;
  will-change:transform;
}
/* Composite ten different samples of our own texture, instead of drifting the
   whole sheet. One layer keeps the existing intensity and cream calibration. */
@keyframes paper-grain-live {
  0%,100% { transform:translate(-18px,-16px); }
  10% { transform:translate(32px,24px); }
  20% { transform:translate(-36px,10px); }
  30% { transform:translate(14px,-34px); }
  40% { transform:translate(-24px,36px); }
  50% { transform:translate(38px,-12px); }
  60% { transform:translate(-40px,-30px); }
  70% { transform:translate(22px,38px); }
  80% { transform:translate(-10px,20px); }
  90% { transform:translate(36px,-38px); }
}
html[data-motion-paused] .paper-background::before,
body:has(dialog[open]) .paper-background::before { animation-play-state:paused; }
html[data-effect-budget="limited"] {
  --grain-live-duration:2.5s;
  --grain-texture:url('assets/paper-grain-1080.webp');
}
/* The mobile menu needs its opaque paper surface to cover the page below. */
.header nav::before { display:none;z-index:-1; }
@keyframes paper-grain-drift {
  0%,100% { transform:translate(-6px,-4px); }
  25% { transform:translate(6px,-2px); }
  50% { transform:translate(4px,6px); }
  75% { transform:translate(-4px,4px); }
}
@media(max-width:1100px) {
  .header nav {
    isolation:isolate;
    background-image:none;
    animation:none;
  }
}
@media(prefers-reduced-motion:reduce) {
  .paper-background::before,.header nav::before { animation:none;will-change:auto; }
}
@media(max-width:1100px) and (prefers-reduced-motion:reduce) {
  .header nav { animation:none; }
}
.header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: var(--header-height);
  padding-block: 24px;
  background: transparent;
}
.header .brand {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  width: max-content;
  white-space: nowrap;
  letter-spacing: .087em;
}
.header-logo {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 64px;
  height: 50px;
  opacity:1;
  animation:none;
  transform:none;
}
.header-logo img { width: 100%; height: 100%; object-fit: contain; }
.header-logo:hover { opacity:1; }
/* Native document navigation, with only the fixed logo carried across paints.
   The page root has no snapshot/crossfade; content keeps its existing reveals. */
@view-transition { navigation:auto; }
html { view-transition-name:none; }
.header-logo { view-transition-name:anlaw-header-logo; }
::view-transition { pointer-events:none; }
::view-transition-group(anlaw-header-logo) { animation:logo-hold 160ms linear both; }
::view-transition-old(anlaw-header-logo) { animation:none;opacity:0;mix-blend-mode:normal; }
::view-transition-new(anlaw-header-logo) { animation:none;opacity:1;mix-blend-mode:normal; }
@keyframes logo-hold { from { opacity:1; } to { opacity:1; } }
@media(prefers-reduced-motion:reduce) { @view-transition { navigation:none; } }
.header nav { grid-column: 3; grid-row: 1; justify-self: end; white-space: nowrap; }
.header .menu-toggle { grid-column: 3; grid-row: 1; justify-self: end; }
.page-title { padding-block: 58px 48px; }
.film-collection, .about-layout { padding-bottom: 80px; }
/* Keep the mobile row gap from design.css. A percentage row gap overflows an
   auto-height grid and lets the following footer border cross the button. */
.quiet-intro { padding-bottom: 80px; column-gap: 10%; }
.quiet-intro > img, .about-photo img { border-radius: var(--portrait-radius); }
/* Full 16:9 project composition, shared with its photography collection. */
.project-image--full { aspect-ratio:16 / 9;background:var(--paper); }
.project-image--full img { width:100%;height:100%;object-fit:contain;object-position:center; }
.luxemburg-drone-edition-page .video-shell { background:var(--paper); }
.hero-stage > img { object-fit:contain; }

/* The entire first screen is header + image. Caption and controls sit on image. */
.cinema { position: relative; width: 100%; margin: 0; color: var(--paper); }
.hero-stage {
  width:100%;
  height: min(54vw, calc(100svh - var(--header-height) - 16px));
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  isolation: isolate;
}
.hero-stage > img,.hero-poster-source img {
  position:absolute;inset:0;width:100%;height:100%;
  object-fit: cover;
  object-position: 50% 0%;
  transform-origin:50% 0%;
}
 .hero-poster-source { display:contents; }
@media (hover:none), (pointer:coarse) {
  .hero-stage {
    height:min(56.25vw, calc(100svh - var(--header-height) - 16px));
    background:var(--paper);
  }
  .hero-poster-source img { display:none; }
}
.hero-stage::after {
  content: '';
  position: absolute;
  inset: 42% 0 0;
  background: linear-gradient(transparent, #10150f8c);
  pointer-events: none;
  z-index: 2;
}
.hero-start { z-index: 3; flex-direction: column; gap: 13px; }
.hero-caption {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:6px 24px;
  position: absolute;
  bottom: 64px;
  left: var(--gutter);
  right: var(--gutter);
  padding: 0;
  z-index: 4;
  align-items: end;
  pointer-events: none;
}
.hero-caption a, .hero-caption button { pointer-events: auto; }
.hero-caption > div:first-child { grid-column:1;grid-row:1 / 3;min-width:0; }
.hero-caption .hero-controls { grid-column:2;grid-row:1;margin-left:0;justify-self:end; }
.hero-caption > a { grid-column:2;grid-row:2;justify-self:end; }
.hero-caption .eyebrow { color: #eeeddfdd;  }
.hero-caption h2 {  max-width: 720px; }
.hero-caption > a {  white-space: nowrap; }
.hero-controls span { color: var(--paper);  }
.hero-controls button {  min-width: 44px; }
.hero-choices {
  position: absolute;
  bottom: 20px;
  left: var(--gutter);
  border: 0;
  padding: 0;
  z-index: 4;
  gap: 10px;
}
.hero-choices button { min-width: 44px; }
.hero-choices button::before { background: #eeeddf66; }
.hero-choices button[aria-pressed=true]::before,
.hero-choices button:hover::before { background: var(--paper); }
.cinema a:hover, .cinema button:hover { color: #fff; }
.hero-outgoing { z-index: 1; pointer-events: none; }
/* Decorative preview: the existing poster always remains underneath. */
#hero-preview,.hero-stage > .hero-preview-frame {
  position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;object-position:50% 0%;transform-origin:50% 0%;
  pointer-events:none;
}
#hero-preview {
  z-index:0;opacity:0;
  transition:opacity 400ms ease-out,transform 900ms var(--motion-ease),filter 600ms ease;
}
#hero-preview.is-ready { opacity:1; }
#hero-preview[hidden] { display:none; }
.cinema:hover #hero-preview { transform:scale(1.012);filter:brightness(1.035); }
@media (hover:none), (pointer:coarse) {
  .cinema:hover #hero-preview { transform:none;filter:none; }
}
@media(prefers-reduced-motion:reduce) {
  #hero-preview { transition:none; }
  .cinema:hover #hero-preview { transform:none;filter:none; }
}
.home-intro { padding-block: 42px 0; }
.selection { padding-block: 58px 75px; }

/* Fully unloaded until the user chooses a film. */
#video-dialog {
  background: #11150f;
  color: var(--paper);
  padding-block: 18px;
}
#video-dialog .dialog-top { border-color: #eeeddf33; }
#video-dialog h2 {  letter-spacing: -.02em; }
#video-dialog .dialog-bottom { min-height: 50px; }
#video-dialog a:hover, #video-dialog button:hover { color: #fff; }
.video-modal-stage { flex: 1; min-height: 0; position: relative; margin-block: 16px; }
#hero-player { position: absolute; inset: 0; }
#hero-player > *, #hero-player iframe, #hero-player video {
  display: block;
  border: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#hero-status { position: static; padding: 0; color: var(--paper); background: transparent;  }
#hero-status:empty { display: block; }

/* Compact contact sheet. All photographs remain in the normal page flow. */
.photo-book { columns: 4; column-gap: 22px; padding-bottom: 35px; }
.photo-item { margin-bottom: 25px; }
.photo-open { border-radius: 4px; }
.photo-item figcaption {  padding-top: 9px; }
.gallery-bar { margin-bottom: 28px; padding-block: 14px; }
.lightbox-image { position: relative; overflow: hidden; }
.lightbox-image > img { flex: none; }
.lightbox-image .photo-outgoing {
  position: absolute;
  inset: 18px 0;
  width: 100%;
  height: calc(100% - 36px);
  object-fit: contain;
  pointer-events: none;
}
.photo-morph { position: fixed; max-width: none; object-fit: contain; transform-origin: top left; z-index: 2; pointer-events: none; }
.dialog-bottom > div { flex-shrink: 0; }
.email {  letter-spacing: -.035em; padding-block: 22px; }
.contact-details { padding-bottom: 80px; }
.contact-page .page-title { padding-bottom: 42px; }

@media (max-width: 1100px) {
  .photo-book { columns: 3; column-gap: 20px; }
  .header .menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    z-index: 22;
  }
  .header .menu-toggle[aria-expanded="false"] { color:var(--ink); }
  .header nav {
    display: flex;
    /* Content-sized dropdown anchored beneath the existing menu button. */
    grid-area: auto;
    justify-self: stretch;
    position: absolute;
    top: var(--menu-top, 100%);
    left: auto;
    right: calc(var(--gutter) - 20px);
    width: max-content;
    max-width: calc(50vw - 2px);
    padding: 20px;
    max-height: calc(100dvh - var(--menu-top, var(--header-height)) - 12px);
    overflow-y: auto;
    background-color: var(--olive);
    color: var(--paper);
    border: 0;
    border-radius: 8px;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 7px;
    box-shadow: 0 20px 40px #272a2510;
    visibility: hidden;
    transform-origin: top right;
    clip-path: inset(0 0 100% 100% round 8px);
  }
  .header nav[data-scroll-closing] {
    position:fixed;
    top:var(--menu-scroll-top);
    left:var(--menu-scroll-left);
    right:auto;
    width:var(--menu-scroll-width);
    height:var(--menu-scroll-height);
  }
  .header nav a {
    color:var(--paper);
    padding: 12px 0; width: max-content;flex-shrink:0;
    opacity: 0;transform: translateY(10px);
    transition: opacity 200ms ease, transform 200ms ease;
  }
  .header nav a::after { left:auto;right:0;transform-origin:right;background:currentColor; }
  .header nav a:focus-visible { outline-color:var(--paper); }
  .header nav a:nth-child(1) { --menu-order:0; }
  .header nav a:nth-child(2) { --menu-order:1; }
  .header nav a:nth-child(3) { --menu-order:2; }
  .header nav a:nth-child(4) { --menu-order:3; }
  .header nav a:nth-child(5) { --menu-order:4; }
  .menu-dropdown-open .header nav {
    display:flex;visibility:visible;
    transition:clip-path 520ms cubic-bezier(.65,0,.35,1);
  }
  .menu-expanded .header nav {
    clip-path:inset(0 round 8px);transition-timing-function:cubic-bezier(.22,1,.36,1);
  }
  .menu-expanded .header nav a {
    opacity:1;transform:translateY(0);
    transition-duration:380ms;
    transition-timing-function:cubic-bezier(.22,1,.36,1);
    transition-delay:calc(60ms + var(--menu-order) * 60ms);
  }
}
@media (max-width:1100px) and (prefers-reduced-motion:reduce) {
  .menu-dropdown-open .header nav,.header nav a,.menu-expanded .header nav a {
    transition:none;transform:none;
  }
}
@media (max-width: 760px) {
  .photo-book { columns: 2; column-gap: 16px; }
  .hero-caption { grid-template-columns:minmax(0,1fr) auto;gap:6px 12px; }
  .hero-caption > div:first-child { width:100%;grid-column:1 / -1;grid-row:1; }
  .hero-caption .hero-controls { grid-column:2;grid-row:2; }
  .hero-controls { margin-left: 0; }
  .hero-caption > a { grid-column:1;grid-row:2;justify-self:start;margin-left:0; }
}
@media (max-width: 620px) {
  :root { --header-height: 88px; }
  .header { padding-block: 19px; }
  .header-logo { width: 56px; height: 44px; }
  .header .brand { letter-spacing: .088em; }
  .hero-stage { min-height: 0; }
  .hero-caption { bottom:40px;gap:6px 12px; }
  .hero-caption h2 { min-height:2.24em; }
  .index-page .hero-caption { top:20px;align-content:end; }
  .index-page .hero-caption > div:first-child {
    position:absolute;top:0;left:0;grid-area:auto;
    text-shadow:0 1px 5px #10150fcc,0 0 16px #10150f80;
  }
  .index-page .hero-caption h2 {
    font-size:17px;line-height:1.2;min-height:0;max-width:30ch;
  }
  .index-page .hero-caption .eyebrow { font-size:11.5px;line-height:1.4; }
  .hero-choices { bottom:8px; }
  .hero-controls { gap: 5px; }
  .home-intro { padding-block: 30px 0; }
  .selection { padding-block: 40px 55px; }
  .page-title { padding-block: 35px; }
  .project-info .project-credit { text-align: left; grid-column: 1/-1; }
  .project-grid { gap: 32px; }
  .about-layout, .quiet-intro, .film-collection { padding-bottom: 55px; }
  .contact-page .page-title { padding-bottom: 28px; }
  .contact-details { padding-bottom: 55px; }
  #video-dialog { padding: 12px; }
  #video-dialog .dialog-top { align-items: start; }
  #video-dialog h2 { padding-block: 12px; }
  #video-dialog .dialog-top button { flex-shrink: 0; }
  #video-dialog .dialog-bottom { align-items: start; gap: 12px; flex-wrap: wrap; }
  .video-modal-stage { margin-block: 12px; }
}
@media (max-width: 540px) {
  :root { --header-height: 138px; }
  .header { grid-template-rows: auto auto; row-gap: 8px; padding-block: 16px; }
  .header .brand { grid-column: 1 / 3; }
  .header-logo { grid-row: 2; }
}
@media (max-height: 540px) and (orientation: landscape) {
  .hero-stage { min-height: 0; }
  .hero-start { padding-bottom: 70px; }
}

/* One treatment for the explicitly selected calls to action. */
.site-button.site-button {
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  width:fit-content;max-width:100%;min-height:44px;padding:10px 16px;
  border:0;border-radius:8px;background:var(--olive);color:var(--paper);
  line-height:1.3;text-align:center;text-decoration:none;
  transition:background-color 260ms var(--motion-ease);
}
.site-button.site-button > span { display:inline-flex;padding:0; }
.site-button .icon { display:block;margin:0;transition:transform 260ms var(--motion-ease); }
.site-button.site-button:hover { color:var(--paper);background:color-mix(in srgb,var(--olive),var(--paper) 8%); }
.site-button.site-button:focus-visible { outline:2px solid var(--olive);outline-offset:4px; }
.index-page .section-heading { flex-wrap:wrap;gap:12px 20px;align-items:center; }
.copy-row { flex-wrap:wrap;gap:10px 20px; }
.footer-bottom { flex-wrap:wrap;gap:16px 25px;justify-content:flex-start; }
.footer-identity { display:inline-flex;align-items:center;gap:12px;white-space:nowrap; }
@media(min-width:901px) {
  .footer-identity { gap:42px; }
}
.footer-logo {
  display:block;flex-shrink:0;height:44px;aspect-ratio:848/661;background:currentColor;
  -webkit-mask:url('assets/logo.png') center/contain no-repeat;
  mask:url('assets/logo.png') center/contain no-repeat;
}
.footer-contact { display:flex;align-items:center;flex-wrap:wrap;gap:8px 20px; }
.footer-socials { display:flex;align-items:center;gap:6px; }
.footer-socials a { display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px; }
.footer-socials .icon { width:22px;height:22px; }
@media(hover:hover) and (prefers-reduced-motion:no-preference) {
  .site-button:hover .icon-north-east,.site-button:hover .icon-right { transform:translateX(2px); }
  .site-button:hover .icon-left { transform:translateX(-2px); }
}
@media(max-width:620px) {
  .collection-end .site-button { display:flex; }
  .footer-bottom>a:first-child { grid-column:1/-1; }
  .footer-logo { height:36px; }
  .footer-contact { grid-column:1/-1;max-width:100%; }
}
@media(prefers-reduced-motion:reduce) {
  .site-button.site-button,.site-button .icon { transition:none; }
}

/* Home controls share a lower row; the project heading keeps its own position. */
.index-page .hero-caption { grid-template-columns:minmax(0,1fr) auto auto; }
.index-page .hero-caption .hero-controls { grid-column:2;grid-row:2;transform:translateY(36px); }
.index-page .hero-caption > a {
  grid-column:3;grid-row:2;transform:translateY(36px);
  min-height:44px;display:inline-flex;align-items:center;
}
/* Reuse the existing image reveal targets without another controller. */
.index-page .home-photography { padding-bottom:clamp(55px,6vw,80px); }
.index-page .home-photo-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(12px,1.7vw,24px); }
.index-page .home-photo { display:block;aspect-ratio:2/3;border-radius:8px; }
.index-page .home-photo img { position:static;width:100%;height:100%;object-fit:cover; }
.index-page .home-photography > .site-button { display:flex;margin:0 0 20px auto;font-size:15.97px; }
@media(max-width:760px) {
  .index-page .home-photo-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:620px) {
  .index-page .hero-caption { bottom:calc(26px + env(safe-area-inset-bottom,0px));grid-template-columns:minmax(0,1fr) auto; }
  .index-page .hero-caption .hero-controls { grid-column:2;transform:none; }
  .index-page .hero-caption > a { grid-column:1;transform:none; }
  /* Lower the visible row within its existing 44px targets. The indicator
     positions and their separate hit areas remain untouched. */
  .index-page .hero-controls button { padding-block:20px 0; }
  .index-page .hero-controls > span { transform:translateY(10px); }
  .index-page .hero-caption > a { padding-top:20px; }
  /* Keep the indicator hit areas clear of the lowered project link. */
  .index-page .hero-choices { bottom:env(safe-area-inset-bottom,0px); }
}
