/* SMASH — one grid, one type scale, nothing else.
   Press G for the 12 columns and the team's local three-column guides. */

/* The pairing of gentilhomme.com: Neue Montreal throughout, Season Mix for
   the large texts that tell a project; Druk for the titles and the masks.
   Druk Heavy is the trial (no licence yet), which lacks & @ / and Å Ä Ö:
   Anton, its web stand-in until now, sets those, scaled to Druk's capitals
   (cap heights 744 and 859 in 1000). */
@font-face { font-family: "Druk"; font-weight: 400; font-style: normal; font-display: block; src: url(/fonts/Druk-Heavy-Trial.woff2) format("woff2"); }
@font-face { font-family: "Druk Fill"; font-weight: 400; font-style: normal; font-display: block; size-adjust: 86.6%; src: url(/fonts/Anton-Regular.woff2) format("woff2"); }
@font-face { font-family: "Anton"; font-weight: 400; font-style: normal; font-display: block; src: url(/fonts/Anton-Regular.woff2) format("woff2"); }
@font-face { font-family: "Neue Montreal"; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/NeueMontreal-Regular.woff) format("woff"); }
@font-face { font-family: "Season Mix"; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/SeasonMix-Regular.woff) format("woff"); }
@font-face { font-family: "Season Mix"; font-weight: 400; font-style: italic; font-display: swap; src: url(/fonts/SeasonMix-RegularItalic.woff) format("woff"); }

:root {
  /* A dark, cool neutral gray with light text, in light and dark mode alike
     (the H panel can set another, ?palette= too); lavender round the mark on
     the landing. The gray trial: before, a warm brown and SMASH yellow. Its
     black is soft, a charcoal (--black): the ground, the type on the accent,
     the landing behind its film. */
  color-scheme: dark;
  --black: #26272a;
  --bg: var(--black);
  --ink: #e6e8ea;
  --muted: rgb(230 232 234 / 0.55);
  --line: rgb(230 232 234 / 0.14);
  --ground: var(--black); /* the projects' ground */
  --tile: #313236; /* a picture's place while it loads */
  --accent: #a68bfa; /* lavender */
  --on-accent: var(--black); /* type on the accent */
  --hero-pad: var(--margin); /* round a hero, as round the mark on the landing */
  --radius: 6px; /* a card's corners: the offerings, the projects' thumbnails */

  --cols: 12;
  /* The margin is half the mark's stem: half a slot, 10 of its 552 units,
     round a mark that spans the rest of the width. Round the marks and the
     heroes, and at the sides of the page, the room is the same. */
  --margin: calc(100vw * 10 / 572);
  --gutter: clamp(12px, 1.4vw, 24px);
  --row-gap: clamp(56px, 9vw, 168px);
  --header: 72px;

  --font: "Neue Montreal", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Season Mix", Georgia, serif;
  --display: Druk, "Druk Fill", Impact, "Arial Narrow", sans-serif; /* the titles: Druk, SMASH's title face */
  --t-small: 12px;
  --t-body: clamp(14px, 1vw, 16px);
  --t-lead: clamp(20px, 2vw, 32px);
  --t-title: clamp(28px, 3.4vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}


*, *::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: 400 var(--t-body)/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; width: 100%; height: auto; }
[hidden] { display: none !important; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2 { margin: 0; font-weight: inherit; }
b, strong { font-weight: inherit; }

/* ---- the grid -------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--gutter);
  padding-inline: var(--margin);
}
[style*="--span"] { grid-column: var(--start) / span var(--span); }

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.grid-overlay span { background: rgb(255 0 60 / 0.07); border-inline: 1px solid rgb(255 0 60 / 0.18); }
.show-grid .grid-overlay { opacity: 1; }

/* ---- grain ----------------------------------------------------------- */

/* A film's grain over the whole site, shifting a few times a second, still
   with reduced motion: stronger on the brown (--grain-ground), where the
   faint one is lost, and faint over the landing's mark and film (--grain;
   both H → Colour). The street (v3) has its own, in its shader. */
body::after {
  content: "";
  position: fixed;
  inset: -120px;
  z-index: 99;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='2' intercept='-0.5'/%3E%3CfeFuncG type='linear' slope='2' intercept='-0.5'/%3E%3CfeFuncB type='linear' slope='2' intercept='-0.5'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 240px 240px;
  opacity: var(--grain-ground, 0.14);
  animation: grain 0.6s steps(1) infinite;
}
.home:not(.is-reading)::after { opacity: var(--grain, 0.08); }
@keyframes grain {
  0% { transform: translate(0, 0); }
  17% { transform: translate(-61px, 37px); }
  33% { transform: translate(43px, -89px); }
  50% { transform: translate(-97px, -23px); }
  67% { transform: translate(79px, 67px); }
  83% { transform: translate(-29px, 101px); }
}
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }

/* ---- header ---------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 10;
  height: var(--header);
  align-items: center;
  font-size: var(--t-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--bg);
}
.logo { grid-column: 1 / span 3; display: flex; }
.logo svg { display: block; height: 30px; width: auto; }
.nav { grid-column: 4 / span 6; display: flex; gap: 2.2em; }
.contact { grid-column: 12; justify-self: end; }
.nav a, .contact { opacity: 0.55; }
.nav a[aria-current] { opacity: 1; }


/* ---- home: one screen, and a dive into it ------------------------------
   The work is seen through the mark: the SMASH logo, stretched edge to edge,
   masks a fast shuffled cut through every project image (as on svartljus.se).
   The static mask below is the no-JS fallback; main.js replaces it with one
   drawn from parameters (mark.js), and scrolling flies through it. */

.home { height: 100svh; overflow: hidden; background: var(--black); color: #fff; }
.home .site-header { display: none; }
/* A project page opens on its hero; no header. */
:is(.project-page, .category-page, .typeface-page) .site-header { display: none; }

.stage { position: fixed; inset: 0; display: block; }
/* Above the film but before the studio in paint order: the page covers it. */
.landed-logo {
  --logo-top: max(16px, var(--margin), env(safe-area-inset-top));
  position: fixed;
  top: var(--logo-top);
  left: max(var(--margin), env(safe-area-inset-left));
  z-index: 0;
  width: clamp(56px, 7vw, 108px);
  color: var(--accent);
  transform: translateY(calc((var(--logo-progress, 0) - 1) * (100% + var(--logo-top))));
  visibility: hidden;
  pointer-events: none;
}
.landed-logo svg { display: block; width: 100%; height: auto; }
/* A newer logo (?logo=, logos.js): its wordmark, as tall as the block mark's
   stems read, as wide as it is. */
.landed-logo.is-newer { width: auto; }
.landed-logo.is-newer svg { width: auto; height: clamp(22px, 2.6vw, 40px); }
.landed-logo.is-visible { visibility: visible; pointer-events: auto; }
.landed-logo:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
@media (prefers-reduced-motion: reduce) { .landed-logo { transform: none; } }
.slide {
  position: absolute;
  inset: 0;
  /* Edge to edge: the mark stretches to the viewport, as on svartljus.se. */
  -webkit-mask: url("/brand/smash-mask.svg") center / 100% 100% no-repeat;
  mask: url("/brand/smash-mask.svg") center / 100% 100% no-repeat;
}
.slide img, .slide canvas, .slide video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* The reel is drawn to the canvas (main.js); the element itself stays unseen. */
.slide .reel { opacity: 0; pointer-events: none; }
/* Once main.js has a picture it draws the mark itself: on a 2D canvas (v1),
   or in WebGL (v2). */
.slide.is-drawn, .slide.is-glass { -webkit-mask: none; mask: none; }
.slide.is-drawn img, .slide.is-glass img { visibility: hidden; }
/* With JavaScript (base.njk), the static mark is never shown first. */
.js .stage:not([data-renderer]) .slide:not(.is-set), .js [data-mark]:not(.is-set) { visibility: hidden; }

/* Scrolling dives into the mark (main.js): the page scrolls, the stage stays.
   The track is the dive, --dive screens long; past it the film stays put and
   the studio scrolls up over it. */
.home.can-dive { height: auto; overflow: visible; }
.dive-track { display: none; }
.home.can-dive .dive-track { display: block; height: calc(100svh * (1 + var(--dive, 2))); }
/* Past the footer, the landing starts over (main.js): the footer scrolls up
   off the mark at rest, and a screen on, the page is back at its top. */
.loop-tail { display: none; }
.home.can-dive .loop-tail { display: block; height: 200svh; }
/* Reading, the landing is brown underneath too, so a fast fling never
   flashes its black where the browser has yet to paint. */
/* Brown too once the dive is through and the mark gone (main.js), so a
   phone's bars, tinted from it, turn brown with the page. */
.home.is-reading, .home.is-through { background: var(--ground); }
/* The studio, between the dive and the projects. */
/* No stacking context of its own and no ground under the intro, so the
   headline can blend with the film behind it; the rest has the ground. */
.about { position: relative; display: flow-root; color: var(--ink); }
.about > .row { margin-top: 0; padding-top: var(--row-gap); background: var(--ground); }
/* The headline cut out of the ground: black with white letters, multiplied
   over the film, then the ground with black letters, screened over that; the
   words themselves (for reading, selecting, and screen readers) lie on top. */
.about-intro-wrap { position: relative; }
.about-knock { position: absolute; inset: 0; background: #000; color: #fff; mix-blend-mode: multiply; pointer-events: none; }
.about-knock-ground { background: var(--ground); color: #000; mix-blend-mode: screen; }
.about-intro-wrap > .about-intro:last-child { position: relative; }
.about-intro-wrap > .about-intro:last-child .about-head { color: transparent; }
/* Plain (landing.njk): the headline in SMASH yellow on the ground. */
.about-intro-wrap.is-plain { background: var(--ground); }
.is-plain > .about-knock { display: none; }
.is-plain > .about-intro:last-child .about-head { color: var(--accent); }
.home:not(.can-dive) .about { display: none; }
/* The intro, striking: a chunky headline in the mask's capitals, the words
   beside it large. */
.about-intro { padding-top: clamp(48px, 8vw, 128px); align-items: start; row-gap: 32px; }
.about-head {
  grid-column: 1 / span 6;
  margin: 0;
  font: 400 clamp(44px, 6.4vw, 104px) / 0.966 var(--display); /* 5% more than the display face's 0.92 elsewhere */
  text-transform: uppercase;
}
.about-text { grid-column: 7 / span 6; font: 400 clamp(20px, 2.22vw, 34px) / 1.18 var(--serif); }
.about-text p + p { margin-top: 0.8em; }
/* The studio's three offerings: tall pictures side by side, all but the
   screen's height, each named at its foot, as on gentilhomme.com. One hovered
   widens. */
.row.pillars { display: flex; align-items: stretch; gap: var(--gutter); padding-inline: var(--margin); }
.pillar { position: relative; display: block; flex: 1 1 0; min-width: 0; height: calc(100svh - 2 * var(--margin)); overflow: hidden; border-radius: var(--radius); color: #fff; transition: flex-grow 0.6s cubic-bezier(0.77, 0, 0.175, 1); }
.pillar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pillar::after { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(rgb(0 0 0 / 0), rgb(0 0 0 / 0.55)); pointer-events: none; }
.pillar-text { position: absolute; z-index: 1; inset: auto 0 0; padding: clamp(14px, 1.3vw, 24px); }
.pillar-name { font: 400 clamp(32px, 3.4vw, 60px) / 0.92 var(--display); text-transform: uppercase; color: var(--accent); }
.pillar-name span { display: block; }
@media (hover: hover) {
  .pillar:hover { flex-grow: 1.45; }
}
.pillar:focus-visible { flex-grow: 1.45; outline: 2px solid var(--accent); outline-offset: 4px; }
/* The people: a few words on the left, and a portrait each in black and
   white, with their email under it. */
.row.team { align-items: start; row-gap: clamp(24px, 3vw, 48px); }
.team-text { grid-column: 1 / span 4; margin: 0; max-width: 24ch; font: 400 clamp(20px, 1.9vw, 30px) / 1.18 var(--serif); }
.team-list { grid-column: 5 / span 8; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px) var(--gutter); margin: 0; padding: 0; list-style: none; }
.team-list > li { position: relative; }
/* The portraits divide their own span into thirds; cyan guides stay local
   to those columns while the page's 12-column guides remain red. */
.show-grid .team-list > li::after { content: ""; position: absolute; inset: 0; z-index: 1; border-inline: 1px solid rgb(60 220 230 / 0.45); pointer-events: none; }
.person { display: block; }
.person-picture { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 5 / 7; overflow: hidden; border-radius: var(--radius); background: var(--tile); }
.person-picture picture { position: absolute; inset: 0; }
.person-picture img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.person-mail { display: block; margin-top: 0.7em; font-size: var(--t-small); color: var(--ink); } /* on a phone, a line each side of the @ */
@media (max-width: 720px) {
  .team-text, .team-list { grid-column: 1 / -1; }
}
.row.clients { padding-bottom: var(--row-gap); } /* as far from the footer as from the cards */
/* A quiet four-column roster, on the same page margins as the studio. */
.clients-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(40px, 5.5vw, 96px) var(--gutter); margin: 0; padding: 0 var(--margin); list-style: none; }
.clients-grid > li { display: flex; align-items: center; justify-content: center; min-width: 0; }
.client { display: flex; align-items: center; justify-content: center; width: 100%; min-height: clamp(100px, 11vw, 176px); }
.client:focus-visible { outline: 1px solid var(--accent); outline-offset: 8px; }
/* Balance the visual weight: tall marks get more height than long wordmarks.
   All remain light on the studio's brown, with room around each logo. */
.client img { display: block; width: auto; max-width: 78%; height: calc(clamp(32px, 4vw, 64px) * pow(var(--ratio, 3) / 3, -0.35)); object-fit: contain; filter: brightness(0) invert(0.95); }
@media (max-width: 720px) {
  .clients-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The way in (cta.njk), at the foot of the studio and of each offering, as
   on gentilhomme.com: SMASH yellow, an invitation, the address large. */
/* The way in, on the page's own ground: the invitation, the address and the
   links in SMASH yellow, the first two in the chunky face. */
.cta { position: relative; z-index: 1; background: var(--accent); color: var(--on-accent); padding-block: clamp(40px, 5vw, 80px); } /* the accent, black on it */
.home:not(.can-dive) .cta { display: none; }
/* The typeface (typeface.njk): its name set in itself, its files, and the
   font to try, its five axes on sliders. */
@font-face { font-family: "SMASH"; font-weight: 100 900; font-display: block; src: url(/typeface/SMASH-VF.ttf) format("truetype"); } /* preloaded where it is used (typeface.njk), so the lines never jump */
.typeface { padding-block: clamp(32px, 4vw, 64px) var(--row-gap); }
.typeface-head { align-items: end; row-gap: 24px; }
.typeface-title { grid-column: 1 / span 6; margin: 0; font: 400 clamp(96px, 16vw, 280px) / 0.8 "SMASH", var(--display); }
.typeface-files { grid-column: 9 / span 4; display: flex; flex-direction: column; align-items: start; font-size: clamp(13px, 1.04vw, 16px); line-height: 1.6; text-transform: uppercase; }
.typeface-axes { margin-top: clamp(40px, 5vw, 80px); row-gap: 14px; }
.typeface-axis { grid-column: span 4; display: grid; grid-template-columns: 7.5em minmax(0, 1fr) 3.5em; align-items: center; gap: 12px; font-size: var(--t-small); text-transform: uppercase; }
.typeface-axis input { width: 100%; accent-color: var(--accent); }
.typeface-axis output { justify-self: end; font-variant-numeric: tabular-nums; }
.typeface-reset { grid-column: span 4; justify-self: start; align-self: center; min-height: 24px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-size: var(--t-small); text-transform: uppercase; cursor: pointer; }
.typeface-sample { padding-inline: var(--margin); font-family: "SMASH", var(--display); font-variation-settings: "wght" var(--wght, 500), "wdth" var(--wdth, 100), "CRSB" var(--crsb, 50), "ROND" var(--rond, 100), "HGHT" var(--hght, 471); }
/* Lines as tall as the letters are (the height axis, 0.7 em at the logo's). */
.typeface-sample { line-height: calc(0.45 + var(--hght, 471) * 0.7 / 471); }
.typeface-tester { margin-top: clamp(32px, 4vw, 64px); font-size: clamp(64px, 12vw, 220px); overflow-wrap: anywhere; outline: none; }
.typeface-glyphs { display: flex; flex-wrap: wrap; gap: 0.25em 0.45em; margin-top: clamp(32px, 4vw, 64px); font-size: clamp(40px, 5vw, 88px); }
.typeface .typeface-set { margin: clamp(32px, 4vw, 64px) var(--margin) 0; }
.typeface .typeface-set + .typeface-glyphs { margin-top: clamp(10px, 1vw, 16px); }
.typeface-alts { font-feature-settings: "ss01"; }
.js .typeface:not(.is-set) .typeface-samples { visibility: hidden; }
@media (max-width: 720px) {
  .typeface-title, .typeface-files, .typeface-axis { grid-column: 1 / -1; }
}
/* In the feed, an offering's opening before its projects: room below its
   introduction, as under the tiles on its own page. */
.project-page .offering { padding-bottom: var(--row-gap); }
.js .project-page main > .cta:last-child { display: none; } /* the feed never ends; copies come between the offerings (feed.js) */
.cta-inner { position: relative; row-gap: clamp(24px, 3vw, 48px); align-items: start; }
.cta-title { grid-column: 1 / span 8; margin: 0; font: 400 clamp(48px, 7.4vw, 124px) / 0.92 var(--display); text-transform: uppercase; }
.cta-title > span { display: block; }
/* Rounded as the cards are. Nothing on the site changes colour under the
   pointer. */
.cta-button { display: inline-block; padding: 0.5em 0.7em 0.45em; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font: 400 clamp(14px, 1.2vw, 18px) / 1 var(--font); text-transform: uppercase; -webkit-text-stroke: 0.05em currentColor; } /* as heavy as the footer's links */
.about-contact { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.6em; }
/* Beside it, the quieter one: its yellow as a line, for internship requests. */
.cta-button-line { background: none; color: var(--accent); box-shadow: inset 0 0 0 1.5px currentColor; }
/* Under the address, small and in a row: where else to find SMASH. */
.cta-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px clamp(24px, 3vw, 56px); font-size: clamp(13px, 1.04vw, 16px); line-height: 1.6; text-transform: uppercase; -webkit-text-stroke: 0.05em currentColor; } /* as 600: only Neue Montreal's Regular is here, and not every browser makes it bold itself */
.cta-contact { grid-column: 1 / -1; }
.cta-contact > * { display: block; }
.cta-contact address { margin-top: 0.4em; font-style: normal; font-size: clamp(13px, 1.04vw, 16px); line-height: 1.6; text-transform: uppercase; -webkit-text-stroke: 0.05em currentColor; } /* as the links under it */
.cta-links { align-items: center; }
.cta-social { display: flex; gap: 16px; }
.cta-social svg { display: block; width: 22px; height: 22px; }
/* Links in a list, each big enough to hit (24px). */
.cta-links > *, .typeface-files a, .category-nav a { min-height: 24px; }
.typeface-files a { display: block; }
.cta-mail { grid-column: 1 / -1; font: 400 clamp(32px, 7.4vw, 124px) / 1 var(--display); text-transform: uppercase; white-space: nowrap; }

html:has(.home.can-dive) { scrollbar-width: none; }
html:has(.home.can-dive)::-webkit-scrollbar { display: none; }
/* Who SMASH is: rows of the mask along the top and bottom (main.js paints
   them). The words are also here, for screen readers; the email's link lies
   over its painted letters, and goes with them as the dive starts. */
.info { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.info-mail { position: fixed; z-index: 10; color: transparent; overflow: hidden; }
.info-mail:focus-visible { outline: 1px solid #fff; outline-offset: 4px; }
.home.is-diving .info-mail { visibility: hidden; }
/* S: black round the mark instead of yellow. (A, invert, is drawn into the mask.) */
.home.light:not(.is-reading, .is-through) { background: var(--accent); } /* round the mark the landing is the accent (S: black); the page itself is gray */
/* The aperture (main.js): the mark stands on the page's own ground. */
.home.is-aperture:not(.is-reading, .is-through) { background: var(--ground); }
/* H: the tweak panel, above the full-screen link. */
/* The tweak panel (H) stays put while the page scrolls, and scrolls itself if taller than the screen. */
.tweak { position: fixed !important; z-index: 100; top: 12px !important; right: 12px !important; width: 280px !important; max-height: calc(100svh - 24px); overflow-y: auto; }

.site-footer {
  align-items: center;
  font-size: var(--t-small);
  letter-spacing: 0.04em;
  color: var(--muted);
}
.f-copy { grid-column: 1 / span 3; }
.f-mail { grid-column: 10 / span 3; justify-self: end; }
.f-top { grid-column: 10 / span 3; justify-self: end; }
.site-footer { margin-top: var(--row-gap); padding-block: 24px; border-top: 1px solid var(--line); }
.site-footer .f-mail { grid-column: 4 / span 6; justify-self: start; }

/* ---- page heads -------------------------------------------------------- */

.page-head { padding-block: clamp(48px, 8vw, 128px) clamp(32px, 4vw, 64px); align-items: baseline; }
.page-title { grid-column: 1 / span 8; font-size: var(--t-title); line-height: 1; letter-spacing: -0.025em; }
.page-meta { grid-column: 10 / span 3; justify-self: end; font-size: var(--t-small); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---- an offering's page (category.njk), as on gentilhomme.com ------------ */

/* Under the hero, the name large, the three offerings beside it, this one
   dark and marked in yellow. */
.category-head { margin-top: clamp(32px, 4vw, 64px); align-items: start; row-gap: 24px; }
.category-title { grid-column: 1 / span 6; margin: 0; font: 400 clamp(48px, 7.4vw, 124px) / 0.92 var(--display); text-transform: uppercase; } /* as the footer's "Let's work together" */
.category-title span { display: block; }
.category-nav { grid-column: 7 / span 6; display: flex; flex-direction: column; align-items: start; font: 400 clamp(20px, 2.22vw, 32px) / 1.18 var(--serif); }
.category-nav a { color: var(--muted); }
.category-nav [aria-current] { color: var(--ink); }
.category-nav [aria-current] { text-decoration: underline var(--accent) 3px; text-underline-offset: 0.18em; }
.category-projects { padding-bottom: var(--row-gap); }
.category-tiles { row-gap: clamp(40px, 5vw, 80px); align-items: start; }
.category-projects .tile { grid-column: span 4; display: flex; flex-direction: column; }
.category-projects .tile .label { margin-bottom: 8px; }
.tile-title { margin-bottom: 14px; font: 400 clamp(18px, 1.5vw, 24px) / 1.2 var(--serif); }
.category-projects .tile-media { aspect-ratio: 1; border-radius: var(--radius); }

/* ---- work index -------------------------------------------------------- */

.index { row-gap: clamp(40px, 6vw, 112px); align-items: end; }
.tile-media { aspect-ratio: var(--ar); overflow: hidden; background: var(--tile); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity 0.4s; }
.tile-caption {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  margin-top: 10px;
  font-size: var(--t-small);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tile-caption span:last-child { color: var(--muted); }

/* ---- project page ------------------------------------------------------- */

/* Projects are shown on the brown, with light text (--ground). */
.project-page, .about { --bg: var(--ground); }

/* Every project on the same ground, a line between each (they follow one
   another without end, feed.js). flow-root keeps a first child's margin on
   the ground (a project may start with its text). */
.project { display: flow-root; background: var(--bg); padding-bottom: var(--row-gap); }
.project + .project { border-top: 1px solid var(--line); }

/* A project opens on its hero picture, edge to edge, its title in the middle
   of it; the landed picture on the landing carries its title the same way. */
.project-head { position: relative; }
.project-head:not(.has-hero) { padding: clamp(48px, 8vw, 128px) var(--margin) clamp(24px, 3vw, 48px); }
.project-title { margin: 0; font-size: var(--t-title); line-height: 1; letter-spacing: -0.025em; }
/* With a hero, the title is the hero's mask: black with the title cut out,
   stretched over the picture edge to edge and multiplied with it, so the
   picture shows only through the letters (as the work does through the mark
   on the landing). The words stay for screen readers. */
.has-hero { isolation: isolate; padding: var(--hero-pad) var(--hero-pad) 0; }
.title-mask { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: multiply; pointer-events: none; }
/* A second pass turns that black into the projects' ground, so the hero is
   one surface with its page: screen leaves the letters' picture as it is. */
.title-ground { mix-blend-mode: screen; }
.title-ground rect { fill: var(--ground); }
.has-hero .project-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
/* Pictures on their own, or two to a row, run edge to edge, as on
   jonasjohansson.se; text, and pictures beside text, keep the margins. */
.project-hero { position: relative; margin: 0; }
.row-full, .row-group { padding-inline: 0; }
/* 80% of the screen, so the page below shows; the SMASH mark (an offering's
   page) until main.js draws it to size. */
.project-hero img, .project-hero video { height: 80svh; object-fit: cover; }
[data-mark] { -webkit-mask: url("/brand/smash-mask.svg") center / 100% 100% no-repeat; mask: url("/brand/smash-mask.svg") center / 100% 100% no-repeat; }

/* After the hero, the project introduced in large words; each further text a
   section of its own, over the pictures that follow it. The texts stand in the
   middle of the page, narrow, set flush left. */
.project-lead { margin-top: var(--row-gap); }
.lead { grid-column: 3 / span 8; font: 400 clamp(24px, 3.12vw, 46px) / 1.15 var(--serif); }
/* A small line in capitals over a text, as on gentilhomme.com. */
.label { margin: 0 0 clamp(14px, 1.7vw, 26px); font: 400 clamp(11px, 1.04vw, 15px) / 1 var(--font); text-transform: uppercase; }
.lead p + p { margin-top: 0.8em; }

.row { margin-top: var(--row-gap); align-items: end; }
.row-media { align-items: start; }
/* Pictures side by side share the row in proportion to their shapes, so
   they stand the same height, uncropped (as on jonasjohansson.se). */
.row-group { display: flex; gap: var(--gutter); align-items: flex-start; }
.row-group > .cell { flex: var(--ar) 1 0; min-width: 0; }
/* Pictures follow pictures closely; text keeps its air. */
:is(.project-head, .row-full, .row-group) + :is(.row-full, .row-group) { margin-top: var(--gutter); }
.cell-text .prose { max-width: 42ch; }
.prose p + p { margin-top: 1em; }
.prose a, .credits a, .lead a { text-decoration: underline var(--accent) 2px; text-underline-offset: 0.2em; }
.row-section .prose, .row-split .prose { max-width: none; font: 400 clamp(20px, 2.22vw, 32px) / 1.18 var(--serif); }
/* A text beside a picture of its own (compose.js), level with its top. */
.row-split { align-items: start; }

.credits {
  list-style: none;
  margin: 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
  columns: 3 16em;
  column-gap: var(--gutter);
  font-size: var(--t-small);
  line-height: 1.7;
  color: var(--muted);
}

.next {
  margin-top: var(--row-gap);
  padding-block: 32px 8px;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.next-label { grid-column: 1 / span 3; font-size: var(--t-small); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.next-title { grid-column: 4 / span 9; font-size: var(--t-title); line-height: 1; letter-spacing: -0.025em; transition: opacity 0.3s; }

/* ---- small screens: the grid keeps its 12 columns, cells take all of them -- */

@media (max-width: 720px) {
  :root { --header: 56px; }
  .logo svg { height: 26px; }
  .logo { grid-column: 1 / span 5; }
  .nav { grid-column: 6 / span 5; gap: 1.2em; }
  .contact { grid-column: 11 / span 2; }
  [style*="--span"], .cell, .tile { grid-column: 1 / -1; }
  .row-media .cell + .cell { margin-top: var(--gutter); }
  .row-split .cell + .cell { margin-top: 28px; }
  /* Two stack; three or four stay side by side. */
  .row-group:not(.row-keeps) { flex-direction: column; }
  .row-group:not(.row-keeps) > .cell { flex: none; width: 100%; }
  .tile-media { aspect-ratio: 4 / 3; }
  .f-copy { grid-column: 1 / span 6; }
  .f-mail, .site-footer .f-mail { grid-column: 7 / span 6; justify-self: end; }
  .f-top { display: none; }
  .page-title, .project-title, .lead, .about-head, .about-text { grid-column: 1 / -1; }
  .cta-title { grid-column: 1 / -1; }
  .cta-mail { font-size: 7.4vw; }
  .row.pillars { flex-direction: column; }
  .category-title, .category-nav, .category-projects .tile { grid-column: 1 / -1; }
  /* A project's hero keeps its shape on a phone. */
  .project-page .project-hero img, .project-page .project-hero video { height: auto; max-height: 80svh; }
  .pillar { flex: none; height: auto; aspect-ratio: 4 / 5; }
  .page-meta { grid-column: 1 / -1; justify-self: start; margin-top: 12px; }
  .next-label { grid-column: 1 / -1; }
  .next-title { grid-column: 1 / -1; margin-top: 12px; }
}

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

/* ---- the project list, for keyboards and screen readers (v3) ------------ */

/* For keyboards and screen readers, and if WebGL is missing. */
.projector-list { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.projector-list:focus-within, .no-webgl .projector-list {
  position: fixed; inset: auto var(--margin) 72px; width: auto; height: auto; clip-path: none;
  z-index: 20; display: flex; flex-wrap: wrap; gap: 0.4em 1.4em; font-size: var(--t-small);
  letter-spacing: 0.06em; text-transform: uppercase;
}
