/* Daylight on warm paper, used only on the home page. */
body[data-page=home] {
  --bg: #f4ecdf;
  --fg: #29231f;
  --muted: #66594e;
  --line: #cdbfad;
  --lime: #913b1b;
  color-scheme: light;
}
::selection { background: #ebcbb4; color: #30231e; }
header {
  background: rgb(245 237 225 / 94%);
  border-color: rgb(115 84 59 / 16%);
}
header .primary-nav-links {
  background: transparent;
  color: var(--fg);
  border-color: #b9957c;
  font-weight: 500;
}
.nav-contact, .language-trigger { border-color: #aa9583; }
header nav a:hover { color: var(--lime); }
.stage {
  background-color: #eee3d4;
  background-image:
    linear-gradient(90deg, #f4ecdfbd, #f4ecdf70 40%, #f4ecdf52 72%, #f4ecdf40),
    url("assets/daylight-wall.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.stage::after { content: none; }
.art-plane {
  border-color: #fff8ea;
  background: #ede0cb;
  box-shadow:
    1px 2px 3px #4b341b66,
    7px 12px 8px -4px #583b2180,
    21px 34px 20px -10px #64452b88,
    35px 53px 38px -17px #6142265e;
}
@media (max-width: 650px) {
  .stage {
    background-position: 70% center;
    background-image:
      linear-gradient(180deg, #f4ecdf36 20%, #f4ecdf70 50%, #f4ecdfcf 92%),
      url("assets/daylight-wall.webp");
  }
  .art-plane {
    box-shadow: 1px 2px 3px #4b341b66, 9px 16px 12px -5px #583b2170, 16px 25px 18px -10px #64452b70;
  }
}
.orbit { border-color: #b78a5e66; }
.floor { display: none; }
.stage-top, .hero-copy > p:not(.eyebrow) { color: #55483d; }
#hero-heading { text-shadow: none; }
.hero-cta { border-color: #9b8370; font-weight: 600; }
.mouse { border-color: var(--muted); }
.chapter-nav button { color: #6a5b4c; }
.chapter-nav button.active { font-weight: 700; }
.chapter-nav > span, .progress { background: var(--line); }
.entrance-copy { --lime: #ffe4c6; }
.about { background: #ebe1d2; color: var(--fg); }
.about h2 em, .about-awards svg { color: var(--lime); }
.about .eyebrow, .about-copy > p:not(.eyebrow) { color: var(--muted); }
.about-actions .about-awards { color: var(--fg); background: transparent; border-color: #ae9985; }
.about-actions .about-awards:hover { background: #f7eee2; }
.contact-arrow { border-color: #b89b83; }
.skip { color: white; }
.mobile-scroll-guide:not([hidden]) {
  background: #fffaeff5;
  color: var(--lime);
  border-color: #bb9a7e;
  box-shadow: 0 5px 18px #5c40232a;
}
@media (max-width: 900px) {
  header nav { background: var(--bg); }
}

/* The phone composition uses its own artwork area for all three chapters. */
@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  .stage, .static-motion .stage {
    display: grid;
    grid-template-areas: "edition" "art" "caption" "copy" "controls" "guide";
    grid-template-rows: auto minmax(104px, 1fr) auto auto auto auto;
    height: 100svh;
    min-height: min-content;
    padding: calc(86px + env(safe-area-inset-top, 0px)) 6% max(12px, env(safe-area-inset-bottom));
    gap: clamp(4px, .9svh, 10px);
  }
  .stage-top, .scene, .image-note, .hero-copy, .stage-bottom {
    position: relative;
    inset: auto;
  }
  .stage-top { grid-area: edition; align-self: center; }
  .stage-top .edition { display: none; }
  .scene {
    grid-area: art;
    width: 100%;
    height: 100%;
    min-height: 0;
    container-type: size;
    perspective: none;
  }
  .world {
    /* Keep the camera on the same element as the 3D context. Leave room
       above and below the prints for the camera's forward travel. */
    --camera-distance: min(150cqw, 210cqh);
    perspective: var(--camera-distance);
    perspective-origin: center;
    width: min(98%, 120cqh);
    margin-inline: auto;
  }
  .art-plane {
    top: 50%;
    left: 50%;
    width: 28%;
    height: auto;
    aspect-ratio: 3 / 4;
    border-width: 3px;
  }
  .art-plane.main { width: 39%; height: auto; }
  .art-plane[data-slot=left] { left: 21%; top: 44%; }
  .art-plane[data-slot=right] { left: 79%; top: 55%; }
  .orbital { left: 50%; top: 50%; width: min(75cqw, 94cqh); height: auto; aspect-ratio: 1; }
  .image-note {
    grid-area: caption;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: baseline;
    gap: 2px 10px;
    max-width: none;
    text-align: center;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: .06em;
  }
  .image-note span:last-child { font-size: .92em; letter-spacing: .035em; }
  .hero-copy { grid-area: copy; padding-block: clamp(2px, 1.2svh, 12px); }
  .hero-copy .eyebrow { margin: 0 0 8px; }
  #hero-heading { font-size: clamp(36px, min(13vw, 7svh), 60px); line-height: 1.02; }
  .hero-copy > p:not(.eyebrow) { margin: 10px 0 0; font-size: 13px; line-height: 1.45; }
  .hero-cta { min-height: 44px; margin: 0; padding: 6px 0; }
  .stage-bottom { grid-area: controls; position: static; }
  .stage-bottom .scroll-cue { display: none; }
  .stage-bottom .motion { margin-left: auto; }
  .stage-bottom .motion span { display: none; }
  .stage > .mobile-scroll-guide[hidden] {
    display: block;
    grid-area: guide;
    visibility: hidden;
    min-height: 46px;
  }
  .stage > .mobile-scroll-guide:not([hidden]) {
    grid-area: guide;
    position: static;
    transform: none;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 100%;
    width: fit-content;
    min-height: 44px;
    padding: 8px 18px;
    border: 1px solid #bb9a7e;
    border-radius: 30px;
    text-align: center;
    font-size: 13px;
  }
}
@media (orientation: landscape) and (max-width: 950px) and (max-height: 500px) {
  .stage, .static-motion .stage {
    grid-template-areas: "copy art" "copy caption" "controls guide";
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    grid-template-rows: minmax(100px, 1fr) auto auto;
    padding: max(72px, calc(64px + env(safe-area-inset-top))) 5% max(6px, env(safe-area-inset-bottom));
    column-gap: 3%;
  }
  .stage-top { display: none; }
  .hero-copy { align-self: center; padding: 0; }
  #hero-heading { font-size: clamp(29px, 8svh, 40px); }
  .image-note { font-size: 11px; }
  .stage-bottom { align-self: end; }
}

/* The gallery rail uses the same warm paper and copper tones as the prints. */
header { --fg: #fff3df; --bg: #351e10; --lime: #e4b08a; color: var(--fg); background: var(--bg); }
header .brand, header .brand-mark, header .primary-nav-links { color: var(--fg); }
header .brand .brand-name { font-family: Georgia, serif; letter-spacing: -.025em; }
header .language-trigger { background: transparent; border: 0; }
header .language-trigger .language-flag { display: none; }
header .language-options { color: var(--fg); }
.stage-top, .orbital, .image-note #featured-category, .rail-print { display: none; }
.art-plane { border-color: #fff6e6; background: #e6d4c1; box-shadow: 2px 3px 5px #50301c38, 6px 14px 15px -5px #4d2f1e70; }
#hero-heading, #hero-heading em {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-style: normal;
  letter-spacing: -.05em;
  text-shadow: none;
}
#hero-heading em { color: #9f4826; font-style: italic; }
.hero-copy .eyebrow { color: var(--fg); }
.hero-copy #hero-desc { display: none; }
.hero-cta {
  color: var(--lime);
  font: 400 clamp(16px,1.35vw,24px)/1.4 Georgia,serif;
  text-decoration: underline;
  text-underline-offset: .17em;
  border: 0;
}
.hero-cta span { display: none; }
.hero-copy h1::after {
  content: ""; display: block; width: 1.6rem; height: 2px;
  margin-block: clamp(12px,2.8vh,28px) 3px; background: var(--lime);
}
.image-note #featured-name { font: 400 clamp(13px,1.1vw,19px)/1.4 Georgia,serif; letter-spacing: .15em; }
.chapter-nav button { color: var(--muted); }
.chapter-nav button.active { color: var(--fg); }

.about-actions .about-awards, .contact-arrow { border-color: var(--line); }
.mobile-scroll-guide:not([hidden]), .stage > .mobile-scroll-guide:not([hidden]) {
  background: var(--bg); color: var(--fg); border-color: var(--line);
}


@media (min-width: 901px) and (min-height: 501px) {
  body[data-page=home] { --rail-width: clamp(180px,15vw,290px); }
  main, footer { margin-left: var(--rail-width); }
  header {
    inset: 0 auto 0 0; height: 100dvh; width: var(--rail-width);
    flex-direction: column; align-items: flex-start; justify-content: flex-start;
    padding: clamp(20px,6vh,68px) clamp(16px,2.35vw,44px) 18px;
    gap: 0; border: 0; border-right: 1px solid #bbc3b355; overflow-y: auto; overflow-x: hidden;
  }
  header .brand { flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; }
  header .brand-mark { width: clamp(62px,5.8vw,110px); height: auto; }
  header .brand .brand-name { font-size: clamp(14px,1.22vw,23px); }
  header nav { position: static; padding: 0; background: transparent; border: 0; display: flex; flex: 1; width: 100%; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 0; margin: 0; }
  header .primary-nav-links {
    flex-direction: column; align-items: flex-start; gap: clamp(2px,1.7vh,22px);
    padding: 0; border: 0; border-radius: 0; font: 400 clamp(14px,1.19vw,22px)/1.25 Georgia,serif;
  }
  header .primary-nav-links a { white-space: normal; min-height: 36px; }
  header .rail-print { display: block; align-self: center; width: auto; height: clamp(56px,18vh,180px); max-width: 100%; object-fit: contain; margin: clamp(8px,2vh,24px) 0; }
  header .nav-contact { border: 0; padding: 0; font: 400 clamp(14px,1.19vw,22px) Georgia,serif; }
  header .nav-contact span { display: none; }
  header .language-picker { margin-top: 2px; }
  header .language-options { inset: auto auto calc(100% + 5px) 0; }
  header .language-trigger { min-width: 55px; min-height: 34px; }
  #menu-toggle { display: none; }
}
@media (min-width: 701px) and (min-height: 501px), (min-width: 951px) {
  .stage { container-type: inline-size; }
  .hero-copy { left: 4.5%; top: 45%; transform: translateY(-50%); max-width: 29%; }
  #hero-heading { font-size: clamp(30px,4.8cqw,100px); line-height: 1.02; }
  .hero-copy .eyebrow { margin: 0 0 clamp(12px,2.2vh,24px); }
  .art-plane, .art-plane.main {
    left: 61%; top: 46%; width: min(20cqw,36svh); height: auto; aspect-ratio: 3 / 4;
    border-width: clamp(2px,.26cqw,5px);
  }
  .art-plane.main { width: min(25cqw,43svh); }
  .scene { perspective-origin: 61% 46%; }
  .image-note { display: block; top: calc(46% + min(17cqw,29svh) + 5vh); bottom: auto; left: 61%; transform: translateX(-50%); text-align: center; }
  .scroll-cue small { display: none; }
  .motion span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

.stage-bottom #motion { font-size: 0; display: grid; place-items: center; min-width: 44px; min-height: 44px; }
.stage-bottom #motion::before { content: ""; width: 7px; height: 14px; border-inline: 2px solid currentColor; }
.stage-bottom #motion[aria-pressed=true]::before { width: 0; height: 0; border: 7px solid transparent; border-right: 0; border-left: 11px solid currentColor; }

/* Compact header opens into a scrollable menu, including the language picker. */
@media (max-width: 900px), (max-height: 500px) {
  header { height: calc(64px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 6% 0; backdrop-filter: none; }
  header .brand { margin-right: auto; }
  header #menu-toggle { display: grid; place-items: center; color: var(--fg); }
  header nav { display: none; }
  header nav.open {
    position: absolute; inset: 100% 0 auto; height: calc(100dvh - 100%); overflow-y: auto;
    display: flex; align-items: flex-start; justify-content: flex-start;
    background: var(--bg); gap: 10px; padding: clamp(12px,5vh,44px) 8% max(24px,env(safe-area-inset-bottom));
    border: 0; overscroll-behavior: contain;
  }
  header .primary-nav-links { flex-flow: column; align-items: flex-start; padding: 0; gap: 2px; background: none; border: 0; }
  header .primary-nav-links a, header .nav-contact { font: 400 clamp(20px,5.5vw,28px)/1.35 Georgia,serif; min-height: 44px; }
  header .rail-print { display: block; width: min(42%,170px); height: min(23dvh,170px); object-fit: contain; align-self: center; margin-block: auto; }
  header .nav-contact { display: flex; align-items: center; padding: 0; border: 0; }
  header .nav-contact span { display: none; }
  header .language-options { inset: auto auto 100% 0; }
  body:has(#home-navigation.open) { overflow: hidden; }
}
@media (max-width: 700px) and (orientation: portrait) {
  .stage, .static-motion .stage {
    grid-template-areas: "art" "caption" "copy" "controls";
    grid-template-rows: minmax(120px,1fr) auto auto auto;
    padding: calc(78px + env(safe-area-inset-top)) 6% max(15px,env(safe-area-inset-bottom));
  }
  .hero-copy { padding-block: clamp(8px,3svh,30px); }
  .art-plane { width: 33%; }
  .art-plane.main { width: 43%; }
  .art-plane[data-slot=left] { left: 22%; top: 50%; }
  .art-plane[data-slot=right] { left: 78%; top: 54%; }
  .image-note #featured-name { font: italic 1rem/1.4 Georgia,serif; }
  .stage > .mobile-scroll-guide { display: none !important; }
  .stage-bottom { display: flex; inset: auto !important; }
  .stage-bottom .scroll-cue { display: flex; }
  .scroll-cue small, .scroll-cue .mouse { display: none; }
  .stage-bottom .motion { margin-left: 0; }
}
header nav { max-height: none; }
header .language-picker { flex: none; }
header nav a:focus-visible, header button:focus-visible { outline-color: #f5cc9e; }
@media (min-width: 901px) and (min-height: 501px) {
  header .brand { align-items: center; align-self: center; }
  header .primary-nav-links { margin-top: auto; }
  header .rail-print { margin-block: auto; }
  header .language-picker { align-self: flex-start; }
}
