/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/eb-garamond-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/eb-garamond-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/eb-garamond-latin-400-italic.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/eb-garamond-latin-ext-400-italic.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/eb-garamond-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/eb-garamond-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/cormorant-garamond-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/cormorant-garamond-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/cormorant-garamond-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-soft: #f4f3f1;
  --ink: #111111;
  --ink-soft: #55524e;
  --line: #e4e2de;
  --display: "Cormorant Garamond", "Garamond", "Times New Roman", serif;
  --body: "EB Garamond", "Garamond", "Times New Roman", serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1400px;
  --header-h: 72px;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink-soft); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
/* Sticky footer: the page is at least one screen tall and main grows to fill it,
   so on short pages the footer sits at the bottom and the empty space is above it. */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
main { flex: 1 0 auto; }
.site-header, .site-footer { flex-shrink: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand { display: block; flex: 0 1 auto; min-width: 0; }
.brand img { width: clamp(190px, 22vw, 262px); height: auto; }
.nav { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 26px); }
.nav a { text-decoration: none; font-family: var(--display); font-size: 1.15rem; font-weight: 500; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover { border-bottom-color: var(--ink-soft); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.nav .social { display: flex; gap: 6px; margin-left: 4px; }
.nav .social a { border: 0; display: grid; place-items: center; width: 34px; height: 34px; }
.icon { width: 18px; height: 18px; fill: currentColor; }
.menu-toggle { display: none; }

@media (max-width: 820px) {
  :root { --header-h: 60px; }
  /* backdrop-filter would trap the fixed menu inside the header, so use a solid header on small screens */
  .site-header { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .menu-toggle {
    display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px;
    background: none; border: 0; color: var(--ink); cursor: pointer; padding: 0;
  }
  .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
    content: ""; display: block; width: 24px; height: 1.5px; background: currentColor; position: relative; transition: transform .25s ease, background .25s ease;
  }
  .menu-toggle span::before { position: absolute; top: -7px; }
  .menu-toggle span::after { position: absolute; top: 7px; }
  .menu-open .menu-toggle span { background: transparent; }
  .menu-open .menu-toggle span::before { transform: translateY(7px) rotate(45deg); }
  .menu-open .menu-toggle span::after { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: var(--bg);
    flex-direction: column; justify-content: flex-start; align-items: flex-start;
    padding: 32px var(--gutter); gap: 6px;
    visibility: hidden; opacity: 0; transition: opacity .2s ease, visibility 0s linear .2s;
  }
  .menu-open .nav { visibility: visible; opacity: 1; transition: opacity .2s ease; }
  .menu-open { overflow: hidden; }
  .nav a { font-size: 2rem; padding: 4px 0; }
  .nav .social { margin: 24px 0 0; gap: 20px; }
  .nav .social a { width: 44px; height: 44px; }
  .icon { width: 22px; height: 22px; }
}

/* ---------- Project grid ---------- */
.grid {
  display: grid; gap: 40px 22px;
  grid-template-columns: 1fr;
  padding: 24px 0 72px;
}
@media (min-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 36px 18px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 44px 24px; } }
.card { text-decoration: none; display: block; }
.card .frame { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .3s ease; }
.card:hover img { transform: scale(1.035); }
.card h2 { font-size: 1.3rem; margin: 12px 0 0; font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .card img { transition: none; } .card:hover img { transform: none; } }

/* ---------- Clients ---------- */
.clients { padding: 24px 0 64px; }
.clients h2 { font-size: 1.6rem; text-align: center; margin-bottom: 20px; }
.logos {
  list-style: none; margin: 0 auto; padding: 0; max-width: 1100px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 12px; align-items: center;
}
@media (min-width: 560px) { .logos { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .logos { grid-template-columns: repeat(6, 1fr); } }
.logos img { width: 100%; max-width: 170px; margin: 0 auto; mix-blend-mode: multiply; opacity: .85; }

/* ---------- Project page ---------- */
.project { max-width: 1120px; margin: 0 auto; padding: 16px var(--gutter) 64px; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.player video, .player iframe { width: 100%; height: 100%; border: 0; background: #000; }
.player video { object-fit: contain; }
.yt-facade { display: block; position: relative; width: 100%; height: 100%; color: #fff; cursor: pointer; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; }
.play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center;
  transition: background .2s ease, transform .2s ease; pointer-events: none;
}
.play svg { width: 26px; height: 26px; fill: #fff; margin-left: 4px; }
.yt-facade:hover .play, .yt-facade:focus-visible .play { background: rgba(0,0,0,.8); transform: scale(1.06); }
.project-info { display: grid; gap: 8px 48px; padding: 36px 0 12px; }
@media (min-width: 860px) { .project-info { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.project-info h1 { margin-bottom: .2em; }
.project-info .subtitle { font-family: var(--display); font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 .4em; letter-spacing: .04em; text-transform: uppercase; }
.description p { max-width: 62ch; }
.credits { list-style: none; margin: 0; padding: 0; font-size: 1rem; line-height: 1.55; align-self: start; }
@media (min-width: 860px) { .credits { padding-top: .6rem; } }
.credits li { padding: 1px 0; }
.credits .role { color: var(--ink-soft); }
.ext-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 8px 0 0; padding: 0; list-style: none; }
.stills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 40px 0 0; }
@media (min-width: 860px) { .stills { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
.stills img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-soft); }
.still { display: block; overflow: hidden; cursor: zoom-in; }
.still img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
@media (hover: hover) { .still:hover img { transform: scale(1.06); } }
.still:focus-visible img { transform: scale(1.06); }

/* Photo lightbox (a <dialog> created by site.js) */
.lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(10, 10, 10, .55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.lightbox img { display: block; max-width: calc(100vw - 2 * var(--gutter)); max-height: calc(100dvh - 120px); width: auto; height: auto; object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.lightbox-close { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; cursor: pointer; transition: background .2s; }
.lightbox-close:hover { background: rgba(0, 0, 0, .75); }
.lightbox-close:focus-visible { outline-color: #fff; }
.lightbox-close svg { width: 22px; height: 22px; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; cursor: pointer; transition: background .2s; }
.lightbox-nav:hover { background: rgba(0, 0, 0, .75); }
.lightbox-nav:focus-visible { outline-color: #fff; }
.lightbox-nav[hidden] { display: none; }
.lightbox-nav svg { width: 26px; height: 26px; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
@media (min-width: 601px) { .lightbox img { max-width: calc(100vw - 160px); } }
@media (max-width: 600px) { .lightbox-nav { width: 44px; height: 44px; top: auto; bottom: 16px; transform: none; } .lightbox-prev { left: 16px; } .lightbox-next { right: 16px; } }
.lightbox[open] { animation: lightbox-in .25s ease-out; }
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }
html.lightbox-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .still img { transition: none; } .still:hover img, .still:focus-visible img { transform: none; } .lightbox[open] { animation: none; } }

.pager { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin-top: 48px; padding-top: 24px; }
.pager a { text-decoration: none; display: flex; flex-direction: column; max-width: 48%; min-height: 44px; }
.pager .next { text-align: right; margin-left: auto; }
.pager small { font-size: .85rem; color: var(--ink-soft); letter-spacing: .08em; text-transform: uppercase; }
.pager strong { font-family: var(--display); font-weight: 500; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); line-height: 1.2; }
.pager a:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ---------- Short films list ---------- */
.films { padding: 24px 0 72px; display: grid; gap: 72px; }
.film { display: grid; gap: 22px; align-items: center; }
@media (min-width: 860px) {
  .film { grid-template-columns: 1.25fr 1fr; gap: 56px; }
  .film:nth-child(even) { grid-template-columns: 1fr 1.25fr; } /* mirror the columns so every image gets the wide one */
  .film:nth-child(even) .film-media { order: 2; }
}
.film-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.film-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.film-media:hover img { transform: scale(1.03); }
.film-text { text-align: center; padding: 0 8px; }
.film-text .subtitle { font-family: var(--display); font-size: 1.1rem; color: var(--ink-soft); max-width: none; margin: 0 auto 6px; }
.film-text h2 { margin-bottom: .4em; }
.film-text p { max-width: 44ch; margin: 0 auto 1.4em; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 30px;
  border: 1px solid var(--ink); text-decoration: none; font-family: var(--display); font-size: 1.1rem; font-weight: 600;
  transition: background .2s ease, color .2s ease;
}
.button:hover { background: var(--ink); color: var(--bg); }

/* ---------- Text pages ---------- */
.page { max-width: 760px; margin: 0 auto; padding: 32px var(--gutter) 72px; }
.prose p { font-size: 1.1rem; }
.about-photo { margin: 28px 0 32px; }
.about .clients { padding: 40px 0 32px; }
.about .logos { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 560px) { .about .logos { grid-template-columns: repeat(4, 1fr); } }
.lego { display: grid; gap: 24px; align-items: center; border-top: 1px solid var(--line); padding-top: 40px; }
@media (min-width: 640px) { .lego { grid-template-columns: 260px 1fr; gap: 36px; } }
.lego h2 { font-size: 1.8rem; }
.contact-instagram { display: flex; justify-content: center; margin: 32px 0 44px; }
.contact-instagram a { display: grid; place-items: center; width: 64px; height: 64px; }
.contact-instagram .icon { width: 34px; height: 34px; }
.legal { font-size: .9rem; color: var(--ink-soft); line-height: 1.5; }

/* Social icons (header, footer, Contact page): black circle + slight grow on hover */
.nav .social a, .site-footer .social a, .contact-instagram a { border: 0; border-radius: 50%; color: var(--ink); text-decoration: none; transition: transform .3s cubic-bezier(.2, .7, .2, 1), background .3s, color .3s; }
.nav .social a:hover, .nav .social a:focus-visible,
.site-footer .social a:hover, .site-footer .social a:focus-visible,
.contact-instagram a:hover, .contact-instagram a:focus-visible { background: var(--ink); color: var(--bg); transform: scale(1.08); }
@media (prefers-reduced-motion: reduce) { .nav .social a, .site-footer .social a, .contact-instagram a { transition: none; transform: none !important; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); padding: 44px 0 36px; text-align: center; font-size: .95rem; color: var(--ink-soft); }
.site-footer .social { display: flex; justify-content: center; gap: 12px; margin-bottom: 16px; color: var(--ink); }
.site-footer .social a { display: grid; place-items: center; width: 44px; height: 44px; }
.site-footer p { margin: 0 0 .4em; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 96px var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
