/* Red Sheep | dark, quiet theme: a boutique company. Small light type, hairlines, space,
   a barely visible moving grain. The only playful thing on the site is the flock.
   Loaded last, on every public page. */

@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2"); }

:root {
  --font-display: "Bricolage Grotesque", "Lato", sans-serif;
  --gx: clamp(20px, 3.2vw, 56px);
  /* full width, with one left and right edge for header, content and footer */
  --edge: var(--gx);
  --top: clamp(32px, 6vw, 72px);
}
html { scrollbar-gutter: stable; }
a { text-underline-offset: 4px; }

/* flat dark ground, with the grain moving behind everything */
body { background-image: none; }
body::before { display: none; }
body::after {
  content: ""; position: fixed; inset: -160px; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .93 0 0 0 0 .91 0 0 0 0 .86 0 0 0 .09 -.02'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.36s steps(1) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  17% { transform: translate(-71px, 43px); }
  33% { transform: translate(52px, -88px); }
  50% { transform: translate(-37px, -59px); }
  67% { transform: translate(83px, 29px); }
  83% { transform: translate(-94px, 76px); }
}
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }

/* ---------- top bar: a small red dot marks the selection ---------- */
.bar .brand { font-weight: 700; font-size: 12px; letter-spacing: 0.22em; }
.nav a { font-weight: 400; font-size: 12px; letter-spacing: 0.14em; }
.nav a::after {
  left: 50%; right: auto; bottom: -2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  transform: scale(0); transform-origin: center;
}
.nav a:hover::after, .nav a:focus-visible::after, .nav a[aria-current="page"]::after { transform: scale(1); }

/* ---------- homepage ---------- */
.tagline { top: var(--top); left: var(--edge); max-width: min(560px, 80vw); }
.tagline-eyebrow { margin-bottom: 12px; color: var(--ink-dim); font-weight: 400; }
.tagline h1 { font-family: var(--font-display); font-weight: 300; font-size: clamp(22px, 2.4vw, 34px); line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
.card-title, .panel-title { font-family: var(--font-display); font-weight: 400; }
.panel-title { font-size: clamp(26px, 3vw, 32px); }
@media (max-width: 640px) {
  .tagline { top: 16px; left: 20px; max-width: 84vw; }
  .tagline h1 { font-size: 21px; }
}

/* ---------- about ---------- */



/* steps and services: numbered rows between hairlines */




/* soft appearance while scrolling */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.is-seen { opacity: 1; transform: none; }
#team { scroll-margin-top: var(--bar-h); }

@media (max-width: 760px) {
}

/* ---------- red accents and details, all pages ---------- */
::selection { background: var(--red); color: #fff; }

.page { counter-reset: part; }

/* the dash trick and a non-scaling stroke do not mix: let the line scale */


/* a short red rule opens every page title and group */

/* ---------- inner pages ---------- */
.eyebrow { font-weight: 400; color: var(--ink-dim); letter-spacing: 0.2em; }
.page .page-title, .page .project-title { font-family: var(--font-display); font-weight: 300; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.2; letter-spacing: -0.01em; }
.lead { font-size: 15px; color: #bdbab2; }

.page .work-title, .page .news-title, .page .more-card .more-title { font-family: var(--font-display); font-weight: 400; font-size: 18px; }
.work-title { display: inline-block; background: linear-gradient(var(--red), var(--red)) left bottom / 0 1px no-repeat; transition: background-size 0.35s ease; }
.work:hover .work-title, .work:focus-visible .work-title { background-size: 100% 1px; }
.page .work-meta, .page .back, .page .news-link, .page .laurel-kind, .page .sec-num { font-weight: 400; }
.work-media, .more-media { position: relative; background-image: none; border-radius: 3px; }
/* no image yet: a faint red sheep instead of an empty box */
.work-media:not(:has(img))::before, .more-media:not(:has(img))::before { content: ""; position: absolute; inset: 0; background: url("../assets/sheep-red.svg") center / 44px no-repeat; opacity: 0.45; transition: opacity 0.3s ease; }
.work:hover .work-media::before, .more-card:hover .more-media::before { opacity: 0.9; }
.work-placeholder { position: absolute; right: 12px; bottom: 10px; font-size: 9px; }
.badge { display: flex; align-items: center; gap: 7px; background: rgba(27, 28, 31, 0.85); color: var(--ink); font-weight: 400; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--red); }

.page .story { font-size: 16px; }
.page .fact dd { font-size: 15px; }
.sec-head::after { background: var(--red); flex-basis: 28px; }

.btn { font-weight: 400; font-size: 11px; }
.btn-solid:hover { background: #b10f12; border-color: #b10f12; }

.contact-list { max-width: 640px; margin: 40px 0 28px; }
.contact-list dt { margin-top: 0; padding: 20px 0 6px; border-top: 1px solid var(--line); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); }
.contact-list dd { margin: 0 0 20px; font-family: var(--font-display); font-weight: 300; font-size: 21px; }
.contact-list a { border-bottom-color: var(--red); transition: color 0.2s ease; }
.contact-list a:hover { color: #f0474b; }

body .page .lost-code { font-family: var(--font-display); font-weight: 200; font-size: clamp(48px, 7vw, 80px); }

/* Bricolage has no italic: film titles use the real Lato italic */
.page-title em, .project-title em, .work-title em, .more-title em, .card-title em, .panel-title em { font-family: "Lato", sans-serif; font-weight: 400; }

/* small red text: lighter and a little larger, so it reads on the dark */
.page .laurel-kind { font-size: 10px; }

/* ---------- one frame for every page ---------- */
.bar { padding-left: var(--edge); padding-right: var(--edge); }
.page { max-width: none; padding: calc(var(--bar-h) + var(--top)) var(--edge) 24px; }
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 20px 40px; margin-bottom: clamp(40px, 5vw, 64px); }
.page-head .eyebrow { margin: 10px 0 0; }
.page-head .eyebrow::before { content: ""; display: block; width: 28px; height: 1px; margin-bottom: 14px; background: var(--red); }
.page-head .page-title { margin: 0 0 12px; }
.page-head .lead { margin: 0; max-width: 56ch; }
.page .back { margin-top: 10px; }
.site-foot { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 24px; padding: 32px var(--edge) 40px; line-height: 2; text-transform: none; letter-spacing: 0.02em; font-size: 12px; }
.site-foot a { text-decoration: none; color: var(--ink); }
.site-foot a:hover { text-decoration: underline; text-decoration-color: var(--red); }
.site-foot span:last-child { text-align: right; }


/* ---------- projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 18px 0; margin-bottom: 56px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filter { padding: 4px 0; border: 0; border-bottom: 1px solid transparent; background: none; color: var(--ink-dim); font: inherit; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; cursor: pointer; }
.filter:hover { color: var(--ink); }
.filter[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--red); }
.filter:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.filter-count { margin-left: 6px; color: #f0474b; font-size: 9px; vertical-align: top; letter-spacing: 0; }
.group { margin-bottom: 72px; }
.page .group-title { display: flex; align-items: center; gap: 18px; margin: 0 0 28px; padding: 0; border: 0; font-size: 11px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.works { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 44px 24px; }
.page .work-title { margin: 16px 0 4px; }
.page .work-meta { margin: 0; }

/* ---------- contacts ---------- */
.page-head .contact-list { margin: 36px 0 0; }

/* ---------- homepage: tagline, invitation, project sheet ---------- */
.tagline-sub { margin: 12px 0 0; color: var(--ink-dim); font-size: 15px; }
.foot a { color: inherit; text-decoration: none; pointer-events: auto; }
.foot { padding-left: var(--edge); padding-right: var(--edge); }
.hint { left: var(--edge); }

.invite { position: absolute; left: 50%; top: auto; bottom: 44px; z-index: 3700; width: max-content; max-width: calc(100% - 40px); margin: 0; padding: 0 0 10px; border: 0; background: none; box-shadow: none; color: var(--ink); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; text-align: center; pointer-events: none; opacity: 0; transform: translate(-50%, 6px); transition: opacity 0.6s ease, transform 0.6s ease; }
.invite::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 0; height: 1px; background: var(--red); transform: translateX(-50%); transition: width 1.2s ease 0.3s; }
.invite.is-in { opacity: 1; transform: translate(-50%, 0); transition-duration: 0.6s; }
.invite.is-in::after { width: 100%; }

.card { border-radius: 4px; }
.scrim { background: rgba(12, 13, 15, 0.72); }
.panel { top: 50%; left: 50%; right: auto; bottom: auto; width: min(640px, calc(100vw - 24px)); max-height: 86vh; display: flex; flex-direction: column; align-items: flex-start; padding: 32px clamp(20px, 4vw, 40px) 36px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); transform: translate(-50%, -48%); }
.panel.is-in { transform: translate(-50%, -50%); }
.panel > * { flex: none; }
.panel-media { order: -1; align-self: stretch; margin: 28px 0 24px; border: 0; border-radius: 2px; }
.panel-media:not(.has-image) { display: none; }
.panel-media.has-image { background-size: cover; }
.panel-close { top: 8px; right: 8px; width: 36px; height: 36px; }
.panel-body { align-self: stretch; }
.panel-body dl { padding-top: 18px; border-top: 1px solid var(--line); }
.panel .btn-solid { background: transparent; border-color: var(--line); color: var(--ink); }
.panel .btn-solid:hover { background: transparent; border-color: var(--red); }

@media (max-width: 760px) {
  .page-head { grid-template-columns: minmax(0, 1fr); }
  .site-foot { grid-template-columns: 1fr 1fr; }
  .site-foot span:last-child { text-align: left; }
  .filters { gap: 8px 20px; margin-bottom: 40px; }
}
@media (max-width: 640px) {
  :root { --top: 28px; }
  .hint { left: 20px; }
  .invite { bottom: 40px; }
}
@media (prefers-reduced-motion: reduce) { .invite, .invite::after { transition: none; } }


/* ---------- page header: stacked, the same on every page ---------- */
.page-head { display: block; margin-bottom: clamp(40px, 5vw, 64px); }
.page-head .eyebrow { margin: 0 0 14px; }
.page-head .eyebrow::before { display: none; }
.page .laurel-kind, .page .sec-num { color: #f0474b; }

/* ---------- projects: only pictures, titles and a quiet filter ---------- */
.filters { gap: 8px 28px; margin: 0 0 48px; padding: 0; border: 0; }
.group { margin-bottom: 64px; }
.page .group-title { margin-bottom: 22px; }
.group-title::after, .badge, .work-placeholder { display: none; }
.works { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 40px 20px; }
.work-media, .more-media { border: 0; }
.page .work-title { margin-top: 14px; }

/* ---------- about: full width, each section with its own shape ---------- */
.ab-sec { padding: clamp(72px, 9vw, 140px) 0; border-top: 1px solid var(--line); }
.ab-sec:first-child { padding-top: 0; border-top: 0; }
.ab-label { margin: 0 0 clamp(28px, 4vw, 48px); color: var(--ink-dim); font-size: 11px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; }
.ab-label::before { content: ""; display: inline-block; width: 28px; height: 1px; margin-right: 14px; vertical-align: middle; background: var(--red); }
.ab-sec p { max-width: 58ch; margin: 0 0 14px; color: #bdbab2; font-size: 15px; line-height: 1.75; }

.ab-sec .ab-statement, .ab-sec .ab-lead, .ab-sec .ab-big { margin: 0; color: var(--ink); font-family: var(--font-display); font-weight: 300; line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }
.ab-sec .ab-statement { max-width: 24ch; font-size: clamp(30px, 4.4vw, 64px); }
.ab-sec .ab-lead, .ab-sec .ab-big { max-width: 26ch; font-size: clamp(24px, 2.8vw, 40px); }
.ab-half { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px clamp(32px, 6vw, 120px); align-items: start; }
.ab-intro { margin-top: 36px; }
.ab-intro > :first-child { grid-column: 2; }

/* the wide still: a film frame, with the sheep while there is no picture */
.ab-still { position: relative; display: grid; place-items: center; aspect-ratio: 21 / 9; margin: clamp(48px, 6vw, 88px) 0 0; overflow: hidden; background: var(--bg-2); }
.ab-still img { width: 100%; height: 100%; object-fit: cover; }
.ab-still img.empty { width: 64px; height: auto; opacity: 0.5; }

.ab-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 0 clamp(24px, 3vw, 48px); }
.ab-col { padding: 28px 0 8px; border-top: 1px solid var(--line); transition: border-color 0.3s ease; }
.ab-col:hover { border-top-color: var(--red); }
.ab-num { display: block; margin-bottom: clamp(40px, 6vw, 96px); color: #f0474b; font-family: var(--font-display); font-weight: 200; font-size: clamp(40px, 5vw, 72px); line-height: 1; }
.ab-col h3 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 400; font-size: 22px; }

/* Trentino: the Dolomites run from one side of the window to the other */
.ab-peaks { margin: 0 calc(-1 * var(--edge)) clamp(40px, 5vw, 64px); }
.ab-peaks svg { display: block; width: 100%; height: clamp(90px, 16vw, 240px); }
.ab-peaks path { fill: none; stroke: var(--red); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ab-place { margin-top: 24px; color: var(--ink-dim); font-size: 11px; letter-spacing: 0.2em; }
.reveal .ab-peaks { clip-path: inset(0 100% 0 0); transition: clip-path 2.4s ease 0.2s; }
.reveal.is-seen .ab-peaks { clip-path: inset(0); }

.ab-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 56px clamp(24px, 4vw, 72px); }
.ab-person { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px; align-items: end; }
.ab-portrait { display: grid; place-items: center; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-2); }
.ab-portrait img { width: 100%; height: 100%; object-fit: cover; }
.ab-portrait .monogram { font-family: var(--font-display); font-size: 40px; font-weight: 200; }
.ab-person h3 { margin: 0 0 4px; font-family: var(--font-display); font-weight: 300; font-size: 28px; }
.ab-sec .ab-role { margin: 0 0 18px; color: var(--ink-dim); font-size: 13px; }
.ab-sec .ab-person p { font-size: 14px; }

.ab-btn { display: inline-block; margin-top: 16px; padding: 12px 22px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; transition: border-color 0.2s ease; }
.ab-btn:hover { border-color: var(--red); }
.ab-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.ab-sec.ab-cta { text-align: center; }
.ab-mark { display: block; width: 44px; height: auto; margin: 0 auto 22px; }
.ab-cta h2 { margin: 0; font-family: var(--font-display); font-weight: 300; font-size: clamp(30px, 4.4vw, 64px); line-height: 1.15; letter-spacing: -0.015em; }
.ab-sec .ab-cta-line { max-width: none; margin: 8px 0 20px; color: var(--ink); font-family: var(--font-display); font-weight: 300; font-size: clamp(20px, 2.2vw, 28px); }
.ab-sec.ab-cta p { margin-left: auto; margin-right: auto; }
#team { scroll-margin-top: var(--bar-h); }

/* ---------- contacts: across the whole width ---------- */
.page-head .contact-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 0 32px; max-width: none; margin-top: clamp(48px, 7vw, 96px); }
.contact-list > div { border-top: 1px solid var(--line); }
.contact-list > div dt { border: 0; }

@media (max-width: 760px) {
  .ab-half, .ab-person { grid-template-columns: minmax(0, 1fr); }
  .ab-intro > :first-child { grid-column: auto; }
  .ab-still { aspect-ratio: 4 / 3; }
  .ab-portrait { max-width: 320px; }
}

/* ---------- header and footer use the whole window, the content a narrow centred column ---------- */
.page { padding-left: max(var(--gx), calc(50% - 440px)); padding-right: max(var(--gx), calc(50% - 440px)); }

.works { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 36px 16px; }
.page .work-title { font-size: 16px; }

.ab-sec { padding: clamp(56px, 6vw, 88px) 0; }
.ab-sec:first-child { padding: 0 0 clamp(32px, 4vw, 48px); }
.ab-sec .ab-statement { max-width: 24ch; font-size: clamp(28px, 3.2vw, 42px); }
.ab-sec .ab-lead, .ab-sec .ab-big { font-size: clamp(21px, 2.1vw, 27px); }
.ab-half { gap: 24px clamp(28px, 4vw, 64px); }
.ab-num { margin-bottom: 32px; font-size: 36px; }
.ab-col h3 { font-size: 19px; }
.ab-cta h2 { font-size: clamp(28px, 3.2vw, 42px); }

.ab-people { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 40px; }
.ab-person { grid-template-columns: 150px minmax(0, 1fr); gap: 22px; align-items: start; }
.ab-portrait .monogram { font-size: 28px; }
.ab-person h3 { font-size: 22px; }

/* ---------- one size up ---------- */
.page { padding-left: max(var(--gx), calc(50% - 500px)); padding-right: max(var(--gx), calc(50% - 500px)); }
.bar .brand { font-size: 13px; }
.nav a { font-size: 13px; }
.site-foot { font-size: 13px; }
.page .page-title { font-size: clamp(32px, 3.6vw, 46px); }
.page-head .eyebrow, .ab-label, .page .group-title, .filter, .page .work-meta { font-size: 12px; }
.page-head .lead, .ab-sec p { font-size: 16px; }
.ab-sec .ab-statement { font-size: clamp(30px, 3.7vw, 48px); }
.ab-sec .ab-lead, .ab-sec .ab-big { font-size: clamp(23px, 2.4vw, 31px); }
.ab-num { font-size: 42px; }
.ab-col h3 { font-size: 21px; }
.ab-cta h2 { font-size: clamp(30px, 3.7vw, 48px); }
.ab-person { grid-template-columns: 175px minmax(0, 1fr); }
.ab-person h3 { font-size: 24px; }
.ab-sec .ab-person p { font-size: 15px; }
.works { grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); }
.page .work-title { font-size: 18px; }
.contact-list dd { font-size: 23px; }
.page-head .contact-list { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 0 20px; }

/* the Dolomites, from one side of the window to the other */
.ab-range { margin-bottom: clamp(36px, 4vw, 56px); }
.ab-range .ab-peaks { margin: 0 calc(50% - 50vw); }
.ab-range .ab-peaks svg { height: clamp(100px, 14vw, 220px); }

/* the sheep that strolls down the page, behind everything that is read */
#content { position: relative; }
#content > .ab-sec { position: relative; z-index: 1; }
.ab-walker { position: absolute; left: 0; top: 0; z-index: 0; width: 104px; color: var(--red); opacity: 0.75; pointer-events: none; will-change: transform; }
.ab-walker svg { display: block; width: 100%; height: auto; overflow: visible; fill: none; stroke: currentColor; stroke-width: 18; stroke-linejoin: round; stroke-linecap: round; }
@media (max-width: 760px) { .ab-walker { width: 78px; opacity: 0.6; } .ab-walker svg { stroke-width: 24; } }

@media (max-width: 760px) {
  .ab-person { grid-template-columns: 120px minmax(0, 1fr); gap: 16px; }
}

/* ---------- contact boxes ---------- */
.contact-cards { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 14px; margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; }
.contact-cards li { display: flex; }
.contact-card { position: relative; flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 230px; padding: 24px 22px; border: 1px solid var(--line); border-radius: 4px; background: rgba(35, 36, 39, 0.6); text-decoration: none; color: inherit; transition: border-color 0.3s ease, transform 0.3s ease; }
a.contact-card:hover, a.contact-card:focus-visible { border-color: var(--red); transform: translateY(-3px); }
a.contact-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
a.contact-card::after { content: "\2197"; position: absolute; top: 20px; right: 20px; color: var(--ink-dim); transition: color 0.3s ease; }
a.contact-card:hover::after { color: #f0474b; }
.contact-icon { display: block; width: 32px; margin-bottom: auto; color: var(--red); }
.contact-icon svg { display: block; width: 100%; height: auto; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.contact-label { margin-top: 32px; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); }
.contact-value { margin-top: 6px; font-family: var(--font-display); font-weight: 300; font-size: 19px; white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 760px) { .contact-card { min-height: 160px; } .contact-label { margin-top: 22px; } }
@media (prefers-reduced-motion: reduce) { .contact-card { transition: none; } }


/* the headline sits high, the field belongs to the flock */
.tagline { top: 8px; }
@media (max-width: 640px) { .tagline { top: 4px; } }

/* a thin, quiet scrollbar everywhere, without arrows */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: #1b1c1f; }
::-webkit-scrollbar-thumb { background: rgba(236, 233, 225, 0.2); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #d01317; }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: rgba(236, 233, 225, 0.2) transparent; } }

/* ---------- pictures keep their own proportions ---------- */
/* every picture has the same height: its width follows its shape. Three wide ones fill a row */
.page .works { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 36px 16px; }
.gallery::after { content: ""; flex-grow: 999999; }
.works > .work { --r: 1.7778; flex: 0 0 calc(var(--r) * (100% - 33px) / 5.3334); min-width: 0; max-width: 100%; }
.page .work-media { aspect-ratio: var(--r); }

.page .hero { aspect-ratio: var(--r, 1.7778); max-height: 82vh; border: 0; box-shadow: none; }
.page .hero .slide img { object-fit: contain; transform: none; }

.page .poster img { aspect-ratio: auto; height: auto; object-fit: contain; }
.page .news-card img { aspect-ratio: auto; height: auto; }

.page .gallery { display: flex; flex-wrap: wrap; gap: 12px; overflow: visible; }
.page .gallery-item { --r: 1.7778; aspect-ratio: var(--r); flex: var(--r) 1 calc(var(--r) * 138px); min-width: 0; max-width: 100%; border: 0; }

.page .more-row { display: flex; align-items: flex-start; gap: 20px; }
.page .more-card { --r: 1.7778; flex: var(--r) 1 0; min-width: 0; max-width: calc(var(--r) * 160px); }
.page .more-media { aspect-ratio: var(--r); }

.page .ab-still:has(img:not(.empty)) { display: block; aspect-ratio: auto; align-self: start; }
.page .ab-still img:not(.empty) { width: 100%; height: auto; }
/* the two portraits are the exception: always the same 4:5 frame, keeping more of the top */
.page .ab-portrait { align-self: start; }
.page .ab-portrait img:not(.empty) { object-position: 50% 25%; }

@media (max-width: 900px) {
  .works > .work { flex-basis: calc(var(--r) * (100% - 17px) / 3.5556); }
}
@media (max-width: 640px) {
  .works > .work { flex-basis: 100%; }
}
@media (max-width: 820px) {
  /* one row that slides sideways, all the same height */
  .page .gallery { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
  .page .gallery::after { display: none; }
  .page .gallery-item { flex: 0 0 auto; height: 190px; scroll-snap-align: start; }
  .page .more-row { overflow-x: auto; scrollbar-width: none; }
  .page .more-card { flex: 0 0 calc(var(--r) * 130px); }
}

/* ---------- featured projects ---------- */
.work.is-featured .work-media::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--red); }
.page .work-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.work-flag { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; color: #f0474b; }
.work-flag::before { content: ""; width: 17px; height: 15px; background: url("../assets/sheep-red.svg") center / contain no-repeat; }

/* ---------- video player ---------- */
.player { --r: 1.7778; margin: 0 0 20px; }
.player-stage { position: relative; aspect-ratio: var(--r); max-height: 76vh; width: 100%; background: #121315; }
.player video { display: block; width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.player-big { position: absolute; left: 50%; top: 50%; width: 62px; height: 62px; margin: -31px 0 0 -31px; padding: 0; border: 1px solid rgba(236, 233, 225, 0.6); border-radius: 50%; background: rgba(20, 21, 23, 0.55); cursor: pointer; transition: opacity 0.25s ease, border-color 0.25s ease; }
.player-big::after { content: ""; position: absolute; left: 25px; top: 21px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #ece9e1; }
.player-big:hover { border-color: var(--red); }
.player.playing .player-big { opacity: 0; pointer-events: none; }
.player-bar { display: flex; align-items: center; gap: 16px; padding: 10px 0 0; }
.player-btn { padding: 4px 0; border: 0; background: none; color: var(--ink-dim); font: inherit; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
.player-btn:hover { color: var(--ink); }
.player-time { color: var(--ink-dim); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.player-seek { --done: 0%; flex: 1; min-width: 0; height: 18px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.player-seek::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(to right, var(--red) var(--done), var(--line) var(--done)); }
.player-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 9px; height: 9px; margin-top: -4px; border: 0; border-radius: 50%; background: var(--red); }
.player-seek::-moz-range-track { height: 1px; background: var(--line); }
.player-seek::-moz-range-progress { height: 1px; background: var(--red); }
.player-seek::-moz-range-thumb { width: 9px; height: 9px; border: 0; border-radius: 50%; background: var(--red); }
.player:fullscreen { display: flex; flex-direction: column; margin: 0; padding: 0 20px 14px; background: #0e0f11; }
.player:fullscreen .player-stage { flex: 1; min-height: 0; max-height: none; aspect-ratio: auto; }
@media (max-width: 520px) { .player-bar { gap: 10px; } .player-time { display: none; } }

/* ---------- the little game under the contacts ---------- */
body[data-page="contacts"] .page-head { margin-bottom: 0; }
.game { min-width: 0; margin: clamp(64px, 7vw, 96px) 0 clamp(24px, 3vw, 40px); }
.page .game .game-info { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 0 0 8px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.game canvas { display: block; width: 100%; height: 180px; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.game canvas:focus { outline: none; }
.game canvas:focus-visible { outline: 1px solid var(--line); outline-offset: -1px; }

/* the full-width mountain line must not make the page scroll sideways */
body[data-page="about"] > .page { overflow-x: clip; }

/* partner logos large enough to be read */
.page .partner, .page .project-grid .partner { width: 140px; height: 58px; }
.page .partner img, .page .project-grid .partner img { max-height: 58px; }
@media (max-width: 820px) {
  .page .partner, .page .project-grid .partner { width: 112px; height: 48px; }
  .page .partner img, .page .project-grid .partner img { max-height: 48px; }
}

/* ---------- phones: the very top and bottom melt into the colour of the system bars ---------- */
@media (max-width: 820px) {
  /* above the grain, below everything that is read: at the two edges the ground is the plain colour */
  html::after {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
      linear-gradient(to bottom, rgba(27, 28, 31, 1), rgba(27, 28, 31, 0.6) 40px, rgba(27, 28, 31, 0) 120px),
      linear-gradient(to top, rgba(27, 28, 31, 1), rgba(27, 28, 31, 0.6) 40px, rgba(27, 28, 31, 0) 120px);
  }
  /* header and bottom menu fade softly, instead of ending as darker bands */
  body[data-page] > .bar { background: linear-gradient(to bottom, rgba(27, 28, 31, 1), rgba(27, 28, 31, 0.86) 50%, rgba(27, 28, 31, 0)); }
}
@media (max-width: 640px) {
  body .bar .nav { background: linear-gradient(to top, rgba(27, 28, 31, 1), rgba(27, 28, 31, 0.9) 50%, rgba(27, 28, 31, 0)); }
}

