/* ==========================================================================
   Clara Videtta — one page portfolio
   One typeface, one size. Hierarchy comes from position, colour (black / grey)
   and the scale of the photographs, never from big type.
   Three columns on a 12-column grid: text sits in thirds, images move freely.
   ========================================================================== */

/* Instrument Sans (SIL Open Font License), served from the site itself */
@font-face { font-family: 'Instrument Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/instrument-sans-italic-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/instrument-sans-italic-latin.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: 'Instrument Sans'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(../fonts/instrument-sans-normal-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(../fonts/instrument-sans-normal-latin.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; }

:root {
  /* The site is always dark: black ground, white and grey type. */
  --bg: #0d0d0d;
  --fg: #eeede9;
  --muted: #8f8e89;
  --off: #5f5e5a;                 /* index items hidden by the filter */
  --accent: #e07a55;              /* terracotta: underline for hover and active states */
  --line: #3a3a38;                /* the progress line between projects */
  --ph-mix: 14%;
  --ph-line: rgba(238, 237, 233, .12);
  color-scheme: dark;

  --font: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --fs: 14px;                     /* the only text size */
  --lh: 1.2;                      /* 14 / 16.8 */

  --gutter: 16px;
  --col-gap: 16px;
  --row-gap: clamp(16px, 2vw, 32px);
  --bar-h: 40px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

@media (min-width: 1600px) { :root { --fs: 15px; --gutter: 20px; --col-gap: 20px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--fs);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; font-size: inherit; font-weight: inherit; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
img, video { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: #0d0d0d; }
.tnum { font-variant-numeric: tabular-nums; }
.intro p + p, .m-text p + p, .p-summary p + p, .info-contact p + p { margin-top: calc(var(--lh) * 1em); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--bg); padding: 8px 12px; }
.skip:focus { left: 16px; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }

.lbl, .org, dt { color: var(--muted); }
.ph-text { color: var(--muted); }

/* Underline as the single interactive signal */
.u, .p-credits a, .intro a, .home-contact a, .foot a {
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  transition: text-decoration-color .15s linear;
}
.u:hover, .home-contact a:hover, .foot a:hover, a:hover > .u, button:hover > .u, [aria-expanded="true"] > .u,
[aria-pressed="true"].u, .ix-row:focus-visible .u { text-decoration-color: var(--accent); }

/* ---------- two views: Home and reading ---------- */
.mode-home .work, .mode-read .home { display: none; }
.is-loading body { opacity: 0; }
.is-arriving .work { animation: arrive .32s var(--ease); }
@keyframes arrive { from { opacity: 0; } to { opacity: 1; } }

/* ---------- permanent menu: Clara Videtta / Selected Work: Project ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: calc(12px + env(safe-area-inset-top, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)) 12px max(var(--gutter), env(safe-area-inset-left, 0px));
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: baseline;
  background: var(--bg);
}
.mode-home .bar { display: none; }
.bar-home { display: none; }
.bar-path { grid-column: 1 / 10; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-name { font-weight: 500; }
.bar-name:hover { color: var(--muted); }
.bar .sep, .bar-lbl { color: var(--muted); }
.bar-current { display: inline; }
.bar-current .caret { color: var(--muted); display: inline-block; transition: transform .2s var(--ease); }
.bar-current[aria-expanded="true"] .caret { transform: rotate(180deg); }
.bar-nav { grid-column: 10 / 13; display: flex; gap: 1.2em; justify-content: flex-end; align-items: baseline; }
.bar-nav .lang { display: flex; gap: .5em; align-items: baseline; }
.lang a { color: var(--muted); transition: color .15s; }
.lang a[aria-current="true"], .lang a:hover { color: var(--fg); }

/* the picker opens under the menu, in the same type */
.picker {
  grid-column: 1 / -1; grid-row: 2;
  margin-top: 12px; padding: 4px 0 16px; border-top: 1px solid var(--line);
  max-height: calc(100svh - 80px); overflow: auto; overscroll-behavior: contain;
}
.picker-list { columns: 3; column-gap: var(--col-gap); padding-top: 8px; }
.picker-list li { break-inside: avoid; }
.picker-item { display: block; padding: 2px 0; }
.picker-item .p-num { min-width: 2.2em; }
.picker-item[aria-current] .u { text-decoration-color: var(--accent); }
.picker-list li.is-off, .picker-list li.is-off .org, .picker-list li.is-off .p-num { color: var(--off); }
.picker-all { padding-top: 8px; }

/* ---------- opening composition ---------- */
.home {
  min-height: 100svh;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  grid-template-rows: auto 1fr;
  row-gap: 32px;
}
.home-intro { grid-column: 1 / 5; max-width: 34em; }
.name { font-weight: 500; margin-bottom: calc(var(--lh) * 1em); }
.intro p { text-wrap: pretty; hyphens: manual; }
.lede, .intro-short, .more { display: none; }
.more { color: var(--muted); margin-top: calc(var(--lh) * .5em); }
.more:hover, .more[aria-expanded="true"] { color: var(--fg); }
.home-contact { margin-top: calc(var(--lh) * 1em); }
.home-contact dd { margin: 0; }

.home-work { grid-column: 6 / 10; display: grid; grid-template-columns: max-content 1fr; column-gap: .6em; }
.home-work .lbl { grid-column: 1; }
.ix { grid-column: 2; }
.ix li { transition: color .2s linear; padding-left: 1em; text-indent: -1em; }  /* long titles wrap with a hanging indent */
.ix .org { color: var(--muted); }
.ix-row.is-match .u { text-decoration-color: var(--accent); }
.ix li.is-off { color: var(--off); }
.ix li.is-off .org { color: var(--off); }
.ix-row { display: inline; }

/* 26/11: like the reference, wide gaps; language reduced to EN / ES at the far right */
.home-side { grid-column: 10 / 13; display: grid; grid-template-columns: 1fr max-content; column-gap: var(--col-gap); align-content: start; }
.home-filter { display: grid; grid-template-columns: max-content 1fr; column-gap: .6em; align-content: start; }
.home-filter ul { grid-column: 2; }
.home-lang { text-align: right; }
.home-lang .lang { display: block; }
.home-lang .sep { color: var(--muted); }
.home-info { margin-top: calc(var(--lh) * 1em); }

/* visual archive: small photographs on a regular grid, each keeps its proportions */
.archive { grid-column: 1 / -1; align-self: end; margin-top: clamp(40px, 6vh, 96px); }
.archive-cap { min-height: calc(var(--lh) * 1em); margin-bottom: 10px; }
.archive-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--col-gap); align-content: start; }
.archive-grid li { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; transition: opacity .2s linear; }
.archive-grid a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.archive-grid img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; animation: thumb-in .18s linear both; }
@keyframes thumb-in { from { opacity: 0; } to { opacity: 1; } }
.archive-grid.is-project li { transition: none; }
.archive-grid li.is-off { opacity: .12; }
.archive-grid.is-hovering li:not(.is-match) { opacity: .3; }
@media (min-width: 1600px) { .archive-grid { grid-template-columns: repeat(16, minmax(0, 1fr)); } }

/* ---------- projects ---------- */
.work { padding-top: calc(var(--bar-total, var(--bar-h)) + 28px); }
.projects { display: flex; flex-direction: column; }
.project { scroll-margin-top: calc(var(--bar-total, 41px) + 24px); }
.project.is-hidden { display: none; }

.p-head { row-gap: 16px; margin-bottom: clamp(32px, 5vw, 72px); align-items: start; }
.p-title { grid-column: 1 / 5; font-weight: 500; }
.p-title:focus { outline: none; }
.p-num { display: inline-block; min-width: 2.2em; font-weight: 400; color: var(--muted); }
.p-title .org { font-weight: 400; }
.p-title .org br { display: none; }
.p-summary { grid-column: 5 / 9; max-width: 34em; }
.p-sub { font-style: italic; }
.p-sub + p { margin-top: 0; }
.p-meta { grid-column: 9 / 13; display: grid; grid-template-columns: max-content 1fr; column-gap: .6em; }
.p-meta dd { min-width: 0; margin: 0; }

/* media flow */
.p-media { row-gap: var(--row-gap); align-items: start; }
.m { min-width: 0; }
.m.a-end { align-self: end; }
.m.a-center { align-self: center; }
.m figcaption { color: var(--muted); padding-top: 6px; }
.m img, .m video { width: 100%; height: auto; background: color-mix(in srgb, var(--tone, #ddd) var(--ph-mix), var(--bg)); }
.m picture { display: block; }
/* While a file loads, its own average colour holds the place: never a black hole in the page. */
.m[style*="--c"] :is(picture, .vid), .m[style*="--c"] img { background: color-mix(in srgb, var(--c) 80%, var(--bg)); }

/* versions to compare (temporary) */
.p-variants { margin: calc(var(--row-gap) * -.5) 0 var(--row-gap); }
.p-variants p { grid-column: 1 / -1; margin: 0; display: flex; flex-wrap: wrap; gap: .2em 1.2em; }
.p-variants button { font: inherit; color: var(--muted); background: none; border: 0; padding: 4px 0; cursor: pointer; }
.p-variants button[aria-pressed="true"] { color: var(--fg); text-decoration-color: var(--accent); }
.p-variants button:hover { color: var(--fg); }
.m-text { max-width: 34em; align-self: center; }
.sp { grid-column: 1 / -1; height: clamp(24px, 6vw, 120px); }
.sp-s { height: clamp(8px, 2vw, 40px); }
.sp-l { height: clamp(40px, 9vw, 180px); }

/* image layouts: anchored to the three text columns (1–4, 5–8, 9–12) */
.l-full { grid-column: 1 / -1; }
.l-inset { grid-column: 3 / 11; }
.l-wide-left { grid-column: 1 / 9; }
.l-wide-right { grid-column: 5 / 13; }
.l-half-left { grid-column: 1 / 7; }
.l-half-right { grid-column: 7 / 13; }
.l-medium-left { grid-column: 1 / 5; }
.l-medium-right { grid-column: 9 / 13; }
.l-small-left { grid-column: 1 / 4; }
.l-small-right { grid-column: 10 / 13; }
.l-small-center { grid-column: 6 / 9; }
.l-third-1 { grid-column: 1 / 5; }
.l-third-2 { grid-column: 5 / 9; }
.l-third-3 { grid-column: 9 / 13; }
.l-text-left { grid-column: 1 / 5; }
.l-text-right { grid-column: 5 / 9; }

/* placeholder image */
.ph {
  position: relative; width: 100%; max-width: 100%;
  aspect-ratio: var(--r, 4 / 3);
  background:
    linear-gradient(to top right, transparent calc(50% - .5px), var(--ph-line) 50%, transparent calc(50% + .5px)),
    linear-gradient(to bottom right, transparent calc(50% - .5px), var(--ph-line) 50%, transparent calc(50% + .5px)),
    color-mix(in srgb, var(--tone, #e5e5e5) var(--ph-mix), var(--bg));
  overflow: hidden;
}
.ph-label { position: absolute; left: 10px; right: 10px; bottom: 9px; display: flex; flex-wrap: wrap; gap: .2em .8em; justify-content: space-between; }

.p-credits { margin-top: clamp(24px, 3vw, 40px); }
.p-credits dl { display: flex; flex-wrap: wrap; gap: 0 1.4em; max-width: calc(66.66% + var(--col-gap)); }
.p-credits div { display: inline; }
.p-credits dt, .p-credits dd { display: inline; margin: 0; }

/* transition to the next project: a line that fills with the reader's own scroll */
.p-next { padding: clamp(120px, 22vh, 240px) 0 clamp(160px, 30vh, 320px); --p: 0; }
.p-next[hidden] { display: none; }
.p-next-row { margin-bottom: 12px; }
.p-next-title { opacity: calc(.55 + var(--p) * .45); }
.p-next-line { height: 1px; background: var(--line); position: relative; overflow: hidden; }
.p-next-line span { position: absolute; inset: 0; background: var(--fg); transform-origin: left center; transform: scaleX(var(--p)); }

/* end of the publication */
.the-end { padding: clamp(120px, 22vh, 240px) 0 clamp(120px, 30vh, 280px); border-top: 0; }
.end-lbl { grid-column: 1 / 5; }
.end-links { grid-column: 5 / 9; }

/* entries inside a project (exhibitions, fairs) */
.entries { display: flex; flex-direction: column; gap: clamp(64px, 9vw, 140px); margin-top: clamp(64px, 9vw, 140px); }
.entry-head { row-gap: 12px; margin-bottom: var(--row-gap); }
.entry-title { grid-column: 1 / 5; }
.entry-title .org br { display: block; }
.entry-text { grid-column: 5 / 9; max-width: 34em; }

/* ---------- information: a panel over the page (no heading) ---------- */
.info-panel {
  position: fixed; inset: 0; z-index: 80; overflow: auto; overscroll-behavior: contain;
  background: var(--bg);
  padding: calc(14px + env(safe-area-inset-top, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)) 0 max(var(--gutter), env(safe-area-inset-left, 0px));
}
.info-panel[hidden] { display: none; }
.info-panel:focus { outline: none; }
.info-open body { overflow: hidden; }
.info-top { align-items: baseline; }
.info-name { grid-column: 1 / 5; font-weight: 500; }
.info-close { grid-column: 12 / 13; justify-self: end; white-space: nowrap; }
.info { padding-top: clamp(56px, 10vh, 120px); padding-bottom: clamp(80px, 12vh, 160px); row-gap: 40px; align-items: start; }
.info-col { grid-column: span 4; display: flex; flex-direction: column; gap: calc(var(--lh) * 2em); }
.info-list { display: grid; grid-template-columns: 1fr; }
.info-list ul li { display: grid; grid-template-columns: 5.2em 1fr; }
.info-list ul li > span:last-child { grid-column: 2; }
.info-list .yr { color: var(--muted); }
.info-contact ul li { display: block; }
.info-contact p + ul { margin-top: calc(var(--lh) * 1em); }
.info-portrait { margin-bottom: 0; }
.copy { color: var(--muted); margin-left: .6em; }
.copy:hover { color: var(--fg); }

/* ---------- footer ---------- */
.foot { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
.foot-copy { grid-column: 1 / 5; color: var(--muted); }

.noscript { padding: 120px 0; }


/* ==========================================================================
   Tablet
   ========================================================================== */
@media (max-width: 1100px) {
  .home-intro { grid-column: 1 / 7; }
  .home-work { grid-column: 7 / 13; }
  .home-side { grid-column: 7 / 13; grid-row: 2; }
  .p-title { grid-column: 1 / 7; }
  .p-meta { grid-column: 7 / 13; grid-row: 1; }
  .p-summary { grid-column: 1 / 7; }
  .entry-title { grid-column: 1 / 7; }
  .entry-text { grid-column: 7 / 13; }
  .l-medium-left, .l-text-left { grid-column: 1 / 6; }
  .l-medium-right { grid-column: 8 / 13; }
  .l-text-right { grid-column: 7 / 13; }
  .l-small-left { grid-column: 1 / 4; }
  .l-small-right { grid-column: 10 / 13; }
  .l-small-center { grid-column: 5 / 9; }
  .info-col { grid-column: span 6; }
  .info-col:last-child { grid-column: 1 / 7; }
  .bar-path { grid-column: 1 / 9; }
  .bar-nav { grid-column: 9 / 13; }
  .picker-list { columns: 2; }
}

/* ==========================================================================
   Phone: the same system on two columns
   ========================================================================== */
@media (max-width: 720px) {
  :root { --fs: 15px; --gutter: 14px; --col-gap: 14px; }
  .grid, .bar { grid-template-columns: repeat(6, minmax(0, 1fr)); }

  /* two lines: name and links, then the project selector */
  .bar { row-gap: 6px; }
  .bar-home { display: block; grid-column: 1 / 4; grid-row: 1; font-weight: 500; }
  .bar-nav { grid-column: 4 / 7; grid-row: 1; gap: .9em; }
  .bar-path { grid-column: 1 / -1; grid-row: 2; display: flex; align-items: baseline; gap: .3em; overflow: visible; }
  .bar-lbl { flex: none; }
  .bar-current { display: flex; align-items: baseline; gap: .3em; min-width: 0; }
  .bar-current-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bar-current .caret { flex: none; }
  .home-info { grid-column: 1; }
  .bar-path .bar-name, .bar .sep { display: none; }
  .picker { grid-row: 3; margin-top: 6px; }
  .picker-list { columns: 1; }
  .picker-item { padding: 6px 0; }

  /* Home on a phone has its own order: name, photographs, a short text, then filter and index.
     The wrappers dissolve (display: contents) so each piece can take its place. */
  .home { min-height: 0; grid-template-rows: none; row-gap: 0; padding-bottom: 48px; }
  .home-intro, .home-side { display: contents; }
  .home > *, .home-intro > *, .home-side > * { grid-column: 1 / -1; }
  .name { order: 1; margin-bottom: 0; }
  .lede { order: 2; display: block; color: var(--muted); }
  .archive { order: 3; margin-top: 20px; }
  .intro { order: 4; margin-top: 32px; }
  .home-filter { order: 5; margin-top: 40px; }
  .home-work { order: 6; margin-top: 24px; }
  .home-contact { order: 7; margin-top: 40px; }
  .home-lang { order: 8; margin-top: 24px; }

  .intro-short { display: block; }
  .intro-full { display: none; }
  .more { display: inline-block; padding: 8px 0; }
  .intro.is-open .intro-short { display: none; }
  .intro.is-open .intro-full { display: block; animation: arrive .25s var(--ease); }

  /* visual archive: a loose wall of photographs, two or three columns, each in its own proportion */
  .archive-cap { display: none; }
  .archive-grid { display: block; columns: 3; column-gap: 6px; min-height: 0 !important; }
  .archive-grid li { aspect-ratio: auto; display: block; break-inside: avoid; margin-bottom: 6px; }
  .archive-grid a { display: block; width: 100%; height: auto; }
  .archive-grid img { width: 100%; max-height: none; }
  .archive-grid li[data-rank]:not([data-rank="0"]):not([data-rank="1"]) { display: none; }

  .home-filter { display: block; }
  .home-filter .lbl { display: inline; }
  .home-filter ul { display: inline; }
  .home-filter li { display: inline; }
  .home-filter li + li::before { content: ", "; color: var(--muted); }
  .home-filter button { padding: 6px 0; }
  .home-work { grid-template-columns: 1fr; }
  .home-work .lbl, .ix { grid-column: 1; }
  .ix-row { display: inline-block; padding: 5px 0; }
  .ix li { text-indent: 0; padding-left: 0; }
  .home-lang { display: flex; gap: 1.2em; align-items: baseline; }
  .home-lang .lbl { display: none; }
  .home-lang { text-align: left; }
  .home-lang .lang { display: flex; gap: .4em; }
  .home-info { margin-top: 0; grid-column: auto; }
  .home-contact a, .end-links a, .end-links button, .p-next-title, .lang a, .home-info a { display: inline-block; padding: 5px 0; }

  .p-next { padding: 96px 0 120px; }
  .end-lbl, .end-links { grid-column: 1 / -1; }
  .end-links { margin-top: calc(var(--lh) * 1em); }
  .info-name { grid-column: 1 / 5; }
  .info-close { grid-column: 5 / 7; }
  .p-head { row-gap: 14px; margin-bottom: 24px; }
  .p-title, .p-summary, .p-meta { grid-column: 1 / -1; grid-row: auto; }

  .l-full, .l-inset, .l-wide-left, .l-wide-right { grid-column: 1 / -1; }
  /* no photograph narrower than two thirds of the screen: details stay legible */
  .p-media { row-gap: 14px; }
  .l-half-left, .l-medium-left { grid-column: 1 / 6; }
  .l-half-right, .l-medium-right { grid-column: 2 / 7; }
  .l-small-left, .l-third-1 { grid-column: 1 / 5; }
  .l-small-right, .l-third-2 { grid-column: 3 / 7; }
  .l-small-center, .l-third-3 { grid-column: 2 / 6; }
  /* three vertical clips stay side by side: on a phone they read as one strip */
  .m-video.l-third-1 { grid-column: 1 / 3; } .m-video.l-third-2 { grid-column: 3 / 5; } .m-video.l-third-3 { grid-column: 5 / 7; }
  .m-text { margin: 10px 0; }
  .sp { height: 24px; } .sp-s { height: 6px; } .sp-l { height: 40px; }
  .entries { gap: 72px; margin-top: 72px; }
  .l-text-left, .l-text-right { grid-column: 1 / -1; }
  .p-credits dl { max-width: none; }

  .entry-title, .entry-text { grid-column: 1 / -1; }

  .info { padding-top: 48px; }
  .info-col, .info-col:last-child { grid-column: 1 / -1; }
  .foot-copy { grid-column: 1 / 4; }
}


/* ==========================================================================
   v14 — editorial scales, project characters and movement
   ========================================================================== */

/* more scales: from the edge of the screen to a small detail */
.l-bleed { grid-column: 1 / -1; margin-inline: calc(-1 * max(var(--gutter), env(safe-area-inset-left, 0px))); }
.l-bleed img, .l-bleed video { width: 100%; max-height: 100svh; object-fit: cover; }
.l-bleed figcaption { padding-inline: var(--gutter); }
.l-bleed.is-tall img { height: 78svh; max-height: none; }   /* a texture can be cropped: it fills the screen */
.l-screen { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; }
.l-screen picture, .l-screen .vid { width: auto; }
.l-screen img { width: auto; height: min(88svh, 1400px); max-width: 100%; object-fit: contain; }
.l-screen figcaption { align-self: center; }
.l-center { grid-column: 4 / 10; }
.l-narrow { grid-column: 5 / 9; }
.l-detail-left { grid-column: 2 / 4; }
.l-detail-right { grid-column: 10 / 12; }
.sp-xl { height: clamp(96px, 26vh, 320px); }

/* silent loops: the still frame underneath, the video fades in over it once it really plays */
.vid { position: relative; display: block; }
.vid video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s linear; background: transparent; }
.vid.is-playing video { opacity: 1; }
/* when the browser will not start it by itself: a small play mark, and a tap plays it */
.vid.needs-tap { cursor: pointer; }
.vid.needs-tap:not(.is-playing)::after { content: ""; position: absolute; left: 12px; bottom: 12px; width: 0; height: 0;
  border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent rgba(255, 255, 255, .9);
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, .5)); pointer-events: none; }
.vid-still { width: 100%; height: auto; }

/* the character of each project: same system, different pace */
.kind-material { --row-gap: clamp(12px, 1.4vw, 24px); }                   /* close, tactile, scales change quickly */
.kind-object { --row-gap: clamp(28px, 4vw, 72px); }                       /* precise: the object alone, with air around it */
.kind-object .l-screen img { height: min(80svh, 1200px); }
.kind-space { --row-gap: clamp(20px, 2.4vw, 40px); }                      /* immersive: the room first, at full size */
.kind-space .l-screen img { height: min(94svh, 1500px); }
.kind-object .p-media, .kind-space .p-media, .kind-material .p-media { row-gap: var(--row-gap); }

/* chapters (Weplight): numbered, each opened by a thin rule, each with its own composition */
.kind-chapters .entries { gap: clamp(96px, 14vw, 220px); }
.kind-chapters .entry-head { padding-top: 12px; border-top: 1px solid var(--line); margin-bottom: clamp(24px, 3vw, 48px); }
.entry-title .p-num { min-width: 2.2em; }
.kind-chapters .entry:nth-child(2) .p-media { row-gap: clamp(32px, 5vw, 96px); }

/* ---------- movement (only when the script runs and motion is welcome) ---------- */
/* Only large pieces and grouped ones move; the rest is simply there. A piece waits for its photograph,
   and meanwhile its colour fills the space, so motion never reads as a delay. */
.fx .project [data-fx] { transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.fx .project [data-fx="fade"]:not(.is-in) { opacity: 0; }
.fx .project [data-fx="rise"]:not(.is-in) { opacity: 0; transform: translate3d(0, 16px, 0); }
.fx .project [data-fx="veil"] img { transition: opacity .9s var(--ease), transform 1.6s var(--ease); }
.fx .project [data-fx="veil"]:not(.is-in) img { opacity: 0; transform: scale(1.025); }
.l-bleed, .l-screen picture { overflow: hidden; }
.fx .project [data-fx="head"] .p-title, .fx .project [data-fx="head"] .p-summary, .fx .project [data-fx="head"] .p-meta { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.fx .project [data-fx="head"] .p-summary { transition-delay: .12s; }
.fx .project [data-fx="head"] .p-meta { transition-delay: .24s; }
.fx .project [data-fx="head"]:not(.is-in) :is(.p-title, .p-summary, .p-meta) { opacity: 0; transform: translate3d(0, 14px, 0); }
/* phones: a short fade only, nothing moves or scales while scrolling */
@media (hover: none) {
  .fx .project [data-fx], .fx .project [data-fx="veil"] img, .fx .project [data-fx="head"] :is(.p-title, .p-summary, .p-meta) { transition: opacity .35s linear; transition-delay: 0s; transform: none !important; }
}

/* hover on photographs: the caption comes forward, the image breathes a little (mouse only) */
@media (hover: hover) and (pointer: fine) {
  .m picture, .m .vid { overflow: hidden; }
  .m:not(.l-bleed) img { transition: transform 1.6s var(--ease), opacity .4s linear; }
  .project .m:not(.l-bleed):hover img { transform: scale(1.012); }
  .m figcaption { transition: color .3s linear; }
  .m:hover figcaption { color: var(--fg); }
  .ix-row .u { transition: text-decoration-color .15s linear, padding .3s var(--ease); }
}

/* transition to the next project: the line fills, the next title steps forward */
.p-next-title { display: inline-block; transform: translate3d(calc((1 - var(--p)) * -6px), 0, 0); }
.bar-current-text { transition: opacity .25s linear; }
.bar-current-text.is-swapping { opacity: 0; }

/* Home: animated thumbnails sit exactly over their still */
.archive-grid .th { position: relative; display: inline-flex; max-width: 100%; max-height: 100%; }
.archive-grid .th video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s linear; }
.archive-grid .th.is-playing video { opacity: 1; }
.archive-grid img { transition: opacity .2s linear; }

@media (max-width: 1100px) {
  .l-center { grid-column: 3 / 11; }
  .l-narrow { grid-column: 4 / 10; }
  .l-detail-left { grid-column: 1 / 4; }
  .l-detail-right { grid-column: 10 / 13; }
}

@media (max-width: 720px) {
  .l-bleed { margin-inline: calc(-1 * max(var(--gutter), env(safe-area-inset-left, 0px))); }
  .l-bleed img { max-height: 82svh; }
  .l-bleed.is-tall img { height: 62svh; }
  .l-screen img, .kind-object .l-screen img, .kind-space .l-screen img { width: 100%; height: auto; max-height: 82svh; object-fit: contain; }
  .l-screen picture { width: 100%; }
  .l-center { grid-column: 1 / -1; }
  .l-narrow { grid-column: 2 / 6; }
  .l-detail-left { grid-column: 1 / 4; }
  .l-detail-right { grid-column: 4 / 7; }
  .sp-xl { height: 64px; }
  .kind-material, .kind-space { --row-gap: 14px; }
  .kind-object { --row-gap: 28px; }
  .kind-chapters .entries { gap: 96px; }
  .fx .project [data-fx] { transition-duration: .7s; }
  .fx .project [data-fx="rise"]:not(.is-in) { transform: translate3d(0, 16px, 0); }
  .archive-grid .th { display: block; }
}

/* v16: exact placement for composed sequences, and pieces shown on one kind of screen only */
.p-media > .m.has-gc { grid-column: var(--gc); }
.p-media > .only-mob { display: none; }
@media (max-width: 720px) {
  .p-media > .m.has-gc:not(.has-mgc) { grid-column: 1 / -1; }
  .p-media > .m.has-mgc { grid-column: var(--mgc); }
  .p-media > .only-desk { display: none; }
  .p-media > .only-mob { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* ==========================================================================
   Editorial Home (test, 26/11/2026). Root class .home-ed; the archive Home is untouched without it.
   A 12-column grid where each piece sits on its own columns (content/home.json): a few large
   pieces, the rest fragments, with intentional gaps and small vertical shifts.
   ========================================================================== */
.ed, .home-switch { display: none; }
.home-ed .archive { display: none; }
.home-ed .home { min-height: 0; grid-template-rows: auto auto; row-gap: 0; padding-bottom: 64px; }
.home-ed .ed { display: block; grid-column: 1 / -1; margin-top: clamp(28px, 5vh, 56px); }
.home-ed .home-switch { display: block; grid-column: 1 / -1; margin-top: 72px; color: var(--muted); }
.home-switch button[aria-pressed="true"] { color: var(--fg); text-decoration-color: var(--accent); }
.ed-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: clamp(28px, 4.5vw, 72px); align-items: start; }
.ed-item { grid-column: var(--gc); align-self: var(--al, start); margin: calc(var(--dy, 0) * 4vw) 0 0; transition: opacity .25s linear; }
.ed-item a { display: block; }
.ed-media { display: block; }
.ed-media img, .ed-media picture, .ed-media .vid { display: block; width: 100%; height: auto; }
.ed-item figcaption { margin-top: 6px; color: var(--muted); transition: color .2s linear; }
.ed-item a:hover figcaption, .ed-item.is-match figcaption { color: var(--fg); }
.ed-grid.is-hovering .ed-item:not(.is-match) { opacity: .28; }
.ed-item.is-off { opacity: .12; }
.home-ed .intro p + p { margin-top: 0; }
.info-bio p + p { margin-top: calc(var(--lh) * 1em); }
@media (hover: hover) and (pointer: fine) {
  .ed-media { overflow: hidden; }
  .ed-media img { transition: transform 1.4s var(--ease); }
  .ed-item a:hover .ed-media img { transform: scale(1.015); }
}
@media (max-width: 1100px) {
  .ed-item { margin-top: calc(var(--dy, 0) * 3vw); }
}
@media (max-width: 720px) {
  /* phone: name, one line, then the photographs; the short text, filter and index come after */
  .home-ed .ed { order: 3; margin-top: 18px; }
  .home-ed .intro { order: 4; margin-top: 36px; }
  .home-ed .more, .home-ed .intro-full { display: none; }
  .home-ed .intro-short { display: block; }
  .home-ed .home-switch { order: 9; margin-top: 40px; }
  .ed-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 8px; row-gap: 22px; }
  .ed-item { grid-column: var(--mgc, 1 / -1); margin-top: 0; }
  .ed-item.no-mob { display: none; }
  .ed-item figcaption { margin-top: 4px; }
}
