:root { --media-radius: 20px; }

/* Rounded photos, renders and film frames throughout the three pages. */
body.edition-five img { border-radius: var(--media-radius); }
body.edition-five :is(.logo, .reference-logo, .gaussin-brand, .flichy-brand) img { border-radius: 5px; }
body.edition-five .client-portrait img { border-radius: 50%; }
body.edition-five :is(.still-frame, .architecture-stage, .trecobat-film-preview, .case-film-cover, .inline-film-slot, .gaussin-visual, .greeting-image) { border-radius: var(--media-radius); overflow: hidden; }
body.edition-five :is(.film-dialog video, .inline-film-player, .case-cover) { border-radius: var(--media-radius); }

/* One shared inline player, with the original cover keeping the frame's size. */
.inline-film-slot { position: relative; min-width: 0; isolation: isolate; background: #080808; scroll-margin-block: 110px 30px; }
.inline-film-layer { position: absolute; inset: 0; z-index: 5; background: #080808; }
.inline-film-layer[hidden], .inline-film-credit[hidden], .inline-film-error[hidden] { display: none !important; }
.inline-film-slot.is-inline-active > :not(.inline-film-layer) { visibility: hidden; }
body.edition-five .inline-film-player { display: block; position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: contain; opacity: 1; background: #080808; }
.inline-film-back { position: absolute; top: 12px; right: 12px; z-index: 2; min-height: 40px; padding: 9px 14px; border: 1px solid #ffffff65; border-radius: 8px; background: #141414e8; color: #fff; font-size: 12px; line-height: 1.2; }
.inline-film-back:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.inline-film-credit { max-width: 900px; margin: 12px 0 0; font-size: 12px; line-height: 1.6; color: inherit; opacity: .75; }
.project-setec > .inline-film-credit { margin-inline: var(--space); }
.inline-film-error { position: absolute; inset: auto 16px 60px; padding: 14px; color: white; background: #141414ed; font-size: 14px; line-height: 1.5; border-radius: 8px; }
.inline-film-error a { text-decoration: underline; text-underline-offset: 3px; }
.inline-film-start { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 70px; height: 70px; display: grid; place-items: center; padding-left: 4px; border: 1px solid #fff; border-radius: 50%; background: #14141485; color: white; font-size: 19px; transition: background .2s, color .2s; }
.inline-film-start:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }

/* Selected headings write themselves at the centre of the viewport. */
.letter-word { display: inline-block; white-space: nowrap; font: inherit; }
.letter-unit { display: inline-block; font: inherit; opacity: 1; transition: opacity .16s ease; }
.typewriter:not(.is-written) .letter-unit { opacity: 0; }
.typewriter.is-writing .letter-unit { animation: letter-write .09s linear var(--letter-delay, 0ms) both; }
@keyframes letter-write { from { opacity: 0; } to { opacity: 1; } }
@media (hover: hover) and (pointer: fine) {
  .letter-hover:not(.typewriter) .letter-unit:hover,
  .letter-hover.is-written .letter-unit:hover { opacity: .3; }
}

/* Old and new elements overlap; there is no empty white intermediate view. */
.scene-unit { animation-duration: .35s; animation-timing-function: cubic-bezier(.22,.61,.36,1); animation-fill-mode: both; animation-delay: var(--scene-delay, 0ms); }
.scene-unit-out { animation-name: scene-element-out; }
.scene-unit-in { animation-name: scene-element-in; animation-duration: .45s; }
.scene-text.scene-unit-out { animation-name: scene-text-out; }
.scene-text.scene-unit-in { animation-name: scene-text-in; }
.scene-local.scene-unit-out { animation-duration: .24s; }
.scene-local.scene-unit-in { animation-duration: .32s; }
.scene-running main, .scene-running .header, .scene-running .footer, .scene-running dialog { pointer-events: none; }
.scene-leaving .draft-background { opacity: 0; transition: opacity .35s ease; }
.scene-arriving:not(.scene-ready) main, .scene-arriving:not(.scene-ready) .header, .scene-arriving:not(.scene-ready) .footer { visibility: hidden; }
.scene-bridge { position: fixed; inset: 0; z-index: 10000; overflow: hidden; pointer-events: none; }
.scene-bridge-background { position: absolute; inset: 0; overflow: hidden; animation: scene-element-out .35s ease both; }
.scene-echo { position: absolute; animation: scene-element-out .35s ease var(--echo-delay, 0ms) both; }
.scene-echo-text { animation-name: scene-text-out; }
.scene-bridge.is-held > * { animation-play-state: paused; }
@keyframes scene-element-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes scene-element-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes scene-text-out { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(20px); } }
@keyframes scene-text-in { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }

/* The navigation remains accessible at the top on desktop as well as mobile. */
:root { --site-header-height: 88px; }
html { scroll-padding-top: calc(var(--site-header-height) + env(safe-area-inset-top, 0px) + 22px); scrollbar-gutter: stable; }
body.edition-four .header { position: sticky; top: 0; z-index: 80; height: calc(var(--site-header-height) + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); }
body.edition-four .header-person { font-size: 15px; line-height: 1.35; white-space: nowrap; }
.header-person > span { display: block; }
body.edition-four .mobile-menu { top: calc(var(--site-header-height) + env(safe-area-inset-top, 0px)); z-index: 79; }
body.edition-four .hero-four { padding-bottom: 46px; }
.film-index > button { grid-template-columns: 120px minmax(0, 1fr) 28px; }
.footer { grid-template-columns: auto 1fr auto auto; }
.footer > a.micro { justify-self: center; }
.footer .motion-control { grid-column: auto; grid-row: auto; justify-self: end; }
@media (min-width: 701px) {
  .hero-flow { column-gap: 32px; grid-template-columns: minmax(0, 1fr) 200px; }
  .hero-flow > .hero-summary > p { max-width: none; font-size: clamp(17px, 1.8vw, 28px); line-height: 1.4; }
  .hero-summary-line { display: block; white-space: nowrap; }
}
@media (min-width: 701px) and (max-width: 1000px) {
  .hero-flow { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "images" "actions"; }
  .hero-flow > .hero-actions { display: flex; flex-direction: row; justify-self: start; gap: 28px; }
}

@media (max-width: 800px) {
  :root { --site-header-height: 80px; }
  body.edition-four .header-person { font-size: 13px; }
  .film-index > button { grid-template-columns: 95px minmax(0, 1fr) 24px; }
  .footer { grid-template-columns: 1fr auto; }
  .footer > a.micro { grid-column: 2; grid-row: 1; justify-self: end; }
  .footer > span { grid-column: 1; grid-row: 2; }
  .footer .motion-control { grid-column: 2; grid-row: 2; }
}
@media (max-width: 540px) {
  :root { --site-header-height: 74px; }
  body.edition-four .header { gap: 14px; }
  body.edition-four .header-person { font-size: 11px; padding-left: 12px; }
  body.edition-four .hero-four { padding-bottom: 28px; }
  .film-index > button { grid-template-columns: 75px minmax(0, 1fr) 18px; }
}
@media (max-width: 360px) {
  body.edition-four .header-person { font-size: 10px; }
  body.edition-four .header { gap: 10px; }
  body.edition-four .header .logo img { width: 86px; }
}

/* Clear client names and one consistent title scale for the collaboration years. */
.collaboration-page { --collaboration-title-size: clamp(52px, 7.5vw, 112px); }
body.edition-five .collaboration-heading h1,
body.edition-five .collaboration-years > strong { font-family: Instrument, Arial, sans-serif; font-size: var(--collaboration-title-size); font-weight: 600; line-height: 1.02; letter-spacing: -.06em; }
body.edition-five .project-topline { justify-content: flex-start; align-items: baseline; flex-wrap: wrap; text-align: left; }
.project-client { font: 600 clamp(24px, 2.7vw, 40px)/1.15 Instrument, Arial, sans-serif; letter-spacing: -.035em; }
.project-context { font-size: 14px; line-height: 1.5; opacity: .75; }
.project-intro-grid { display: block; }
.working-together { border-top: 1px solid var(--line); }
body.edition-five .architecture-text { display: block; }
body.edition-five .architecture-text > .architecture-story { margin-left: 0; max-width: 1000px; }
body.edition-five .architecture-story > .lead { font-size: clamp(23px, 2.3vw, 34px); line-height: 1.4; }
.architecture-story .credits { margin-top: 24px; }
@media (max-width: 800px) {
  .collaboration-page { --collaboration-title-size: clamp(42px, 7.5vw, 64px); }
}
@media (max-width: 700px) {
  .collaboration-page { --collaboration-title-size: clamp(38px, 10.5vw, 64px); }
  .project-context { font-size: 12px; }
}

/* Personal work has more room alongside the professional portfolio. */
.mrak-note { gap: 24px; margin-top: 36px; padding-top: 30px; }
.mrak-note > img { width: 170px; height: 170px; }
.mrak-note > span:nth-child(2) { min-width: 0; gap: 8px; }
.mrak-note strong { font-size: 20px; font-weight: 600; line-height: 1.3; }
.mrak-note .micro { font-size: 10px; }
.mrak-note > span > span:last-child { font-size: 14px; line-height: 1.5; }
.mrak-arrow { flex: none; }

@media (max-width: 800px) {
  .mrak-note > img { width: 116px; height: 140px; }
  .mrak-note { gap: 18px; }
}
@media (max-width: 700px) {
  :root { --media-radius: 16px; }
  .inline-film-start { width: 56px; height: 56px; font-size: 16px; }
  .inline-film-back { top: 8px; right: 8px; padding: 8px 10px; font-size: 10px; min-height: 36px; }
  .inline-film-credit { font-size: 11px; }
}
@media (max-width: 540px) {
  .mrak-note > img { width: 130px; height: 150px; }
  .mrak-note { gap: 14px; margin-top: 30px; padding-top: 25px; }
  .mrak-note strong { font-size: 18px; }
  .mrak-note > span > span:last-child { font-size: 12px; }
  .mrak-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .typewriter .letter-unit { opacity: 1 !important; transition: none !important; animation: none !important; }
  .letter-unit { transition: none; }
  .scene-unit { animation: none !important; opacity: 1 !important; }
  .scene-bridge { display: none !important; }
}
@media print {
  .typewriter .letter-unit, .scene-unit { opacity: 1 !important; animation: none !important; }
  .inline-film-layer, .inline-film-start, .scene-bridge { display: none !important; }
  .inline-film-slot.is-inline-active > :not(.inline-film-layer) { visibility: visible; }
}

/* V33 — three static headings with Deck8 yellow highlights. */
[data-static-title] .title-highlight {
  background: var(--yellow);
  color: #141414;
  font: inherit;
  padding: .025em .055em;
  border-radius: 0;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
[data-static-title] { opacity: 1; }
