@import url('./base.css');

/* Keep the scroll position visible in the page and the project gallery. */
@media (forced-colors: none) {
  :is(html, #viewer, #viewer-media) {
    scrollbar-color: var(--accent) var(--bg);
    scrollbar-width: thin;
  }
  @supports selector(::-webkit-scrollbar) {
    :is(html, #viewer, #viewer-media) { scrollbar-color: auto; scrollbar-width: auto; }
    :is(html, #viewer, #viewer-media)::-webkit-scrollbar { width: 6px; height: 6px; }
    :is(html, #viewer, #viewer-media)::-webkit-scrollbar-track { background: var(--bg); }
    :is(html, #viewer, #viewer-media)::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 6px; }
    :is(html, #viewer, #viewer-media)::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
  }
}

@font-face {
  font-family: 'Liberation Sans';
  src: url('./assets/fonts/LiberationSans-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Liberation Sans';
  src: url('./assets/fonts/LiberationSans-Bold.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
body { font-family: 'Liberation Sans', sans-serif; }
.contact-title { width: 100%; padding: 0; text-align: left; }
.contact-dialog {
  inset: 0;
  width: min(620px, calc(100% - 32px));
  height: fit-content;
  max-height: calc(100svh - 32px);
  margin: auto;
  padding: 32px;
  border: 1px solid #ffffff30;
  background: var(--paper);
  color: #151515;
  overflow-y: auto;
}
.contact-dialog::backdrop { background: #0007; backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
.contact-dialog .viewer-head { align-items: flex-start; }
.contact-dialog h2 { font-size: clamp(38px, 8vw, 60px); letter-spacing: -.06em; margin: 10px 0 16px; }
.contact-dialog .dialog-intro { font-size: 14px; line-height: 1.5; margin: 0 0 26px; }
.contact-dialog [data-contact-close] { flex-shrink: 0; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-form label { display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.contact-form input, .contact-form textarea { font: inherit; font-size: 16px; border: 1px solid #93938c; border-radius: 0; padding: 12px; background: #fff9; color: #111; width: 100%; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid #506125; outline-offset: 2px; }
.contact-form textarea { resize: vertical; min-height: 120px; }
.form-wide { grid-column: 1 / -1; }
.contact-form .form-honey { display: none; }
.form-note { font-size: 12px; color: #4c4c48; line-height: 1.5; margin: 0; }
.form-note a { text-decoration: underline; }
.send-message { padding: 16px 22px; background: #151515; color: var(--accent); text-align: left; display: flex; justify-content: space-between; }
.send-message:disabled { opacity: .65; cursor: wait; }
.form-status { margin: 0; font-size: 14px; line-height: 1.5; }
.form-status[data-error="true"] { color: #9b241a; }
.form-status:empty { display: block; }
.contact-compact { width: min(580px, calc(100% - 32px)); padding: 26px; }
.contact-compact .viewer-head { gap: 16px; margin-bottom: 24px; align-items: center; }
:is(.contact-compact, .contact-linear) h2 { font-size: 23px; line-height: 1.25; letter-spacing: -.035em; margin: 0; }
:is(.contact-compact, .contact-linear) [data-contact-close] { width: 32px; height: 32px; padding: 0; font-size: 26px; line-height: 1; }
:is(.contact-compact, .contact-linear) [data-contact-close] span { font-size: 26px; }
:is(.contact-compact, .contact-linear) .contact-form { gap: 14px; }
:is(.contact-compact, .contact-linear) .contact-form label { gap: 6px; font-size: 11px; }
:is(.contact-compact, .contact-linear) .contact-form input, :is(.contact-compact, .contact-linear) .contact-form textarea { padding: 10px; }
:is(.contact-compact, .contact-linear) .contact-form textarea { min-height: 88px; }
:is(.contact-compact, .contact-linear) .form-note { font-size: 11px; line-height: 1.45; }
:is(.contact-compact, .contact-linear) .send-message { padding: 13px 16px; }
.contact-compact .form-status:empty, .contact-linear .form-status:empty { display: none; }
.contact-linear { width: min(440px, calc(100% - 32px)); padding: 28px; }
.contact-linear .viewer-head { align-items: center; }
.contact-linear .contact-form { grid-template-columns: 1fr; gap: 12px; }
.contact-linear .contact-form input, .contact-linear .contact-form textarea { background: transparent; border: 0; border-bottom: 1px solid #a7a79e; padding: 7px 0; }
.contact-linear .contact-form textarea { min-height: 76px; }
.contact-linear .send-message { background: transparent; color: #151515; border-bottom: 1px solid #151515; padding: 10px 0; }
.contact-dialog button:focus-visible { outline-color: #506125; }
@media (max-width: 500px) {
  .contact-dialog { padding: 24px 20px; }
  .contact-dialog .contact-form { grid-template-columns: 1fr; gap: 16px; }
  .contact-compact, .contact-linear { padding: 22px 20px; }
  :is(.contact-compact, .contact-linear) h2 { font-size: 22px; }
  .contact-compact .contact-form { gap: 12px; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.legal-footer { padding: 0 36px 35px; font-size: 11px; color: #bdbdb8; }
.legal-footer p { line-height: 1.6; margin: 6px 0; }
.legal-footer nav { flex-wrap: wrap; gap: 14px 24px; font-size: 10px; margin-top: 16px; }
.legal-footer button { text-transform: uppercase; letter-spacing: .07em; font-size: 10px; font-weight: bold; padding: 0; }
.legal-page { max-width: 900px; margin: auto; padding: 60px 24px; }
.legal-page h1 { font-size: clamp(36px, 6vw, 64px); margin: 50px 0; }
.legal-page h2 { font-size: 24px; margin-top: 36px; }
.legal-page p { line-height: 1.75; white-space: normal; overflow-wrap: anywhere; }
.cookie-banner { position: fixed; z-index: 20; bottom: 16px; left: 16px; width: min(600px, calc(100% - 32px)); padding: 24px; background: var(--paper); color: #111; border: 1px solid #888; box-shadow: 0 8px 40px #0005; max-height: calc(100svh - 32px); overflow: auto; }
.cookie-banner h2 { font-size: 22px; margin: 0 0 10px; letter-spacing: -.03em; }
.cookie-banner p, .cookie-dialog p { font-size: 13px; line-height: 1.6; }
.cookie-banner a { text-decoration: underline; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.cookie-actions button { flex: 1 1 120px; padding: 13px 10px; border: 1px solid #111; background: #111; color: #fff; font-size: 12px; }
.cookie-banner button:focus-visible { outline-color: #506125; }
.cookie-dialog h2 { font-size: 36px; }
.consent-option { display: flex; align-items: start; gap: 12px; margin: 24px 0; font-size: 13px; line-height: 1.6; }
.consent-option input { width: 20px; height: 20px; flex-shrink: 0; accent-color: #506125; }
.consent-option:has(input:disabled) { opacity: .6; }
.media-consent { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 24px; background: #161616; color: var(--paper); text-align: center; }
.media-consent p { max-width: 440px; font-size: 14px; line-height: 1.6; }
.media-consent button { padding: 14px 20px; background: var(--accent); color: #111; }
.media-consent .media-consent-settings { margin-top: 12px; padding: 4px 8px; background: none; color: inherit; font-size: 13px; text-decoration: underline; }
@media (max-width: 500px) {
  .cookie-banner { padding: 18px; }
  .legal-footer { padding: 0 20px 30px; }
  .cookie-dialog h2 { font-size: 28px; }
}
.project { display: block; }
.project:focus-visible { outline-offset: -5px; z-index: 2; }
.project .label { pointer-events: none; }
.project strong { overflow-wrap: anywhere; }
.detail-page header { position: relative; }
.detail { max-width: 1400px; margin: 0 auto; padding: 50px 36px 80px; }
.back-link { display: inline-block; color: var(--accent); font-size: 12px; margin-bottom: 60px; }
.detail h1 { font-size: clamp(36px, 6vw, 90px); letter-spacing: -.055em; margin: 20px 0; overflow-wrap: anywhere; }
.detail-caption { color: #bbb; font-size: 12px; letter-spacing: .06em; margin: 25px 0 45px; }
.project-brand { color: #bbb; font-size: 15px; overflow-wrap: anywhere; }
.viewer-brand { margin: 0 0 16px; }
.project-film-title { overflow-wrap: anywhere; margin: 24px 0 10px; }
.detail-image { display: block; max-width: 100%; max-height: 85svh; margin: auto; }
.video-poster { position: relative; aspect-ratio: 16/9; background: #171717; }
.video-poster > img { width: 100%; height: 100%; object-fit: contain; }
.video-poster iframe { width: 100%; height: 100%; border: 0; }
.watch-film { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--accent); color: #111; padding: 20px 28px; border-radius: 2px; white-space: nowrap; }
.video-help { color: #bbb; font-size: 12px; line-height: 1.6; }
.video-help a { color: var(--accent); text-decoration: underline; }
.project-credits {
  max-width: 48rem;
  margin-top: clamp(32px, 5vw, 64px);
  overflow-wrap: anywhere;
}
.project-credits h2 { font-size: clamp(22px, 3vw, 32px); margin: 0 0 16px; }
.project-credits dl { margin: 0; }
.project-credits dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid #444;
  line-height: 1.4;
}
.project-credits dt { color: #bbb; }
.project-credits dd { margin: 0; }
.viewer-credits { margin: 0 0 20px; }
.viewer-credits h3 { font-size: 1rem; font-weight: normal; margin: 0 0 10px; }
.gallery-image { width: 100%; height: auto; aspect-ratio: auto 3 / 2; object-fit: contain; }
.detail-contact { display: inline-block; margin-top: 55px; border-bottom: 1px solid #888; padding-bottom: 12px; }
.filters button, nav a { min-height: 32px; display: inline-flex; align-items: center; }
@media (max-width: 700px) {
  .detail { padding: 25px 20px 55px; }
  .back-link { margin-bottom: 40px; }
  .detail-caption { line-height: 1.7; }
  .project-credits dl > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .viewer-head h2 { overflow-wrap: anywhere; }
  .viewer-foot p { margin: 8px 0; }
  .hero-title p { line-height: 1.6; }
}
@media (max-width: 360px) {
  nav { gap: 14px; }
  .brand img { width: 74px; }
  .contact-title { font-size: 21vw; }
}
.legal-table { overflow-x: auto; }
.legal-table table { border-collapse: collapse; width: 100%; min-width: 36rem; }
.legal-table th, .legal-table td { border: 1px solid currentColor; padding: .65rem; text-align: left; vertical-align: top; }
.legal-draft { border: 1px solid currentColor; padding: 1rem; font-weight: 600; }

:root { --header-gutter: 36px; }
header { padding-inline: var(--header-gutter); }

/* Client area */
.client-area { max-width: 900px; min-height: 65svh; margin: auto; padding: 100px 36px 80px; }
.client-area h1 { font-size: clamp(48px, 8vw, 100px); letter-spacing: -.06em; margin: 28px 0; }
.client-area p:not(.eyebrow) { max-width: 600px; font-size: 18px; line-height: 1.6; }
.client-area p a { color: var(--accent); text-decoration: underline; overflow-wrap: anywhere; }
.client-area .back-link { margin: 35px 0 0; }
@media (max-width: 700px) {
  :root { --header-gutter: 20px; }
  header nav { gap: 14px; }
  .client-area { padding: 70px 20px; }
}
@media (max-width: 360px) {
  header nav { gap: 8px; font-size: 9px; }
}

.icon { display: inline-block; width: 1em; height: 1em; vertical-align: -.12em; flex: none; }
.project .arrow .icon { width: 27px; height: 27px; }
.play .icon { width: 15px; height: 15px; }
.contact-title .icon { width: .75em; height: .75em; }
.menu-fallback { display: flex; flex-wrap: wrap; gap: 12px 20px; padding: 20px; }

/* Explicit playback remains available when reduced motion is preferred. */
@media (prefers-reduced-motion: reduce) { .hero-video { display: block; } }
.cookie-banner { max-height: calc(100svh - 80px); }

/* CMS-hosted video and ordered portfolio media */
.hero-video video { width: 100%; height: 100%; object-fit: cover; }
#viewer > .viewer-head { position: sticky; top: 0; z-index: 2; gap: 12px; align-items: flex-start; background: transparent; pointer-events: none; }
#viewer > .viewer-head #close { pointer-events: auto; }
#viewer-title { flex: 0 1 auto; min-width: 0; max-width: min(70%, 45rem); overflow-wrap: anywhere; margin: 0; padding: 12px 2px; color: #fff; line-height: 1.2; }
#viewer > .viewer-head #close { flex: none; min-width: 44px; min-height: 44px; padding: 12px; color: #fff; }
#viewer > .viewer-head > * { position: relative; isolation: isolate; text-shadow: 0 1px 3px #000; }
#viewer > .viewer-head > *::before { content: ''; position: absolute; z-index: -1; inset: 3px; border-radius: 50%; background: #000d; filter: blur(12px); pointer-events: none; }
#viewer > .viewer-head #close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px #111; }
#viewer-media:has(> :nth-child(2)) { display: block; height: auto; overflow: visible; }
#viewer-media:has(> :nth-child(2)) > * { display: block; width: 100%; height: auto; max-height: 80svh; margin: 0 auto 1rem; }
#viewer-media:has(> :nth-child(2)) iframe { height: 70svh; }
#viewer-media .viewer-film { width: 100%; margin: 0 0 1rem; }
#viewer-media .viewer-film figcaption { font-size: 18px; margin: 0 0 10px; overflow-wrap: anywhere; }
#viewer-media .viewer-film iframe { display: block; height: auto; aspect-ratio: 16 / 9; max-height: 70svh; }
#viewer-media video, .detail video { display: block; max-width: 100%; max-height: 85svh; margin: 0 auto; }
/* Fixed Duoline navigation */
.menu-ready header { padding-right: calc(var(--header-gutter) + 60px); }
.menu-control { position: fixed; z-index: 19; top: 22px; right: var(--header-gutter); }
.menu-control .menu-toggle { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: #151515; color: var(--paper); border: 1px solid var(--paper); }
.menu-control .menu-label { display: none; }
.menu-control .menu-symbol { display: block; position: relative; width: 19px; height: 10px; border-top: 2px solid; }
.menu-control .menu-symbol::after { content: ''; position: absolute; left: 6px; right: 0; top: 6px; border-top: 2px solid; }
.menu-control .site-menu { position: absolute; top: 100%; right: 0; display: flex; flex-direction: column; gap: 0; width: 180px; max-height: calc(100svh - 80px); margin-top: 6px; padding: 6px 14px; overflow-y: auto; background: var(--paper); color: #111; box-shadow: 0 8px 24px #0006; font-size: 11px; }
.menu-control .site-menu a { min-height: 42px; border-bottom: 1px solid #c6c6be; }
.menu-control .site-menu a:last-child { border-bottom: 0; }
.menu-control .site-menu a:hover { color: #506125; }
.menu-control .site-menu a:focus-visible { outline: 2px solid #506125; outline-offset: -3px; }
@media (max-width: 700px) { .menu-control { top: 17px; } }
@media (max-width: 400px) { .menu-ready header > nav > a { display: none; } }
@media (forced-colors: active) { .menu-control .menu-toggle { border: 1px solid ButtonText; } }

@media (forced-colors: active) {
  #viewer > .viewer-head > *, #viewer > .viewer-head #close { background: Canvas; color: CanvasText; text-shadow: none; }
  #viewer > .viewer-head > *::before { display: none; }
  #viewer > .viewer-head #close:focus-visible { outline-color: Highlight; box-shadow: none; }
}

/* Page and project return controls */
.back-to-top { position: fixed; z-index: 19; right: max(var(--header-gutter), env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--paper); background: #151515; color: var(--paper); }
.back-to-top .icon { width: 22px; height: 22px; }
.back-to-top:focus-visible { outline: 2px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px #111; }
@media (max-width: 700px) { .cookie-banner { width: min(600px, calc(100% - 16px - max(var(--header-gutter), env(safe-area-inset-right)) - 56px)); } }
#viewer { padding-bottom: max(90px, calc(env(safe-area-inset-bottom) + 70px)); }
#viewer .back-to-top { z-index: 3; }
@media (forced-colors: active) { .back-to-top:focus-visible { outline-color: Highlight; box-shadow: none; } }

.legal-footer { padding-right: calc(max(var(--header-gutter), env(safe-area-inset-right)) + 60px); }
.legal-footer, .menu-fallback { padding-bottom: max(90px, calc(env(safe-area-inset-bottom) + 70px)); }

/* The home control appears after the first visible projects. */
body.home-page > a.back-to-top { visibility: hidden; }
body.home-page > a.back-to-top.is-visible { visibility: visible; }
