/* Valentino Mateski, v5. Measured on his Figma frame 31:5798 (1440 wide):
   12 columns, 20 margin, 10 gutter, radius 5, paper #F8F7F6, ink #181716, grey #746E64, card #EEEBE7.
   One typeface in one weight: GT Alpina Light. Sizes 48/100%/-4%, 36/110%/-4%, 20/120%/-2%, 18/120%, 16/120%. */
@font-face { font-family: "TT Norms Pro"; src: local("TT Norms Pro Normal"), local("TTNormsPro-Normal"), url("/fonts/TT_Norms_Pro_Normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "GT Alpina"; src: local("GT Alpina Trial Light"), local("GTAlpinaTrial-Light"), local("GT Alpina Standard Light"), url("/fonts/GT-Alpina-Standard-Light-Trial.otf") format("opentype"); font-weight: 300; font-style: normal; font-display: swap; }
:root { --bg: #F8F7F6; --ink: #181716; --grey: #746E64; --card: #EEEBE7; --card-2: #E4DFD8; --r: 5px; --m: 20px; --gut: 10px; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: "GT Alpina", "Times New Roman", serif; font-weight: 300; font-style: normal; font-size: 20px; line-height: 1.2; letter-spacing: -0.02em; -webkit-font-smoothing: antialiased; font-variant-numeric: lining-nums; }
h1, h2, h3, b, strong, dt, button, sup { font-weight: 300; font-style: normal; font-size: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; border-radius: var(--r); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; letter-spacing: inherit; }
.grey { color: var(--grey); }
.g { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gut); padding-inline: var(--m); width: 100%; max-width: 1440px; margin-inline: auto; }
/* wider than 1440: the 1400 content keeps its size and the side margins grow */
.t48 { font-size: clamp(34px, 3.34vw, 48px); line-height: 1; letter-spacing: -0.04em; }
.t36 { font-size: clamp(26px, 2.5vw, 36px); line-height: 1.1; letter-spacing: -0.04em; }
sup { font-size: 0.6em; vertical-align: top; position: relative; top: 0.15em; color: var(--grey); }

/* header: menu over columns 1 to 6, card over columns 10 to 12 */
/* the menu stays at the top while the page scrolls (his frames 37:6478 and 37:6398) */
.top { padding-top: 20px; align-items: start; position: fixed; inset: 0 0 auto 0; z-index: 5; pointer-events: none; }
.top > * { pointer-events: auto; }
.bar { grid-column: 1 / 5; height: 51px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-radius: var(--r); background: var(--card); font-size: 16px; letter-spacing: 0; }
.bar a { transition: color 0.3s; } .bar a:hover, .bar a[aria-current="page"] { color: var(--grey); }
.call { grid-column: 10 / -1; height: 130px; padding: 10px; display: grid; grid-template-columns: 1fr 90px; gap: 10px; border-radius: var(--r); background: var(--card); font-size: 16px; letter-spacing: 0; transition: background 0.3s; }
.call:hover { background: var(--card-2); }
/* home: the card is absent while the opening is on screen and appears once the portrait has left */
.home .call { opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s, background 0.3s; }
.home.past .call { opacity: 1; visibility: visible; }
.call > span { display: flex; flex-direction: column; justify-content: space-between; padding: 4px 0 2px; }
.call img { width: 90px; height: 110px; object-fit: cover; object-position: 50% 20%; }

.rating { display: grid; gap: 6px; font-size: 16px; line-height: 1.2; letter-spacing: 0; margin-bottom: 20px; }
.rating span:first-child { display: flex; align-items: center; gap: 6px; }
.rating img { width: auto; height: 11px; border-radius: 0; }

/* opening: portrait columns 1 to 4 from y 91; headline columns 7 to 12 ending level with the portrait */
/* the portrait stays pinned under the menu while the right column scrolls; it lets go when the
   last number row is level with its bottom edge */
.hero { padding-top: 91px; grid-template-rows: auto auto; --col: calc((min(100vw, 1440px) - 150px) / 12); }
.portrait { grid-column: 1 / 5; grid-row: 1 / span 2; position: sticky; top: 91px; align-self: start; }
.portrait img { aspect-ratio: 459 / 561; object-fit: cover; object-position: 50% 26%; }
.lead { grid-column: 7 / -1; grid-row: 1; padding-bottom: 7px; min-height: calc((var(--col) * 4 + 30px) * 561 / 459); display: flex; flex-direction: column; justify-content: flex-end; }
.intro { grid-column: 7 / 10; grid-row: 2; margin-top: 33px; display: grid; gap: 24px; }
.stats { margin-top: 16px; display: grid; gap: 10px; }
.stats div { min-height: 76px; padding: 10px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-radius: var(--r); background: var(--card); }
.stats dt { font-size: 16px; line-height: 1.2; letter-spacing: 0; color: rgba(24, 23, 22, 0.75); max-width: 170px; }
.stats dd { font-size: 36px; line-height: 1; letter-spacing: -0.04em; white-space: nowrap; }

/* 160 between sections */
.about { margin-top: 160px; row-gap: 40px; scroll-margin-top: 91px; }
.about h2 { grid-column: 1 / 7; }
.about .c1 { grid-column: 1 / 4; } .about .c2 { grid-column: 4 / 7; }
.about p + p { margin-top: 1.2em; }

.work { margin-top: 160px; row-gap: 40px; scroll-margin-top: 91px; }
.work h2, .arch h2 { grid-column: 1 / -1; }
.pgrid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 60px var(--gut); }
.pcard { display: block; }
.pcard .im { position: relative; display: block; aspect-ratio: 460 / 340; overflow: hidden; border-radius: var(--r); background: var(--card); }
.pcard .im img { position: absolute; inset: 0; height: 100%; object-fit: cover; border-radius: 0; transition: opacity 0.45s; }
.pcard .im .alt { opacity: 0; }
@media (hover: hover) { .pcard:hover .im .alt { opacity: 1; } }
/* card text from his frame 37:6380: name 36, line 20 at 75%, then the tags (TT Norms 16, 31 high, 5 apart) */
.pcard .nm { display: block; margin-top: 20px; font-size: clamp(28px, 2.5vw, 36px); line-height: 1.14; letter-spacing: -0.02em; }
.pcard .ov { display: block; margin-top: 10px; color: rgba(24, 23, 22, 0.75); }
.pcard .tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 20px; }
.pcard .tags span { display: inline-flex; align-items: center; height: 31px; padding: 0 10px; border-radius: var(--r); background: var(--card-2); font-family: "TT Norms Pro", "Helvetica Neue", Arial, sans-serif; font-weight: 400; font-size: 16px; line-height: 1; letter-spacing: 0; white-space: nowrap; }
.pcard .im img { transition: opacity 0.45s, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1); }
@media (hover: hover) { .pcard:hover .im img { transform: scale(1.03); } }

.quote { margin-top: 160px; }
.quote > div { grid-column: 7 / -1; }
.quote .by { margin-top: 40px; font-size: 18px; line-height: 1.2; letter-spacing: -0.04em; }

.arch { margin-top: 160px; row-gap: 52px; }
.masonry { grid-column: 1 / -1; columns: 6; column-gap: var(--gut); }
.piece { display: block; break-inside: avoid; margin-bottom: var(--gut); }
.piece img { transition: opacity 0.3s; } @media (hover: hover) { .piece:hover img { opacity: 0.82; } }
.piece[hidden] { display: none; }
.piece img { background: var(--card); }
.more { grid-column: 1 / -1; display: flex; justify-content: center; margin-top: 10px; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 51px; padding: 0 20px; border-radius: var(--r); background: var(--card); font-size: 16px; line-height: 1; letter-spacing: 0; transition: background 0.3s, color 0.3s; }
.btn:hover { background: var(--card-2); }
.arch.full { margin-top: 0; padding-top: 220px; }
.arch.full h1 { grid-column: 1 / -1; }
.filters { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--gut); }
.filters > span { font-size: 16px; letter-spacing: 0; margin-right: 10px; }
.filters .btn { min-width: 51px; justify-content: center; }
.masonry[data-cols="3"] { columns: 3; } .masonry[data-cols="4"] { columns: 4; } .masonry[data-cols="6"] { columns: 6; }
.filters .btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.filters .btn[aria-pressed="true"] sup { color: inherit; }

/* about page = the CV, his frame 33:6016 */
.t24 { font-size: clamp(20px, 1.67vw, 24px); line-height: 1.2; letter-spacing: -0.04em; }
.t24 p + p { margin-top: 1.2em; }
.cv { padding-top: 91px; }
.cv .portrait { grid-column: 1 / 5; grid-row: 1; position: sticky; top: 91px; align-self: start; }
.cvcol { grid-column: 7 / -1; grid-row: 1; padding-top: 123px; }
.cvcol h1 { line-height: 1; }
.cvcol .sub { font-size: 18px; line-height: 1.2; letter-spacing: -0.04em; }
.cvcol h1 + .sub { margin-top: 10px; }
.cvcol .sum { margin-top: 80px; }
.cvcol h2 { line-height: 1; margin-top: 80px; }
/* his updated frame: a hairline 40 above every role and every later section, 40 from the line to the text */
.role, .blk { margin-top: 40px; padding-top: 40px; border-top: 1px solid rgba(24, 23, 22, 0.25); }
.blk h2 { margin-top: 0; }
.blk h2 + .t24, .blk h2 + .sub { margin-top: 40px; }
.blk .sub + .t24 { margin-top: 20px; }
.role h3 + .sub { margin-top: 20px; }
.role .sub + .t24 { margin-top: 40px; }

/* case study, his frame 37:6189 */
.case { padding-top: 191px; }
.case h1 { grid-column: 1 / 7; grid-row: 1; margin-bottom: 80px; }
.facts { grid-column: 1 / 3; grid-row: 2; align-self: start; font-size: 18px; line-height: 1.2; display: grid; gap: 1.2em; }
.facts dd { color: var(--grey); }
.case .cover { grid-column: 5 / -1; grid-row: 2; }
.case .cover img { aspect-ratio: 929 / 619; object-fit: cover; background: var(--card); }
.brief, .decision { grid-row: 3; margin-top: 80px; font-size: 18px; line-height: 1.2; }
.brief { grid-column: 7 / 10; } .decision { grid-column: 10 / -1; }
.brief h2, .decision h2 { margin-bottom: 1.2em; }
.plates { grid-column: 5 / -1; grid-row: 4; margin-top: 80px; display: grid; gap: var(--gut); }
.prow { display: flex; gap: var(--gut); }
.prow span { min-width: 0; }
.prow img { background: var(--card); }
.next { grid-column: 5 / -1; grid-row: 5; margin-top: clamp(100px, 14vw, 200px); transition: color 0.3s; }
.next:hover { color: var(--grey); }

.foot { margin-top: 160px; padding-bottom: 20px; row-gap: 20px; }
.foot h2 { grid-column: 1 / 7; } .foot .mail { grid-column: 7 / -1; overflow-wrap: anywhere; } .foot .mail a:hover { color: var(--grey); }
.foot .links { grid-column: 7 / -1; display: flex; flex-wrap: wrap; gap: var(--gut); margin-top: 20px; }
.foot .base { grid-column: 1 / -1; margin-top: 120px; font-size: 16px; letter-spacing: 0; }

@media (max-width: 1023px) {
  .bar { grid-column: 1 / 7; } .call { display: none; }
  .lead { min-height: calc((var(--col) * 5 + 40px) * 561 / 459); }
  .portrait { grid-column: 1 / 6; } .lead { grid-column: 6 / -1; } .intro { grid-column: 6 / -1; }
  .about h2 { grid-column: 1 / -1; } .about .c1 { grid-column: 1 / 7; } .about .c2 { grid-column: 7 / -1; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote > div { grid-column: 4 / -1; }
  .masonry, .masonry[data-cols="6"] { columns: 4; }
  .cv .portrait { grid-column: 1 / 6; } .cvcol { grid-column: 6 / -1; padding-top: 0; }
  .case h1 { grid-column: 1 / -1; margin-bottom: 48px; }
  .facts { grid-column: 1 / 5; } .case .cover { grid-column: 5 / -1; }
  .brief { grid-column: 1 / 7; } .decision { grid-column: 7 / -1; } .plates, .next { grid-column: 1 / -1; }
  .foot h2, .foot .mail, .foot .links { grid-column: 1 / -1; }
}
@media (max-width: 699px) {
  :root { --m: 16px; }
  body { font-size: 18px; }
  .top { padding-top: 12px; } .bar { grid-column: 1 / -1; padding: 0 14px; font-size: 15px; }
  .hero { padding-top: 75px; } .case { padding-top: 110px; }
  .facts, .case .cover, .brief, .decision { grid-column: 1 / -1; grid-row: auto; } .case .cover { margin-top: 32px; } .brief, .decision { margin-top: 40px; }
  .plates { margin-top: 40px; } .plates, .next { grid-row: auto; } .prow { flex-direction: column; }
  .portrait, .lead, .intro, .about .c1, .about .c2, .quote > div { grid-column: 1 / -1; grid-row: auto; }
  .portrait { position: static; } .lead { min-height: 0; margin-top: 28px; padding-bottom: 0; } .about .c2 { margin-top: -18px; }
  .about, .work, .quote, .arch, .foot { margin-top: 96px; }
  .pgrid { grid-template-columns: 1fr; } .masonry, .masonry[data-cols] { columns: 2; } [data-grid] { display: none; }
  .cv .portrait, .cvcol { grid-column: 1 / -1; grid-row: auto; position: static; } .cvcol { padding-top: 40px; }
  .cvcol .sum, .cvcol > h2 { margin-top: 56px; }
  .arch.full { padding-top: 110px; } .cv { padding-top: 75px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------------------------------------------------------------------------
   Motion. Everything is visible without JavaScript and with reduced motion: the .js class
   is only set when motion is allowed. One easing curve for the whole site. */
:root { --ease: cubic-bezier(0.16, 1, 0.3, 1); }
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.35s; }
/* blocks rise into place as they enter the screen; --d staggers neighbours */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease) var(--d, 0ms), transform 1.1s var(--ease) var(--d, 0ms); }
.js .rv.in { opacity: 1; transform: none; }
/* pictures open from the top and settle from a slight zoom */
.js .rvi { clip-path: inset(0 0 100% 0 round var(--r)); transition: clip-path 1.2s var(--ease) var(--d, 0ms); }
.js .rvi img { transform: scale(1.12); transition: transform 1.6s var(--ease) var(--d, 0ms); }
.js .rvi.in { clip-path: inset(0 0 0 0 round var(--r)); }
.js .rvi.in img { transform: none; }
/* the headline comes up word by word */
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease) var(--d, 0ms); }
.js [data-split].in .w > span { transform: none; }
/* the menu and the card drop in on load */
.js .top > * { animation: drop 0.9s var(--ease) both; }
.js .top > *:nth-child(2) { animation-delay: 0.08s; }
@keyframes drop { from { opacity: 0; transform: translateY(-14px); } }
.btn, .bar a, .next, .foot a { transition: background 0.3s, color 0.3s; }
.masonry { transition: opacity 0.25s; } .masonry.swap { opacity: 0; }

/* ---------------------------------------------------------------------------
   Work page (after how.studio/work): Filter dropdown left, View mode right, cards in a grid or a list. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.work .more { margin-top: 30px; }
.workpage { padding-top: 220px; row-gap: 40px; }
.workpage h1, .workpage .tools, .workpage .pgrid, .workpage .none { grid-column: 1 / -1; }
.tools { display: flex; justify-content: space-between; align-items: center; font-family: "TT Norms Pro", "Helvetica Neue", Arial, sans-serif; font-weight: 400; font-size: 16px; line-height: 1; letter-spacing: 0; }
.sel { position: relative; display: flex; align-items: center; }
.sel .lab { color: var(--grey); padding-right: 12px; }
.sel button { display: flex; align-items: center; gap: 4px; height: 31px; }
.sel button svg { transition: transform 0.3s; }
.sel button[aria-expanded="true"] svg { transform: rotate(180deg); }
.sel ul { position: absolute; z-index: 4; top: calc(100% + 8px); left: 0; min-width: 190px; max-height: 60vh; overflow: auto; list-style: none; padding: 6px; border-radius: var(--r); background: var(--card); box-shadow: 0 10px 40px rgba(24, 23, 22, 0.12); }
.sel[data-sel="view"] ul { left: auto; right: 0; min-width: 120px; }
.sel ul[hidden] { display: none; }
.sel li { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 35px; padding: 0 10px; border-radius: 3px; cursor: pointer; white-space: nowrap; }
.sel li:hover, .sel li:focus-visible { background: var(--card-2); outline: none; }
.sel li[aria-selected="true"]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.pgrid[data-work] { transition: opacity 0.25s; } .pgrid[data-work].swap { opacity: 0; }
.pcard[hidden] { display: none; }
/* list view: one project per line, small picture first */
.pgrid[data-view="list"] { grid-template-columns: 1fr; gap: 0; }
.pgrid[data-view="list"] .pcard { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gut); align-items: center; padding: 10px 0; border-top: 1px solid rgba(24, 23, 22, 0.2); }
.pgrid[data-view="list"] .pcard .im { grid-column: 1 / 3; aspect-ratio: 3 / 2; }
.pgrid[data-view="list"] .pcard .nm { grid-column: 4 / 7; margin: 0; }
.pgrid[data-view="list"] .pcard .ov { grid-column: 7 / 10; margin: 0; }
.pgrid[data-view="list"] .pcard .tags { grid-column: 10 / -1; margin: 0; }

/* ---------------------------------------------------------------------------
   Home archive: pictures travel around one tilted ring; the middle is empty for the Archive button.
   site.js places each .orb every frame; without JavaScript they sit in a loose ring. */
.globe { grid-column: 1 / -1; position: relative; height: clamp(440px, 62vw, 780px); overflow: hidden; touch-action: pan-y; cursor: grab; }
.globe.drag { cursor: grabbing; }
.orb { position: absolute; left: 50%; top: 50%; width: clamp(72px, 16vw, 225px); opacity: 1; margin: 0; will-change: transform, opacity; user-select: none; -webkit-user-drag: none; }
.orb img { pointer-events: none; aspect-ratio: 3 / 2; object-fit: cover; background: var(--card); box-shadow: 0 6px 30px rgba(24, 23, 22, 0.1); }
.globe .cta { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1000; }
.btn.dark { background: var(--ink); color: var(--bg); } .btn.dark sup { color: inherit; opacity: 0.7; } .btn.dark:hover { background: #2E2C29; }
@media (max-width: 1023px) { .pgrid[data-view="list"] .pcard .nm { grid-column: 3 / 8; } .pgrid[data-view="list"] .pcard .ov { display: none; } .pgrid[data-view="list"] .pcard .tags { grid-column: 8 / -1; } }
@media (max-width: 699px) {
  .workpage { padding-top: 110px; }
  .pgrid[data-view="list"] .pcard .im { grid-column: 1 / 5; } .pgrid[data-view="list"] .pcard .nm { grid-column: 5 / -1; font-size: 24px; } .pgrid[data-view="list"] .pcard .tags { display: none; }
}

/* archive page head: the copy on the left (columns 1 to 6), the grid switch on the right */
.arch.full .lede { grid-column: 1 / 7; margin-top: -10px; }
.arch.full .filters { grid-column: 7 / -1; justify-content: flex-end; align-self: end; }
@media (max-width: 1023px) { .arch.full .lede { grid-column: 1 / 9; } .arch.full .filters { grid-column: 9 / -1; } }
@media (max-width: 699px) { .arch.full .lede { grid-column: 1 / -1; } }

/* phones: the same ellipse, edge to edge, ten pictures, a smaller button */
@media (max-width: 699px) {
  .globe { height: 320px; margin-inline: calc(var(--m) * -1); }
  .orb { width: 96px; }   /* 96 x 64: fewer pictures, so each one is bigger */
  .globe .cta { height: 36px; padding: 0 14px; font-size: 15px; }
  .globe .cta sup { display: none; }
}

/* a hairline across the 12 columns, 160 under the page's last block, marks where the footer starts
   (his About frame 33:6016: line at x 20, 1400 wide, 25%) */
.foot::before { content: ""; grid-column: 1 / -1; height: 1px; background: rgba(24, 23, 22, 0.25); margin-bottom: 20px; }
