/* Tomaz Barison — site styles
   Grid: 40px. Everything square. Accent only for highlights. */

:root {
  --bg: #FFFFFF;
  --ink: #141414;
  --acc: #FF5100;
  --line: rgba(20, 20, 20, .07);
  --rule: rgba(20, 20, 20, .15);
  --soft: rgba(20, 20, 20, .4);
  --faint: rgba(20, 20, 20, .18);
  --muted: rgba(20, 20, 20, .35);
  --empty: #EDEDED;
  --img-bg: #141414;
  --head: 'neue-haas-grotesk-display', 'Neue Haas Grotesk Display Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --body: 'neue-haas-grotesk-text', 'Neue Haas Grotesk Text Pro', 'Neue Haas Grotesk Display Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.7, 0, .2, 1);
  --pad-l: 240px;
  --pad-r: 80px;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #141414;
  --ink: #F2F2F2;
  --line: rgba(255, 255, 255, .07);
  --rule: rgba(255, 255, 255, .18);
  --soft: rgba(255, 255, 255, .4);
  --faint: rgba(255, 255, 255, .2);
  --muted: rgba(255, 255, 255, .35);
  --empty: #262626;
  --img-bg: #0b0b0b;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.4;
  transition: background .35s, color .35s;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; letter-spacing: inherit; }
figure { margin: 0; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Language: both versions live in the markup, one is hidden */
html[data-lang="en"] .pt, html[data-lang="pt"] .en { display: none !important; }

/* Icons (SVG only, no glyph arrows) */
.ic { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -.12em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; }
.acc { color: var(--acc); }
/* Brackets: lighter than the word they hold */
.brk { font-weight: 200; }

/* Background millimetre grid fading out */
.gridbg {
  position: absolute; left: 0; right: 0; top: 0; height: 1200px; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 40%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 40%, transparent 100%);
}

/* Ruler on the left */
.ruler {
  position: fixed; left: 0; top: 0; bottom: 0; width: 28px; z-index: 20;
  background-color: var(--bg);
  border-right: 1px solid var(--ink);
  background-image: repeating-linear-gradient(180deg, var(--ink) 0 1px, transparent 1px 80px), repeating-linear-gradient(180deg, var(--soft) 0 1px, transparent 1px 16px);
  background-size: 28px 100%, 12px 100%;
  background-repeat: repeat-y;
  background-position: 0 var(--tick, 0px), 0 var(--tick, 0px);
  transition: background-color .35s;
}
.ruler i { position: absolute; left: 0; width: 28px; height: 4px; background: var(--acc); top: calc(var(--p, 0) * (100% - 4px)); }

/* Side index */
.idx {
  position: fixed; left: 52px; top: 50%; transform: translateY(-50%); z-index: 10;
  display: flex; flex-direction: column; gap: 14px;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.idx a { display: flex; gap: 12px; align-items: baseline; transition: color .3s, opacity .3s; }
.idx a span:first-child { font-variant-numeric: tabular-nums; }
.idx.has-active a { opacity: .4; }
.idx.has-active a[aria-current="true"] { opacity: 1; color: var(--acc); }
.idx a:hover { color: var(--acc); opacity: 1; }
@media (max-width: 1199.98px) { .idx { display: none; } }

/* Layout */
.main { position: relative; z-index: 2; padding: 40px var(--pad-r) 0 var(--pad-l); max-width: 1640px; }
/* Keep the right edge on a 40px grid line (left edge already is) */
@media (min-width: 761px) {
  .main { padding-right: 0; max-width: none; width: min(1640px, calc(100% - var(--pad-r))); width: min(1640px, round(down, calc(100% - var(--pad-r)), 40px)); }
}
.page .main { --pad-l: 120px; }
@media (max-width: 1199.98px) { :root { --pad-l: 104px; --pad-r: 56px; } .page .main { --pad-l: 104px; } }
@media (max-width: 760px) { :root { --pad-l: 40px; --pad-r: 16px; } .page .main { --pad-l: 40px; } }

/* Small caps label, like the quotes */
.cap { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.dim { opacity: .5; }

/* Header */
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.top dl { margin: 0; display: grid; grid-template-columns: auto auto; gap: 6px 24px; }
.top dd { margin: 0; }
.top .brand { font-family: var(--head); font-size: 22px; font-weight: 700; letter-spacing: -.03em; text-transform: none; }
.top .tools { display: flex; gap: 0; align-items: center; }
.top .tools .mode { border-left: 0; }
.top .back { margin-right: 40px; }
.top a.back { display: inline-flex; gap: 8px; align-items: center; height: 40px; }
.top .back:hover { color: var(--acc); }

/* Toggles: 40px squares, sliding filled knob */
.sw { flex: none; width: calc(2 * var(--w, 39px) + 2px); }
.sw { position: relative; display: flex; align-items: flex-start; height: 40px; align-self: flex-end; border: 1px solid var(--ink); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; flex: none; }
.sw button { position: relative; z-index: 1; background: none; border: 0; height: 38px; width: var(--w, 39px); padding: 0; cursor: pointer; transition: color .35s; }
.sw button[aria-pressed="true"] { color: var(--bg); }
.sw .knob { position: absolute; top: 0; bottom: 0; left: 0; width: var(--w, 39px); background: var(--ink); transform: translateX(calc(var(--i, 0) * var(--w, 39px))); transition: transform .45s var(--ease), background .35s; }
.sw.wide { --w: 79px; }
.mode { width: 40px; height: 40px; border: 1px solid var(--ink); background: none; cursor: pointer; padding: 0; display: grid; place-items: center; flex: none; }
.mode span { width: 16px; height: 16px; border: 1.5px solid var(--ink); background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); transition: transform .5s ease; }
html[data-theme="dark"] .mode span { transform: rotate(180deg); }

/* Hero */
.hero { padding: 160px 0 0; text-align: center; }
.hero h1 { margin: 0; font-family: var(--head); font-weight: 700; font-size: clamp(56px, 11vw, 188px); letter-spacing: -.05em; line-height: .86; }
.hero .role { margin: 22px 0 0; font-family: var(--head); font-weight: 500; font-size: clamp(24px, 3vw, 48px); letter-spacing: -.03em; line-height: 1; }
/* Last played / Recently watched: the pair is centred on the same axis as the name (no grid snap) */
/* Last played / Recently watched: label on top, cover, title, then artist / director smaller; all centred */
.now-line { display: flex; justify-content: center; align-items: flex-start; gap: 64px; font-size: 14px; margin: 80px auto 0; }
.now { width: 260px; flex: none; display: grid; grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 14px; row-gap: 2px; align-content: center; align-items: center; min-width: 0; text-align: left; }
.now .ico { grid-row: 1 / 4; grid-column: 1; }
.now .cap, .now .tt, .now .by { grid-column: 2; }
.now .cap { white-space: nowrap; margin-bottom: 2px; }
.now .tt { width: 100%; transition: color .3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; line-height: 1.3; }
.now .by { width: 100%; font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now:hover .tt { color: var(--acc); }
.now .ico { width: 56px; height: 56px; flex: none; display: grid; place-items: center; overflow: hidden; position: relative; }
.now .ico.music { background: var(--acc); }
.now .ico.music .sq { width: 32px; height: 32px; background: repeating-linear-gradient(0deg, #141414 0 2px, transparent 2px 4px); display: grid; place-items: center; transition: transform .6s ease; }
.now .ico.music .sq span { width: 10px; height: 10px; background: var(--acc); }
.now:hover .sq { transform: rotate(90deg); }
.now .ico.film { background: #141414; }
.now .ico.film .reel { position: absolute; left: -6px; right: -6px; top: 14px; bottom: 14px; background: repeating-linear-gradient(90deg, #444 0 6px, #141414 6px 8px); transition: transform .5s ease; }
.now .ico.film .play { position: relative; width: 0; height: 0; border-left: 11px solid var(--acc); border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 2px; }
.now:hover .reel { transform: translateX(6px); }
.now .ico.has-img { background: var(--img-bg); }
/* the cover fills the square exactly (a portrait poster was overflowing the box and showing only its top) */
.now .ico.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 50%; transition: transform .5s ease; }
.now:hover .ico.has-img img { transform: scale(1.1); }
@media (max-width: 760px) {
  .hero { padding-top: 112px; }
  /* side by side: square on top, label and title underneath; the pair stays centred under the name */
  .now-line { gap: 20px; margin-top: 40px; }
  .now { width: 140px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
  .now .cap { order: -1; margin-bottom: 2px; }
  .now .by { margin-top: -4px; }
  .now .cap { font-size: 10px; letter-spacing: .1em; }
  .now .tt { font-size: 13px; }
  .now .by { font-size: 11px; }
}

/* Sections */
.sec { padding: 160px 0 0; scroll-margin-top: 40px; position: relative; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--ink); }
.h2 { margin: 0; font-family: var(--head); font-weight: 700; font-size: clamp(40px, 4.6vw, 72px); letter-spacing: -.04em; line-height: .9; }
.h2 .n { opacity: .35; font-weight: 400; font-size: .32em; letter-spacing: .04em; vertical-align: top; margin-right: 14px; }
@media (max-width: 760px) { .sec { padding-top: 112px; } }

/* Black & white images, colour on hover (touch: when on screen) */
.bw img { filter: grayscale(1); transition: filter .5s ease, transform .6s ease; }
@media (hover: hover) {
  .bw:hover img, .bw:focus-visible img { filter: grayscale(0); transform: scale(1.04); }
}
@media (hover: none) {
  .bw.in img, .bw:active img { filter: grayscale(0); }
}
.ph { display: block; overflow: hidden; background: var(--img-bg); position: relative; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph.empty { background: var(--empty); }

/* Selected work: list */
.rows a, .rows .row { display: grid; grid-template-columns: 40px 160px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.row .num { font-size: 12px; opacity: .45; font-variant-numeric: tabular-nums; }
.row .ph { aspect-ratio: 4 / 3; }
.row .txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.row .client { font-size: clamp(20px, 2.2vw, 32px); font-weight: 500; letter-spacing: -.025em; line-height: 1.05; }
.row .type { font-size: 15px; opacity: .6; }
.row .end { display: flex; gap: 32px; align-items: center; font-size: 15px; }
.row .end .yr { opacity: .6; font-variant-numeric: tabular-nums; }
.arr { font-size: 22px; transition: color .3s, transform .3s; }
.row:hover .arr, .blk:hover .arr, .cta:hover .arr { color: var(--acc); }
@media (max-width: 760px) {
  .rows a, .rows .row { grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; padding: 16px 0; }
  .row .num { display: none; }
  .row .type { font-size: 13px; }
  .row .end { gap: 0; flex-direction: column; align-items: flex-end; gap: 8px; font-size: 13px; }
  .arr { font-size: 18px; }
}

/* Selected work: blocks */
.blocks { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 40px; padding-top: 40px; }
/* each block spans 2 rows (image, caption) so images in a row share one height */
.blk { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 14px; grid-column: span var(--span, 2); }
.blk .ph { aspect-ratio: var(--ratio, 4 / 5); align-self: stretch; width: 100%; min-height: 0; }
.blk .meta { padding-bottom: 40px; }
.blk .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.blk .meta b { font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.blk .meta span { font-size: 14px; white-space: nowrap; display: inline-flex; gap: 12px; align-items: center; }
@media (max-width: 1000px) { .blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; } .blk { grid-column: span 1; } .blk:first-child { grid-column: span 2; } }
@media (max-width: 560px) { .blocks { grid-template-columns: 1fr; } .blk, .blk:first-child { grid-column: auto; } .blk .ph { aspect-ratio: 4 / 3; } }
[hidden] { display: none !important; }

/* Big outlined call-to-action row */
.cta { display: flex; justify-content: space-between; align-items: center; height: 80px; margin-top: 40px; padding: 0 24px; border: 1px solid var(--ink); font-size: 18px; font-weight: 500; transition: background .3s, color .3s; }
.cta:hover { background: var(--ink); color: var(--bg); }
.cta:hover .arr { color: var(--acc); }

/* Catalog */
.catalog-wrap { position: relative; padding-top: 40px; }
.catalog-grid {
  position: absolute; inset: 0 calc(-1 * var(--pad-r)) 0 -40px; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 70%, transparent 100%);
}
.tree { position: relative; z-index: 1; display: grid; grid-template-columns: 150px 160px minmax(0, 1fr); column-gap: 50px; align-items: center; min-height: 560px; padding: 40px 0; }
.tree svg.links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.tree svg.links path { fill: none; stroke-width: 1; transition: stroke .3s; }
.node { height: 40px; display: flex; justify-content: space-between; align-items: center; padding: 0 14px; font-size: 15px; background: var(--bg); position: relative; z-index: 1; }
.node small { font-size: 12px; opacity: .6; font-variant-numeric: tabular-nums; }
.node.root { background: var(--ink); color: var(--bg); font-weight: 500; }
.branches { display: flex; flex-direction: column; gap: 20px; }
.branches button.node { width: 160px; border: 1px solid var(--faint); color: var(--muted); cursor: pointer; text-align: left; transition: color .3s, border-color .3s; }
.branches button.node:hover { color: var(--ink); }
.branches button.node[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.groups { display: flex; flex-direction: column; gap: 40px; }
.grp { display: grid; grid-template-columns: 190px minmax(0, 1fr); column-gap: 50px; align-items: center; }
.grp .node { border: 1px solid var(--ink); font-size: 14px; }
.cards { display: flex; flex-wrap: wrap; gap: 16px; }
.tc { position: relative; width: 112px; height: 80px; overflow: hidden; background: #1F1F1F; color: #F2F2F2; box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .35); animation: pop .5s cubic-bezier(.2, .7, .2, 1) both; cursor: pointer; outline-offset: 2px; }
html[data-theme="dark"] .tc { background: #2A2A2A; }
.tc img { width: 100%; height: 100%; object-fit: cover; }
.tc .nm { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; font-size: 11px; font-weight: 500; line-height: 1.15; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .65)); }
.tc.ghost { background: transparent; color: var(--muted); border: 1px dashed var(--faint); box-shadow: none; }
.tc.ghost .nm { background: none; }
.tc.on { outline: 2px solid var(--acc); }
.flag { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; background: var(--acc); }
@keyframes pop { from { opacity: 0; transform: translateX(-16px) scale(.96); } to { opacity: 1; transform: none; } }

/* Catalog detail strip (ficha) */
.ficha { position: relative; z-index: 1; display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px 50px; align-items: start; padding: 24px 0 0; border-top: 1px solid var(--rule); min-height: 120px; }
.ficha .cap { padding-top: 4px; }
.ficha h3 { margin: 0 0 8px; font-family: var(--head); font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.ficha p { margin: 0; max-width: 620px; font-size: 15px; line-height: 1.5; }
.ficha .go { display: inline-flex; gap: 10px; align-items: center; height: 40px; padding: 0 16px; border: 1px solid var(--ink); font-size: 14px; white-space: nowrap; }
.ficha .go:hover { background: var(--ink); color: var(--bg); }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 6px; border: 1px solid var(--acc); color: var(--acc); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; vertical-align: middle; white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; background: var(--acc); }

.ficha .sum { margin-top: 10px; }

/* Catalog on phones: the same tree, stacked.
   Root → 3 branch buttons → groups hanging off a vertical line → cards swiped sideways → ficha */
.cat-list { display: none; position: relative; z-index: 1; }
.mt-head { position: relative; padding-bottom: 20px; }
.mt-head .node.root { width: 150px; }
.mt-head::after { content: ""; position: absolute; left: 20px; top: 40px; bottom: 0; width: 1px; background: var(--ink); }
.mt-branches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mt-branches .node { height: 40px; padding: 0 10px; font-size: 14px; border: 1px solid var(--faint); color: var(--muted); background: var(--bg); cursor: pointer; text-align: left; min-width: 0; transition: color .3s, border-color .3s; }
.mt-branches .node + .node { border-left: 0; }
.mt-branches .node[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); box-shadow: -1px 0 0 var(--ink); }
.mt-branches .node:first-child[aria-pressed="true"] { box-shadow: none; }
.mt-branches .node > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-groups { position: relative; margin-left: 20px; padding: 24px 0 24px 20px; border-left: 1px solid var(--soft); display: flex; flex-direction: column; gap: 24px; box-sizing: border-box; }
.mt-grp { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mt-grp > .node { align-self: flex-start; min-width: 150px; gap: 16px; border: 1px solid var(--ink); font-size: 14px; }
.mt-grp > .node::before { content: ""; position: absolute; left: -21px; top: 50%; width: 20px; height: 1px; background: var(--soft); }
.mt-grp .cards { flex-wrap: nowrap; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; margin-right: calc(-1 * var(--pad-r)); padding: 5px var(--pad-r) 14px 5px; margin-left: -5px; scrollbar-width: none; }
.mt-grp .cards::-webkit-scrollbar { display: none; }
.mt-grp .tc { flex: none; scroll-snap-align: start; }
.mficha { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-top: 20px; }
.mficha .cap { padding-top: 0; }
.mficha h3 { font-size: 22px; }
.mficha .go { justify-self: start; margin-top: 8px; }
@media (max-width: 899.98px) {
  .tree, #ficha { display: none; }
  .cat-list { display: block; }
}

/* Photography */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--ink); height: 40px; padding: 0 16px; cursor: pointer; background: transparent; transition: background .3s, color .3s; }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.pill:hover { border-color: var(--acc); }
.mosaic { columns: 3; column-gap: 24px; padding-top: 40px; }
.mosaic figure { break-inside: avoid; margin: 0 0 24px; display: flex; flex-direction: column; gap: 10px; }
.mosaic button { padding: 0; border: 0; background: var(--img-bg); cursor: zoom-in; display: block; width: 100%; overflow: hidden; }
.mosaic img { width: 100%; height: auto; }
.mosaic figcaption { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
@media (max-width: 1000px) { .mosaic { columns: 2; column-gap: 16px; } .mosaic figure { margin-bottom: 16px; } }
@media (max-width: 560px) { .mosaic { columns: 1; } .pills { gap: 6px; } .pill { padding: 0 12px; } }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(10, 10, 10, .96); color: #F2F2F2; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lb[hidden] { display: none; }
.lb-top, .lb-bot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; }
.lb-stage { display: grid; place-items: center; padding: 0 80px; min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb button { width: 48px; height: 48px; border: 1px solid rgba(255, 255, 255, .4); background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; font-size: 20px; }
.lb button:hover { border-color: var(--acc); color: var(--acc); }
.lb .nav { position: fixed; top: 50%; transform: translateY(-50%); }
.lb .prev { left: 16px; } .lb .next { right: 16px; }
@media (max-width: 760px) {
  .lb-stage { padding: 0 8px; }
  .lb .nav { position: static; transform: none; }
  .lb-bot { justify-content: space-between; }
}


/* About: portrait beside the text, facts underneath */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px 80px; padding-top: 40px; align-items: start; }
.about .portrait { aspect-ratio: 18 / 25; position: relative; }
.about .portrait::after { content: ""; position: absolute; left: 0; bottom: 0; width: 40px; height: 4px; background: var(--acc); }
.about .lead { margin: 0; font-family: var(--head); font-size: clamp(24px, 2.5vw, 38px); font-weight: 500; letter-spacing: -.025em; line-height: 1.18; }
.about .body { margin: 0; max-width: 620px; font-size: 18px; line-height: 1.55; }
.about .col { display: flex; flex-direction: column; gap: 28px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 80px; margin-top: 80px; font-size: 15px; line-height: 1.4; align-items: start; }
.facts h3, .about h3 { margin: 0 0 12px; font-weight: 400; }
/* every row is one line of the same height, so Experience and Services line up */
.xp { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; height: 48px; border-top: 1px solid var(--rule); }
.xp > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp > span:last-child { opacity: .5; white-space: nowrap; font-variant-numeric: tabular-nums; }
.areas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.areas li { height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--ink); font-size: 14px; }
@media (max-width: 900px) {
  .about { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; }
  .about .body { font-size: 17px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 40px; margin-top: 56px; }
  .xp { height: auto; min-height: 48px; padding: 10px 0; }
  .xp > span:first-child { white-space: normal; }
}
@media (max-width: 560px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .about .portrait { width: 62%; }
  .areas li { height: 36px; padding: 0 12px; font-size: 13px; }
}

/* Trusted by: one compact line of names (scrolls sideways on phones) */
.trust { margin-top: 80px; }
.trust-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.trust-head h3 { margin: 0; font-family: var(--head); font-weight: 700; font-size: clamp(22px, 2vw, 30px); letter-spacing: -.03em; line-height: 1; }
/* one compact row: logo + name, no labels */
.clients { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-left: 1px solid var(--ink); }
.clients li { padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); position: relative; transition: background .3s, color .3s; }
.clients .logo { display: block; height: 32px; width: 100%; background: currentColor; -webkit-mask: var(--logo) left center / contain no-repeat; mask: var(--logo) left center / contain no-repeat; }
.clients li b { font-weight: 500; font-size: 12px; letter-spacing: 0; line-height: 1.25; }
.clients li::after { content: ""; position: absolute; right: 10px; top: 10px; width: 6px; height: 6px; background: var(--acc); transform: scale(0); transition: transform .35s var(--ease); }
.clients li:hover { background: var(--ink); color: var(--bg); }
.clients li:hover::after { transform: scale(1); }
.trust .kind { margin-top: 40px; }
@media (max-width: 1100px) {
  .clients { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-right: calc(-1 * var(--pad-r)); scrollbar-width: none; }
  .clients::-webkit-scrollbar { display: none; }
  .clients li { flex: none; width: 160px; scroll-snap-align: start; }
}
@media (max-width: 560px) { .trust { margin-top: 64px; } .clients li { width: 144px; } }

/* Kind words */
.kind { border: 1px solid var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.kind .q { padding: 48px 40px; display: flex; flex-direction: column; gap: 32px; }
.kind blockquote { margin: 0; font-family: var(--head); font-size: clamp(22px, 2.4vw, 36px); font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.kind .ctrl { display: flex; flex-direction: column; border-left: 1px solid var(--ink); }
.kind .ctrl button { flex: 1; width: 80px; background: none; border: 0; cursor: pointer; font-size: 22px; display: grid; place-items: center; }
.kind .ctrl button:hover { color: var(--acc); }
.kind .ctrl span { height: 80px; display: grid; place-items: center; font-size: 12px; font-variant-numeric: tabular-nums; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
@media (max-width: 760px) {
  .kind { grid-template-columns: 1fr; }
  .kind .q { padding: 32px 20px; }
  .kind .ctrl { flex-direction: row; border-left: 0; border-top: 1px solid var(--ink); }
  .kind .ctrl button { height: 56px; width: auto; }
  .kind .ctrl span { height: auto; flex: 1; border: 0; border-left: 1px solid var(--ink); border-right: 1px solid var(--ink); }
  .kind .ctrl .ic { transform: rotate(-90deg); }
}

/* Contact */
.contact { padding: 160px 0 120px; text-align: center; position: relative; }
/* grid behind "Let's talk", lined up with the page grid (x from the page edge, y set in home.js) */
.contact .contact-grid { top: 0; bottom: 0; height: auto; left: calc(-1 * var(--pad-l)); width: 100vw; background-position: 0 var(--gy, 0px); -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%); }
.contact > button { position: relative; z-index: 1; }
.contact button { background: none; border: 0; cursor: pointer; padding: 0; }
.contact .talk { display: block; font-family: var(--head); font-weight: 700; font-size: clamp(56px, 10vw, 168px); letter-spacing: -.05em; line-height: .9; }
.contact .mail { display: inline-flex; gap: 12px; align-items: center; margin-top: 28px; height: 40px; padding: 0 16px; border: 1px solid var(--ink); font-size: 15px; transition: background .3s, color .3s; max-width: 100%; }
.contact button:hover .mail { background: var(--ink); color: var(--bg); }
.contact .mail .ok { color: var(--acc); }
@media (max-width: 760px) { .contact { padding: 112px 0 80px; } .contact .mail { font-size: 14px; } }

/* Footer */
.foot { display: flex; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 18px 0 32px; border-top: 1px solid var(--ink); }
.foot .soc { display: flex; gap: 20px; }
.foot .soc a { display: inline-flex; gap: 6px; align-items: center; }
.foot a:hover { color: var(--acc); }

/* ========== Case study ========== */
.cs-head { padding: 120px 0 64px; }
.cs-head dl { margin: 0 0 48px; display: grid; grid-template-columns: auto 1fr; gap: 6px 28px; }
.cs-head dd { margin: 0; }
.cs-head h1 { margin: 0; font-family: var(--head); font-weight: 700; font-size: clamp(44px, 8.6vw, 148px); letter-spacing: -.05em; line-height: .86; }
.cs-head .sub { margin: 20px 0 0; font-family: var(--head); font-weight: 500; font-size: clamp(20px, 2.4vw, 38px); letter-spacing: -.03em; line-height: 1.1; }
.wide { aspect-ratio: 40 / 9; }
.chap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; padding: 140px 0 56px; border-top: 1px solid var(--ink); margin-top: 140px; }
.chap h2 { margin: 0; padding-top: 24px; font-family: var(--head); font-weight: 700; font-size: clamp(30px, 3.4vw, 52px); letter-spacing: -.04em; line-height: .95; }
.chap h2 .n { opacity: .35; font-weight: 400; font-size: .32em; letter-spacing: .04em; vertical-align: top; margin-right: 14px; }
.chap .txt { display: flex; flex-direction: column; gap: 20px; padding-top: 24px; max-width: 680px; }
.chap p { margin: 0; font-size: 18px; line-height: 1.6; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.g3 .s2 { grid-column: span 2; }
.g3.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 + .g3, .g3 + .narrow, .ph + .g3, .g3 + .ph { margin-top: 24px; }
/* a single image at half width, aligned right (phones: full width) */
.narrow { width: 50%; margin: 24px 0 0 auto; }
.over { position: relative; height: var(--h, 760px); }
.over > * { position: absolute; }
.over .a { left: 0; top: 0; width: 62%; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .45); transition: transform .6s ease; }
.over .b { right: 0; top: 180px; width: 36%; box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .5); }
@media (hover: hover) { .over:hover .a { transform: translate(-12px, -12px); } }
.ba-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; padding-top: 40px; align-items: end; }
.ba-fig { background: var(--img-bg); position: relative; overflow: hidden; }
.g3 .fill { height: 100%; }
.ba-fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s ease; }
.ba-fig img.off { opacity: 0; }
/* the visible image sits in the flow, so the frame always has its exact proportion */
.ba-fig img:not(.off) { position: relative; height: auto; }
.ba-fig > .off { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.tl-empty { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--bg); border: 1px dashed var(--faint); color: var(--muted); transition: opacity .5s ease; }
.tl-empty:not(.off) { position: relative; }
/* Timeline */
.tl-track { position: relative; display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); margin-top: 40px; }
.tl-track::before { content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 1px; background: var(--ink); }
.tl-stop { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 13px 8px 0 0; background: none; border: 0; text-align: left; cursor: pointer; color: var(--muted); transition: color .3s; min-width: 0; }
.tl-stop .dot { width: 12px; height: 12px; background: var(--bg); border: 1px solid var(--ink); transition: background .3s, transform .3s; }
.tl-stop .yr { font-family: var(--head); font-weight: 700; font-size: clamp(22px, 2.4vw, 36px); letter-spacing: -.03em; line-height: 1; }
.tl-stop .note { font-size: 10px; }
.tl-stop:hover { color: var(--ink); }
.tl-stop[aria-pressed="true"] { color: var(--ink); }
.tl-stop[aria-pressed="true"] .dot { background: var(--ink); transform: scale(1.35); }
.tl-stop.mark .dot { background: var(--acc); border-color: var(--acc); }
.tl-stop.mark .note { color: var(--acc); }
@media (max-width: 560px) { .tl-stop .note { font-size: 9px; letter-spacing: .06em; } .tl-stop .yr { font-size: 20px; } }
.ba-year { font-family: var(--head); font-weight: 700; font-size: 72px; letter-spacing: -.05em; line-height: .9; }
.ba-txt p { margin: 12px 0 0; font-size: 17px; line-height: 1.5; }
.next { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 160px 0 0; padding: 40px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.next b { font-family: var(--head); font-weight: 700; font-size: clamp(28px, 4vw, 64px); letter-spacing: -.04em; display: inline-flex; gap: 16px; align-items: center; line-height: 1; }
.next:hover b { color: var(--acc); }
.page .foot { border-top: 0; }
@media (max-width: 900px) {
  .chap { grid-template-columns: 1fr; gap: 0; padding: 72px 0 40px; margin-top: 72px; }
  .chap p { font-size: 17px; }
  .g3 { grid-template-columns: 1fr; gap: 16px; }
  .g3 .s2 { grid-column: auto; }
  .g3 .fill { height: auto; }
  .g3.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .narrow { width: 100%; margin-top: 16px; }
  .over { height: auto; display: flex; flex-direction: column; gap: 16px; }
  .over > * { position: static; width: 100% !important; }
  .over .b { width: 72% !important; align-self: flex-end; margin-top: -48px; }
  .ba-row { grid-template-columns: 1fr; gap: 20px; }
  .ba-year { font-size: 56px; }
  .cs-head { padding: 88px 0 40px; }
  .wide { aspect-ratio: 16 / 7; }
  .next { flex-direction: column; align-items: flex-start; margin-top: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ========== Project pages: centred name, way back at the bottom ========== */
.page .top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; }
.page .top .back { grid-column: 1; justify-self: start; margin: 0; }
.page .top .brand { grid-column: 2; transition: color .3s; }
.page .top .brand:hover { color: var(--acc); }
.page .top .tools { grid-column: 3; justify-self: end; }
/* Phone: name on its own line, centred; Catalog left and the toggles right underneath */
@media (max-width: 760px) {
  .page .top { grid-template-columns: minmax(0, 1fr) auto; row-gap: 20px; }
  .page .top .brand { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .page .top .back { grid-row: 2; }
  .page .top .tools { grid-column: 2; grid-row: 2; }
}
.foot-idx { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 120px; border-top: 1px solid var(--ink); }
.foot-idx a { display: flex; flex-direction: column; gap: 10px; padding: 20px 16px 24px 0; transition: color .3s; }
.foot-idx a + a { padding-left: 16px; border-left: 1px solid var(--rule); }
.foot-idx b { font-family: var(--head); font-weight: 700; font-size: clamp(20px, 2.2vw, 32px); letter-spacing: -.03em; line-height: 1; }
.foot-idx a:hover { color: var(--acc); }
.page .foot { border-top: 1px solid var(--ink); }
@media (max-width: 760px) {
  .foot-idx { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 80px; }
  .foot-idx a:nth-child(3) { padding-left: 0; border-left: 0; }
  .foot-idx a:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
.totop { position: fixed; right: 16px; bottom: 16px; z-index: 30; width: 40px; height: 40px; display: grid; place-items: center; background: var(--bg); color: var(--ink); border: 1px solid var(--ink); cursor: pointer; font-size: 18px; transition: background .3s, color .3s; }
.totop:hover { background: var(--ink); color: var(--bg); }
.totop .ic { transition: transform .3s; }
.totop:hover .ic { transform: translateY(-2px); }

/* ========== Case study: floating compositions (overlapping, offset, with shadow) ========== */
.fl { position: relative; aspect-ratio: 100 / var(--h); margin-top: 40px; }
.fl .fi { position: absolute; margin: 0; left: calc(var(--x) * 1%); top: calc(var(--y) / var(--h) * 100%); width: calc(var(--w) * 1%); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .45); transition: transform .6s var(--ease, ease); }
.fl .fi img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fl .fi:hover { transform: translateY(-6px); }
.chap + .fl { margin-top: 0; }
.fl + .g3, .g3 + .fl, .fl + .ph, .ph + .fl { margin-top: 40px; }
@media (max-width: 760px) {
  .fl { aspect-ratio: 100 / var(--mh); margin-top: 24px; }
  .fl .fi { left: calc(var(--mx) * 1%); top: calc(var(--my) / var(--mh) * 100%); width: calc(var(--mw) * 1%); box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .45); }
  .fl + .g3, .g3 + .fl, .fl + .ph, .ph + .fl { margin-top: 24px; }
}

/* ========== Timeline: one carousel per year ========== */
.tl-media { min-width: 0; }
.tl-car[hidden] { display: none; }
.tl-slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 3 / 2; background: var(--img-bg); overscroll-behavior-x: contain; outline: none; }
.tl-slides::-webkit-scrollbar { display: none; }
.tl-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.tl-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-slide.contain img { object-fit: contain; }
.tl-ctl { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.tl-ctl button { width: 40px; height: 40px; display: grid; place-items: center; background: none; border: 1px solid var(--ink); color: var(--ink); cursor: pointer; font-size: 18px; transition: background .3s, color .3s; }
.tl-ctl button:hover { background: var(--ink); color: var(--bg); }
.tl-count b { font-weight: 400; color: var(--ink); }
.tl-theme { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; margin: 20px 0 0; }
.tl-theme dd { margin: 0; }
.tl-media .tl-empty { aspect-ratio: 3 / 2; }

/* ========== Phone home (5th batch): slimmer ruler, toggles top right, bigger name ========== */
.m-br { display: none; }
@media (max-width: 760px) {
  :root { --pad-l: 30px; } .page .main { --pad-l: 30px; }
  .main { padding-top: 16px; }
  .ruler { width: 14px; background-size: 14px 100%, 6px 100%; background-image: repeating-linear-gradient(180deg, var(--ink) 0 1px, transparent 1px 40px), repeating-linear-gradient(180deg, var(--soft) 0 1px, transparent 1px 8px); }
  .ruler i { width: 14px; }
  body:not(.page) .top dl { display: none; }
  body:not(.page) .top { justify-content: flex-end; }
  .hero { padding-top: 72px; }
  .hero h1 { font-size: 25vw; line-height: .82; }
  .m-br { display: inline; }
}
/* Phone catalog: group buttons open their projects */
.mt-grp > button.node { background: var(--bg); color: var(--muted); cursor: pointer; text-align: left; transition: color .3s, border-color .3s; border-color: var(--faint); }
.mt-grp > button.node .tg { margin-left: auto; transition: transform .35s var(--ease); }
.mt-grp.open > button.node { color: var(--ink); border-color: var(--ink); }
.mt-grp.open > button.node .tg { transform: rotate(45deg); }
.mt-grp .cards[hidden] { display: none; }
/* Phone photography: one row that swipes sideways (2–3 photos in view) instead of a long column */
@media (max-width: 760px) {
  .mosaic { columns: auto; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; padding: 24px var(--pad-r) 4px 0; margin-right: calc(-1 * var(--pad-r)); }
  .mosaic::-webkit-scrollbar { display: none; }
  .mosaic figure { flex: none; margin: 0; scroll-snap-align: start; max-width: 60vw; }
  .mosaic img { height: 180px; width: auto; max-width: 60vw; object-fit: cover; }
  .mosaic figcaption { flex-direction: column; gap: 4px; font-size: 12px; }
  .pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .pills::-webkit-scrollbar { display: none; }
  .pill { flex: none; }
}

/* About: several photos of Tomaz, side by side in a swipe row (same frame as the old single portrait) */
.ab-car { min-width: 0; }
.ab-slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.ab-slides::-webkit-scrollbar { display: none; }
.ab-slides > .ph { flex: 0 0 100%; scroll-snap-align: start; }
.ab-car .portrait::after { display: none; }
.ab-car .tl-ctl { position: relative; }
.ab-car .tl-ctl::before { content: ""; position: absolute; left: calc(100% / var(--n, 3) * var(--i, 0)); top: -12px; width: calc(100% / var(--n, 3)); height: 4px; background: var(--acc); transition: left .4s ease; }

/* Photography on the home: one row that slides sideways at every size, ending in "See all photos" */
.mosaic { columns: auto; display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; padding: 40px var(--pad-r) 4px 0; margin-right: calc(-1 * var(--pad-r)); }
.mosaic::-webkit-scrollbar { display: none; }
.mosaic figure { flex: none; margin: 0; scroll-snap-align: start; }
.mosaic img { height: 360px; width: auto; max-width: 70vw; object-fit: cover; }
.mosaic figcaption { flex-direction: column; gap: 4px; }
.see-all { flex: none; width: 240px; height: 360px; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 20px; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; transition: background .3s, color .3s; }
.see-all b { font-family: var(--head); font-size: 28px; font-weight: 500; letter-spacing: -.02em; line-height: 1.05; }
.see-all .arr { font-size: 20px; }
.see-all:hover { background: var(--acc); color: #141414; border-color: var(--acc); }
@media (max-width: 760px) {
  .mosaic { gap: 12px; padding-top: 24px; }
  .mosaic img { height: 180px; max-width: 60vw; }
  .see-all { width: 140px; height: 180px; padding: 14px; }
  .see-all b { font-size: 18px; }
}

/* Photography page (/fotografia): one block per event, masonry of photos */
.ph-head .pills { margin-top: 32px; flex-wrap: wrap; }
.ph-head .pills a.pill { text-decoration: none; display: inline-flex; align-items: center; }
.ph-ev { padding-top: 96px; scroll-margin-top: 40px; }
.ph-ev-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.ph-ev-head h2 { margin: 0; font-family: var(--head); font-weight: 500; font-size: clamp(24px, 2.6vw, 38px); letter-spacing: -.03em; line-height: 1; }
.ph-ev-head a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.ph-ev-head a:hover { color: var(--acc); }
.ph-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-top: 24px; }
.ph-grid figure { margin: 0; aspect-ratio: 4 / 5; }
.ph-grid figure button { height: 100%; }
.ph-grid img { height: 100% !important; object-fit: cover; }
.ph-grid button { padding: 0; border: 0; background: var(--img-bg); cursor: zoom-in; display: block; width: 100%; overflow: hidden; }
.ph-grid img { width: 100%; height: auto; display: block; }
@media (max-width: 1000px) { .ph-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } }
@media (max-width: 560px) { .ph-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
@media (max-width: 760px) { .ph-ev { padding-top: 64px; } .ph-ev-head { flex-direction: column; align-items: flex-start; gap: 8px; } }

/* Provisional text: just an asterisk next to the name */
.prov { color: var(--acc); margin-left: 2px; }
