@font-face {
  font-family: "Batica Sans";
  src: url("../fonts/BaticaSans-Bold.otf") format("opentype"); /* shortcut: OTF en local, convertir en woff2 une fois la licence web confirmée */
  font-weight: 700;
  font-display: swap;
}
/* DM Sans (Fontsource 5.2.8, latin), SIL OFL 1.1 (DMSans-OFL.txt). One variable file for every weight. */
@font-face { font-family: "DM Sans"; src: url("../fonts/DMSans-Variable.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }

:root {
  --blue: #0D0D12; /* historic name: noir encre since the 26/11 brand */
  --brand-grad: linear-gradient(135deg, #26262F, #050507);
  --blue-light: #DEDED7;
  --ink: #0A0A0F;
  --white: #FFFFFF;
  --grey: #6B6B78;
  --paper: #F4F4F8;
  --grey-dark: #9D9DAB;
  --line: rgba(10, 10, 15, .12);
  --line-dark: rgba(255, 255, 255, .16);

  --display: "Batica Sans", "Arial Black", system-ui, sans-serif;
  --text: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Bell-shaped speed curve: slow start, fast middle, soft landing. */
  --ease-io: cubic-bezier(.77, 0, .18, 1);
  --ease-sine: cubic-bezier(.45, 0, .55, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-smooth: cubic-bezier(.22, 1, .36, 1); /* micro-interactions, as on transitions.dev and bencho.dev */
  --slide: 1300ms;

  --r-s: 8px;
  --r-l: 20px;
  --gutter: max(clamp(16px, 3.2vw, 48px), env(safe-area-inset-left, 0px));
  --header-h: 72px;

  /* Cursors: W11 Cursor Concept (Jepri Creations), recoloured to noir encre. */
  --cur-default: url("../cursors/default.png") 2 2, default;
  --cur-pointer: url("../cursors/pointer.png") 6 1, pointer;
  --cur-text: url("../cursors/text.png") 16 16, text;
  --cur-grab: url("../cursors/grab.png") 13 13, grab;

  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 208.34 205.87'%3E%3Cpath d='M208.34,82.71v40.45c-45.68,0-82.71,37.03-82.71,82.71h-42.92c0-45.68-37.03-82.71-82.71-82.71v-40.45c45.68,0,82.71-37.03,82.71-82.71h42.92c0,45.68,37.03,82.71,82.71,82.71Z'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 16px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  cursor: var(--cur-default);
}
svg { display: block; }
a { color: inherit; text-decoration: none; }
a, button, [data-go], label { cursor: var(--cur-pointer); }
input, textarea, [contenteditable] { cursor: var(--cur-text); }
input:is([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=submit], [type=button]), select, summary { cursor: var(--cur-pointer); } /* a switch is an input too, never the text cursor */
:disabled { cursor: url("../cursors/not-allowed.png") 16 16, not-allowed; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 4px; }

.skip { position: fixed; left: var(--gutter); top: -60px; z-index: 100; background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: var(--r-s); font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- Type ---------- */
.label { font: 700 11px/1.3 var(--text); letter-spacing: .14em; text-transform: uppercase; }
.display, .cta-title {
  font: 700 clamp(40px, min(15vw, 19vh), 190px)/.9 var(--display);
  letter-spacing: -.035em; text-transform: uppercase;
}
.h2 { font: 700 clamp(30px, min(4.8vw, 7.5vh), 72px)/1 var(--display); letter-spacing: -.025em; text-wrap: balance; }
.lead { font-weight: 700; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; }
.body { color: var(--grey); }
.pill { display: inline; background: var(--blue); color: var(--white); border-radius: var(--r-s); padding: 0 .16em .04em; line-height: 1.25; -webkit-box-decoration-break: clone; box-decoration-break: clone; } /* a wrapped pill keeps its padding and corners on every line */
.line { display: block; overflow: hidden; padding-bottom: .05em; }
.line > span { display: inline-block; }

/* Star glyph reused everywhere */
.link::after, .label.star::before {
  content: ""; display: inline-block; flex: none; background: currentColor;
  -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat;
}
.label.star { display: inline-flex; align-items: center; gap: 8px; }
.label.star::before { width: 10px; height: 10px; color: var(--blue); }
[data-theme="dark"] .label.star::before { color: var(--blue-light); }
[data-theme="blue"] .label.star::before { color: var(--white); }
.star-deco { height: auto; aspect-ratio: 208 / 206; }

.link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.link::after { width: 11px; height: 11px; color: var(--blue); transition: transform .6s var(--ease-io); }
[data-theme="dark"] .link::after, [data-theme="blue"] .link::after { color: inherit; }
.link:hover::after { transform: rotate(90deg); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 28px;
  background: var(--white); color: var(--blue); border-radius: var(--r-s);
  font: 700 17px/1 var(--display);
}
/* Button hover, same spirit as the service rows: a fill sweeps in from the right and the label flips colour.
   --sweep is the fill, --sweep-ink the label on top of it. */
:is(.btn, .header-cta, .menu-btn, .gallery-filters button, .link, .menu-links a) { position: relative; isolation: isolate; }
:where(.btn, .header-cta, .menu-btn, .gallery-filters button, .link, .menu-links a) { --sweep: var(--blue); --sweep-ink: var(--white); } /* :where = zero specificity, so the per-element colours below win */
:is(.btn, .header-cta, .menu-btn, .gallery-filters button, .link, .menu-links a)::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: var(--r-s); background: var(--sweep);
  clip-path: inset(0 0 0 100%); transition: clip-path .5s var(--ease-io); /* a clip, not scaleX: scaling squashed the rounded corners past the button's edge */
}
:is(.btn, .header-cta, .menu-btn, .gallery-filters button, .link, .menu-links a):hover::before { clip-path: inset(0); }
/* Filled controls clip their own sweep, and the sweep overhangs by 1px: the control's own colour no longer
   shows as a hairline ring along the antialiased rounded edge. */
:is(.btn, .header-cta, .menu-btn, .gallery-filters button) { overflow: hidden; border: 0; } /* border: 0 drops the browser's 2px outset button border */
:is(.btn, .header-cta, .menu-btn, .gallery-filters button)::before { inset: -1px; }
:is(.btn, .header-cta, .menu-btn, .gallery-filters button, .link, .menu-links a):hover { color: var(--sweep-ink); }
:is(.header-cta, .menu-btn, .link, .btn, .gallery-filters button) { transition: color .45s var(--ease-io); }
/* Filled controls: the sweep is part of their own background (a solid layer that grows from the right), not a layer
   on top. Two stacked layers each antialias the rounded corners, and the colour underneath leaked as a thin ring.
   !important: element rules set the `background` shorthand, which would reset these. */
:is(.btn, .header-cta, .menu-btn, .gallery-filters button)::before { content: none; }
:is(.btn, .header-cta, .menu-btn, .gallery-filters button) {
  background-image: linear-gradient(var(--sweep), var(--sweep)) !important; background-repeat: no-repeat !important;
  background-position: right -1px center !important; background-size: 0% calc(100% + 2px) !important; /* 1px over each edge: at fractional zooms (125 %) a 100% fill left a 1px line of the old colour */
  transition: color .45s var(--ease-io), background-color 0s, background-size .5s var(--ease-io) !important; /* the colour under the fill snaps back, hidden by the fill as it retracts */
}
:is(.btn, .header-cta, .menu-btn, .gallery-filters button):hover { background-size: calc(100% + 2px) calc(100% + 2px) !important; background-color: var(--sweep) !important; transition: color .45s var(--ease-io), background-size .5s var(--ease-io), background-color 0s linear .5s !important; }
@media (prefers-reduced-motion: reduce) { :is(.btn, .header-cta, .menu-btn, .gallery-filters button) { transition: none !important; } }
.btn { --sweep: var(--ink); }
.header-nav :is(.header-cta, .menu-btn) { padding: 10px 14px; margin: -10px -14px; border-radius: var(--r-s); } /* .header-nav: beats the padding reset on .menu-btn */
.link { padding: .35em .55em; margin: -.35em -.55em; }
.link:hover::after { color: currentColor; }
:is(.header[data-theme="dark"], .header[data-theme="blue"]) :is(.header-cta, .menu-btn),
:is([data-theme="dark"], [data-theme="blue"]) :is(.link, .menu-links a) { --sweep: var(--white); --sweep-ink: var(--blue); }
.gallery-filters button { --sweep: var(--white); --sweep-ink: var(--ink); }
@media (prefers-reduced-motion: reduce) { :is(.btn, .header-cta, .menu-btn, .gallery-filters button, .link, .menu-links a, .service-list li, .join-perks li)::before { transition: none; } }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--ink);
  transition: color .6s var(--ease-io), opacity .9s var(--ease-io);
}
.header[data-theme="dark"], .header[data-theme="blue"] { color: var(--white); }
.header[data-at="work"][data-theme="dark"] { background: linear-gradient(var(--ink) 55%, transparent); } /* the drifting wall would cover the language switch */
/* Same proportions and optical centring as the intro logo, scaled down. All blue on light pages, all white otherwise. */
.logo { display: inline-flex; align-items: center; gap: .28em; font-size: 26px; color: var(--blue); }
.header[data-theme="dark"] .logo, .header[data-theme="blue"] .logo { color: var(--white); }
.logo-mark { width: 1.25em; height: auto; aspect-ratio: 494 / 382; }
.logo-word { position: relative; top: .055em; font: 700 1em/1 var(--display); letter-spacing: -.04em; }
.header-nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
.header-cta { font: 700 11px/1 var(--text); letter-spacing: .14em; text-transform: uppercase; }
.header-login { opacity: .7; transition: color .45s var(--ease-io), opacity .45s var(--ease-io); }
.header-login:hover { opacity: 1; }
.menu-btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 0; border: 0; background: none; color: inherit; cursor: var(--cur-pointer);
  font: 700 11px/1 var(--text); letter-spacing: .14em; text-transform: uppercase;
}
.menu-btn i { position: relative; width: 20px; height: 8px; }
.menu-btn i::before, .menu-btn i::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .6s var(--ease-io); }
.menu-btn i::before { top: 0; }
.menu-btn i::after { bottom: 0; }
.menu-btn[aria-expanded="true"] i::before { transform: translateY(3.25px) rotate(45deg); }
.menu-btn[aria-expanded="true"] i::after { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- Menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 40;
  background: var(--brand-grad); color: var(--white);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; /* short phones: the menu is taller than the screen */
  padding: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 4vh) var(--gutter) max(28px, env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; justify-content: space-between;
  transform: translateY(-100%);
  transition: transform .9s var(--ease-io) .22s; /* closing: the content leaves first, then the panel lifts */
}
.menu.is-open { transform: none; transition: transform 1s var(--ease-io); }
.menu.is-ink { background: var(--ink); }
/* Desktop: numbered links on the left (same ruled list as the services), project CTA on the right. */
.menu { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); grid-template-rows: 1fr auto; column-gap: clamp(32px, 6vw, 120px); row-gap: 24px; }
.menu-links { align-self: center; display: grid; border-bottom: 1px solid rgba(255, 255, 255, .2); }
.menu-links a {
  display: grid; grid-template-columns: 3.2em minmax(0, auto) 1fr; align-items: baseline; column-gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, .2); padding: clamp(8px, 1.6vh, 18px) 14px; margin: 0 -14px;
}
.menu-num { font: 700 12px/1 var(--text); letter-spacing: .14em; opacity: .8; }
.menu-name { font: 700 clamp(40px, min(7vw, 10vh), 104px)/1 var(--display); letter-spacing: -.03em; text-transform: uppercase; }
.menu-desc { justify-self: end; font: 700 11px/1.3 var(--text); letter-spacing: .14em; text-transform: uppercase; opacity: .8; } /* .8: the lowest that still reads at 4.5:1 on the blue */
/* Hovering one link dims the others; the page you are on carries a star. */
.menu-links a[aria-current="page"] .menu-num { opacity: 1; }
.menu-links a[aria-current="page"] .menu-num::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; background: currentColor; -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; }
.menu-side { align-self: center; display: grid; justify-items: start; gap: 18px; }
.menu-pitch { font-size: 17px; line-height: 1.5; opacity: .85; }
.menu-side .btn { justify-self: stretch; }
.menu-account { display: grid; gap: 10px; width: 100%; margin-top: 8px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .2); }
.menu-account .label { opacity: .7; }
/* Secondary button on blue: outlined, the same white sweep as every other control on blue. */
.btn-line { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55); --sweep: var(--white); --sweep-ink: var(--blue); }
.menu-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 16px; font: 700 11px/1.3 var(--text); letter-spacing: .14em; text-transform: uppercase; }
/* Open: content rises in its mask once the panel is mostly down (same wipe as the page blocks, no fade).
   Close: it carries on upward and out of the same mask, top row first, while the panel waits; then the panel lifts. */
.menu :is(.menu-links a, .menu-side, .menu-foot) { clip-path: inset(0 -40px 100% -40px); transform: translateY(40px); }
.menu.is-open :is(.menu-links a, .menu-side, .menu-foot) { clip-path: inset(-40px); transform: none; transition: clip-path .9s var(--ease-io) calc(380ms + var(--k) * 60ms), transform .9s var(--ease-io) calc(380ms + var(--k) * 60ms), color .45s var(--ease-io); }
.menu.is-closing :is(.menu-links a, .menu-side, .menu-foot) { clip-path: inset(-40px -40px 100% -40px); transform: translateY(-32px); transition: clip-path .5s var(--ease-io) calc(var(--k) * 30ms), transform .5s var(--ease-io) calc(var(--k) * 30ms); }
@media (max-width: 1024px) {
  .menu { grid-template-columns: 1fr; grid-template-rows: 1fr auto auto; }
  .menu-side { align-self: end; }
}

/* ---------- Panels (stacked flow without JS, full-screen deck with JS) ---------- */
.panel {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 2vh) var(--gutter) calc(64px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  background: var(--white);
}
.panel[data-theme="dark"] { background: var(--ink); color: var(--white); }
.panel[data-theme="blue"] { background: var(--brand-grad); color: var(--white); }

.deck-on, .deck-on body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.deck-on .deck { position: fixed; inset: 0; overflow: hidden; }
.deck-on .panel { position: absolute; inset: 0; min-height: 0; visibility: hidden; }
/* A panel taller than a short screen scrolls inside itself; safe center keeps its top out from under the header. */
.deck-on .panel:not(.gallery-panel) { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; justify-content: safe center; }
.deck-on .panel.is-current { visibility: visible; z-index: 2; }
.deck-on .panel.is-leaving { visibility: visible; z-index: 1; }
/* Darkening veil on the panel being covered */
.deck-on .panel::after { content: ""; position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }

/* Content entrance: plays every time a panel becomes current */
/* Blocks rise a little while a mask opens from their bottom edge, like the title lines: no fade. The open mask
   reaches past the box so focus rings and hover bands are never cut. */
.deck-on .a { clip-path: inset(0 -40px 100% -40px); transform: translateY(24px); }
.deck-on .line > span { transform: translateY(112%); }
.deck-on .panel.is-in .a {
  clip-path: inset(-40px); transform: none;
  transition: clip-path 1s var(--ease-io), transform 1s var(--ease-io), color .45s var(--ease-io);
  transition-delay: calc(var(--d, 0ms) + var(--i, 0) * 70ms), calc(var(--d, 0ms) + var(--i, 0) * 70ms), 0s;
}
.deck-on .panel.is-in .line > span {
  transform: none;
  transition: transform 1.1s var(--ease-io);
  transition-delay: var(--d, 0ms);
}
.deck-on .panel.is-in .line:nth-child(2) > span { transition-delay: calc(var(--d, 0ms) + 90ms); }
.deck-on .panel.is-in .line:nth-child(3) > span { transition-delay: calc(var(--d, 0ms) + 180ms); }

/* ---------- 01 Intro ---------- */
.intro { align-items: center; justify-content: center; padding-block: 0; transition: background-color .12s linear; }
.intro-logo { display: flex; align-items: center; gap: .28em; font-size: clamp(54px, min(14vw, 20vh), 220px); }
.intro-mark { position: relative; display: block; flex: none; width: 1.25em; aspect-ratio: 494 / 382; color: var(--white); }
.mark-piece { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* Batica ink sits high in its line box (cap top .085em, baseline .805em): nudge it so the ink, not the box, is centred on the mark. */
/* Clip only below the line (for the letter reveal): overflow:hidden also cut the last glyph, whose ink passes its advance once letter-spacing is negative. */
.intro-word { display: block; clip-path: inset(-.5em -.5em 0 -.5em); font: 700 1em/1 var(--display); letter-spacing: -.04em; position: relative; top: .055em; }
.intro-word .ch { display: inline-block; transform-origin: 0 100%; }
.intro-star-a, .intro-star-b { position: absolute; color: var(--white); }
.intro-star-a { width: clamp(28px, 4vw, 64px); top: 22vh; right: 14vw; }
.intro-star-b { width: clamp(16px, 2vw, 32px); bottom: 24vh; left: 16vw; }
.intro-star-a { animation: tick 3.2s infinite; }
.intro-star-b { animation: tick 3.2s 1.6s infinite; } /* half a cycle apart, so they never turn together */

/* Opening (first load): a star ticks round while the site loads, then melts into the mark. */
.opening .intro-logo, .opening .intro-star-a, .opening .intro-star-b { opacity: 0; }
.loader-star { display: none; position: absolute; left: 50%; top: 50%; font-size: clamp(54px, min(14vw, 20vh), 220px); width: .5275em; height: auto; aspect-ratio: 208 / 206; margin: -.2638em 0 0 -.2638em; color: var(--white); } /* .5275em = .422 of the 1.25em mark: the exact size of the hollow it fills */
.opening .loader-star { display: block; animation: tick 1.1s infinite; }
/* Quarter turn on the bell curve, then a hold: 0deg and 90deg look the same, so the loop is seamless. */
@keyframes tick {
  0% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.77, 0, .18, 1); }
  62%, 100% { transform: rotate(90deg); }
}
.opening .mark-piece, .opening .intro-word .ch, .opening .intro-star-a, .opening .intro-star-b { transition: none !important; }
.chrome-hidden .header { opacity: 0; }

.deck-on .mark-top { transform: translate(-28%, -18%); opacity: 0; }
.deck-on .mark-bottom { transform: translate(28%, 18%); opacity: 0; }
.deck-on .intro-word .ch { transform: translateY(112%); }
.deck-on .intro-star-a, .deck-on .intro-star-b { clip-path: inset(100% 0 0 0); animation: none; }
.deck-on .intro.is-in .mark-top, .deck-on .intro.is-in .mark-bottom {
  transform: none; opacity: 1;
  transition: transform 1.5s var(--ease-io), opacity .8s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.deck-on .intro.is-in .intro-word .ch { transform: none; transition: transform 1s var(--ease-io) calc(var(--d, 0ms) + 650ms + var(--c) * 60ms); }
/* Each star wipes up into view, then starts ticking only once it is whole, so no turn is ever caught halfway. */
.deck-on .intro.is-in .intro-star-a, .deck-on .intro.is-in .intro-star-b { clip-path: inset(0); transition: clip-path 1s var(--ease-io) calc(var(--d, 0ms) + 900ms); }
.deck-on .intro.is-in .intro-star-a { animation: tick 3.2s calc(var(--d, 0ms) + 1900ms) infinite; }
.deck-on .intro.is-in .intro-star-b { transition-delay: calc(var(--d, 0ms) + 1050ms); animation: tick 3.2s calc(var(--d, 0ms) + 3650ms) infinite; }

/* ---------- 02 Promise ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero-main { display: flex; flex-direction: column; gap: clamp(18px, 3.4vh, 36px); min-width: 0; }
/* Giant star cropped by the right edge, ticking in quarter turns like the loader. Desktop only: the headline needs the width below that. */
.hero-icon { display: none; }
@media (width > 1024px) {
  .hero .hero-title { font-size: clamp(32px, min(6vw, 11vh), 120px); }
  .hero-main { position: relative; z-index: 1; max-width: calc(100% - min(24vw, 44vh) - 3 * var(--gutter)); } /* proof rule stops 4 gutters + icon from the edge; the icon sits 2 gutters in, centred in that space */
  /* 3D icon of the craft in the headline. The renders sit on opaque white: multiply drops that white into the page. */
  .hero-icon { display: block; position: absolute; top: 50%; right: calc(2 * var(--gutter)); width: min(24vw, 44vh); aspect-ratio: 1; translate: 0 -50%; }
  /* Same move as the headline word: the icon slides through the tile on the 1s bell curve, no fade. */
  .craft-icon { position: absolute; inset: 16%; width: 68%; height: 68%; transform: translateY(130%); transition: transform 1s var(--ease-io); }
  .craft-icon.is-on { transform: none; }
  .craft-icon.is-out { transform: translateY(-130%); }
}
.hero > .label { color: var(--grey); }
.hero-title { font: 700 clamp(32px, min(7.4vw, 12vh), 128px)/.98 var(--display); letter-spacing: -.035em; }
/* Rotating deliverable: every word sits in the same grid cell, so the line never reflows. */
/* The word slides through a mask, like every other title reveal: no fade. Clip below leaves room for descenders.
   Same pill as "The right team.", in the service colour; ink text, since white cannot be read on the light colours. */
.rotator { display: inline-grid; vertical-align: baseline; clip-path: inset(-.2em -1em -.34em -1em); } /* a little room above for the pill's top corners */
.hero-title .line:has(.rotator) { padding-top: .2em; } /* the pill's line sits a bit lower: its top never touches the line above */
.rotator .word { grid-area: 1 / 1; justify-self: start; color: var(--ink); background: var(--svc-grad, var(--brand-grad)); border-radius: var(--r-s); padding: .12em .28em .08em; white-space: nowrap; transform: translateY(130%); transition: transform 1s var(--ease-io); }
.rotator .word.is-on { transform: none; }
.rotator .word.is-out { transform: translateY(-130%); }
/* Parked back below without a transition, so a leaving word never sweeps back across the mask. */
.is-reset { transition: none !important; }
/* DA icon style: white 3D glyph on a rounded tile. The tile is CSS, so it stays sharp at any size. */
.icon-tile { aspect-ratio: 1; border-radius: 28%; background: var(--brand-grad); overflow: hidden; }
.icon-tile > img { position: absolute; inset: 16%; width: 68%; height: 68%; }
.float-icon { position: absolute; pointer-events: none; }
/* Tiles arrive with a wipe from the bottom and the glyph rises into place, both on the bell curve: no fade. */
.deck-on :is(.float-icon, .hero-icon) { clip-path: inset(100% 0 0 0 round 28%); }
.deck-on .panel.is-in :is(.float-icon, .hero-icon) { clip-path: inset(0 0 0 0 round 28%); transition: clip-path 1.2s var(--ease-io) calc(var(--d, 0ms) + 300ms); }
.deck-on .float-icon img { transform: translateY(60%); }
.deck-on .panel.is-in .float-icon img { transform: none; transition: transform 1.4s var(--ease-io) calc(var(--d, 0ms) + 400ms); }
@media (max-width: 1024px) {
  .join-icon { display: none; }
}
.crafts { display: flex; flex-wrap: wrap; gap: 8px; max-width: 900px; }
.crafts li {
  font: 700 13px/1 var(--text); padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-s);
  transition: background-color .6s var(--ease-io), color .6s var(--ease-io), border-color .6s var(--ease-io);
}
.crafts li.is-on { background: var(--svc, var(--blue)); border-color: var(--svc, var(--blue)); color: var(--ink); }
/* Hero proof: two ruled rows, label on the left and content on one line (games, then clients rolling by). */
.proof { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin-top: clamp(4px, 2vh, 24px); border-top: 1px solid var(--line); }
.proof-item { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; column-gap: 24px; min-height: 58px; border-bottom: 1px solid var(--line); min-width: 0; }
.proof-item > .label { color: var(--grey); }
.proof-item strong { display: inline-flex; align-items: center; font: 700 22px/1 var(--display); letter-spacing: -.02em; }
.proof-rule { display: none; }
.trust[hidden] { display: none; } /* .proof-item's display:grid would otherwise override the attribute */
.trust-names { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.trust-track { display: flex; width: max-content; font: 700 17px/1 var(--display); letter-spacing: -.01em; color: var(--ink); }
.trust-track span { padding-right: 34px; white-space: nowrap; }
.trust-names.is-moving .trust-track { will-change: transform; }
@media (prefers-reduced-motion: reduce) { .trust-track { flex-wrap: wrap; width: auto; row-gap: 8px; } .trust-names { -webkit-mask: none; mask: none; } }
.proof-item .games { font-size: 34px; gap: 26px; } /* logo heights are in em: ~20px tall, the same visual weight as the names */
.games .game { display: block; flex: none; font-size: inherit; color: inherit; background: currentColor; -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.game-mc { --logo: url("../img/games/minecraft.svg"); height: .6em; aspect-ratio: 1607.5 / 192.3; }
.game-rbx { --logo: url("../img/games/roblox.svg"); height: .6em; aspect-ratio: 800 / 147.6; }

/* The intro already shows the big logo: hide the small one until the visitor moves on. */
.logo { transition: color .6s var(--ease-io), opacity .8s var(--ease-io), transform .8s var(--ease-io); }
.header[data-at="intro"] .logo { opacity: 0; transform: translateY(-8px); pointer-events: none; }

/* ---------- Studio: pitch and team on the left, what we make on the right ---------- */
.studio.panel { background: var(--paper); }
.studio-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: clamp(20px, 4vh, 40px); }
.studio-intro { grid-column: 1 / span 6; grid-row: 1; display: flex; flex-direction: column; align-items: flex-start; gap: clamp(14px, 2.4vh, 22px); }
.studio-team { grid-column: 1 / span 6; grid-row: 2; align-self: end; display: grid; gap: 12px; }
.studio-list { grid-column: 8 / -1; grid-row: 1 / span 2; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
:is(.studio-intro, .studio-team, .studio-list) > .label { color: var(--grey); }
.studio-intro .lead { max-width: 44ch; font-weight: 400; color: var(--grey); }

/* Team: one card per person: photo, name, role, and what they do. Card and service rows light each other up (main.js). */
.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.member {
  display: grid; align-content: start; gap: 12px; height: 100%; padding: 16px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l);
  transition: background-color .5s var(--ease-io), border-color .5s var(--ease-io);
}
.member-text { display: grid; gap: 3px; }
.member-photo { width: 44px; height: 44px; flex: none; border-radius: 50%; object-fit: cover; background: var(--blue); }
.member-name { font: 700 17px/1.15 var(--display); }
.member-role { font-size: 12px; color: var(--grey); }
.member-crafts { margin-top: 4px; font: 700 12px/1.35 var(--text); color: var(--blue); }
.member :is(.member-name, .member-role, .member-crafts) { transition: color .45s var(--ease-io); }
.member[data-crafts]:hover, .member.is-lit { background: var(--blue); border-color: var(--blue); }
.member[data-crafts]:hover :is(.member-name, .member-role, .member-crafts), .member.is-lit :is(.member-name, .member-role, .member-crafts) { color: var(--white); }
.member[data-crafts]:hover .member-photo, .member.is-lit .member-photo { box-shadow: 0 0 0 2px var(--white); } /* Eneko's photo is blue: keep it off the blue card */
.member-open { background: transparent; border-style: dashed; border-color: rgba(10, 10, 15, .25); }
.member-open .member-photo { display: grid; place-items: center; background: transparent; border: 1.5px dashed rgba(10, 10, 15, .25); color: var(--blue); }
.member-open:is(:hover, .is-lit) .member-photo { color: var(--white); border-color: rgba(255, 255, 255, .6); box-shadow: none; }
.member-open .member-photo svg { width: 38%; aspect-ratio: 208 / 206; height: auto; }
span.member-photo { display: grid; place-items: center; color: var(--white); } /* no Discord picture: the star on blue */
span.member-photo svg { width: 38%; aspect-ratio: 208 / 206; height: auto; }

/* Services listing: hovering a row fills it with blue so its keywords stand out. */
.service-list { border-bottom: 1px solid var(--line); }
.service-list li {
  position: relative; isolation: isolate; display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  border-top: 1px solid var(--line); padding: clamp(8px, 1.4vh, 14px) 14px; margin: 0 -14px;
}
.service-list li::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: var(--r-s); background: var(--svc-grad, var(--brand-grad));
  clip-path: inset(0 0 0 100%); transition: clip-path .5s var(--ease-io); /* sweeps in from the right */
}
.service-list li:is(:hover, .is-lit)::before { clip-path: inset(0); }
.service-list h3 { font: 700 clamp(18px, min(2vw, 3.4vh), 30px)/1.05 var(--display); letter-spacing: -.02em; transition: color .45s var(--ease-io); }
/* Colour transitions live on the children: the row itself carries the page-entrance transition. */
.service-list li:is(:hover, .is-lit) h3 { color: var(--ink); }
.service-list span { font-size: 12px; color: var(--grey); text-align: right; transition: color .45s var(--ease-io); }
/* On the band the sub-services just grow (12 to 15 px), from their right edge. Scale, not font-size: nothing reflows. */
.service-list li > span { transform-origin: right center; transition: color .45s var(--ease-io), scale .45s var(--ease-smooth), font-weight .45s var(--ease-smooth); }
.service-list li:is(:hover, .is-lit) > span { scale: 1.25; font-weight: 700; } /* DM Sans is variable: the weight glides too */
.service-list li:is(:hover, .is-lit) span { color: var(--ink); }

/* Tracking card: the order "plays" once when the page arrives, then stays still. */

/* ---------- Work: infinite drag gallery ---------- */
/* Flat tiles: the picture fills the card and its caption sits on it, bottom left. Covers get a flat ink veil (no gradient)
   so white text stays readable. Hover: the caption lifts to show "View project", the star turns. */
.gallery-panel { padding: 0; display: block; background: var(--ink); }
.gallery { position: absolute; inset: 0; overflow: hidden; cursor: var(--cur-grab); touch-action: none; -webkit-user-select: none; user-select: none; } /* no text selection: it made the browser drag a ghost copy of every tile */
.gallery.is-dragging { cursor: var(--cur-grab); }
.gallery-track { position: absolute; inset: 0; }
.tile { will-change: transform; backface-visibility: hidden; } /* each tile on its own layer: the slow drift glides at sub-pixel steps instead of snapping (the wall trembled) */
.tile { position: absolute; left: 0; top: 0; width: var(--tw); height: var(--th); border-radius: var(--r-l); overflow: hidden; color: var(--white); transition: opacity .6s var(--ease-io); outline: none; }
.tile.is-off { opacity: .12; pointer-events: none; }
.tile:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.tile-art { position: absolute; inset: 0; display: grid; place-items: center; background: var(--brand-grad); }
.tile:nth-child(3n+2) .tile-art { background: linear-gradient(135deg, #1C1C23, #050507); }
.tile:nth-child(3n) .tile-art { background: linear-gradient(135deg, #34343F, #121218); }
.tile-art svg { position: relative; width: 18%; aspect-ratio: 208 / 206; height: auto; color: var(--white); transition: transform .9s var(--ease-io); }
.tile-art .cover { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; pointer-events: none; }
.tile.has-cover .tile-art { background: var(--ink); } /* the blue under a cover bled as a hairline along the rounded, sub-pixel edges */
.tile.has-cover .tile-art::after { content: ""; position: absolute; inset: 0; background: rgba(10, 10, 15, .28); }
/* Hover: the caption grows a third line from below ("View project"), so game and title lift together on the bell curve
   while the new line rises through its own mask. The empty row animates from 0fr, nothing is faded. */
.tile-info { position: absolute; left: 20px; right: 20px; bottom: 18px; display: grid; grid-template-rows: auto auto 0fr; min-width: 0; transition: grid-template-rows .7s var(--ease-io); }
.tile-title { min-width: 0; margin-top: 8px; font: 700 clamp(17px, 1.4vw, 21px)/1.15 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-game { order: -1; font: 700 11px/1 var(--text); letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.tile-cta { min-height: 0; overflow: hidden; }
.tile-cta > span { display: flex; align-items: center; gap: 8px; padding-top: 10px; font: 700 14px/1.2 var(--text); transform: translateY(100%); transition: transform .7s var(--ease-io); }
.tile-cta svg { width: 16px; height: 16px; transform: translateX(-6px); transition: transform .7s var(--ease-io) .1s; }
.tile-cta path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
  .tile:hover .tile-info { grid-template-rows: auto auto 1fr; }
  .tile:hover .tile-cta > span, .tile:hover .tile-cta svg { transform: none; }
  .tile:hover .tile-art svg { transform: rotate(90deg); }
  .tile:hover .tile-art .cover { scale: 1.06; }
}
.tile-art .cover { transition: scale .8s var(--ease-smooth); }
.tile:focus-visible .tile-info { grid-template-rows: auto auto 1fr; }
.tile:focus-visible .tile-cta > span, .tile:focus-visible .tile-cta svg { transform: none; }
@media (prefers-reduced-motion: reduce) { .tile-info, .tile-cta > span, .tile-cta svg, .tile-art svg { transition: none; } }

/* Project sheet: slides up over the gallery (bell curve, no fade). Header stays on top. */
.project { position: absolute; inset: 0; z-index: 5; background: var(--white); color: var(--ink); transform: translateY(100%); transition: transform .8s var(--ease-io); }
.project.is-open { transform: none; }
.project-in { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 3vh) var(--gutter) calc(48px + env(safe-area-inset-bottom, 0px)); }
.project-title { font: 700 clamp(36px, min(6vw, 9vh), 96px)/.95 var(--display); letter-spacing: -.03em; text-transform: uppercase; }
/* Services as a plain line, not badges. */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px 16px; }
.visual { margin: 0; display: grid; gap: 10px; }
.visual-art { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: var(--r-l); display: grid; place-items: center; background: var(--brand-grad); }
.visual:nth-child(3n+2) .visual-art { background: linear-gradient(135deg, #1C1C23, #050507); }
.visual:nth-child(3n) .visual-art { background: linear-gradient(135deg, #34343F, #121218); }
.visual .visual-art.has-img { background: var(--ink); } /* no blue hairline around a picture */
.visual-art svg { width: 14%; aspect-ratio: 208 / 206; height: auto; color: var(--white); }
.visual-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.visual-art span { position: absolute; bottom: 10px; left: 12px; font-size: 12px; opacity: .7; }
.visual figcaption { font: 700 11px/1.3 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--grey); }
.project-empty { color: var(--grey); }
@media (prefers-reduced-motion: reduce) { .project { transition: none; } }
.gallery-ui { position: absolute; inset: 0; z-index: 1; pointer-events: none; padding: 0 var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; color: var(--white); }
/* Filters: one solid bar, so they read over any tile. */
.gallery-filters { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; pointer-events: auto; background: var(--ink); border: 1px solid var(--line-dark); border-radius: calc(var(--r-s) + 6px); }
.gallery-filters button {
  font: 700 14px/1 var(--text); color: rgba(255, 255, 255, .8); background: transparent; border: 0;
  border-radius: var(--r-s); padding: 11px 16px; min-height: 42px; cursor: var(--cur-pointer);
  transition: background-color .5s var(--ease-io), color .5s var(--ease-io);
}
.gallery-filters button.is-on { background: var(--white); color: var(--ink); }

/* ---------- Join: pitch, who we look for and the button on the left; the three reasons stacked on the right ---------- */
.join-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: clamp(32px, 6vw, 120px); align-items: center; }
.join-head { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(14px, 2.6vh, 26px); }
.join-head > .label { color: var(--grey); }
.join .display { font-size: clamp(40px, min(8.4vw, 14vh), 150px); }
.join-lead { max-width: 30ch; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.45; }
.join-roles { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.join-roles .label { color: var(--grey); }
.join-cta { display: flex; }
.join-side { display: grid; gap: clamp(16px, 3vh, 32px); }
/* Join: the icon tile heads the right column, above the three reasons; it enters like every other tile. */
.join .display .line { white-space: nowrap; }
.join-icon { position: relative; width: min(11vw, 17vh); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-big { min-height: clamp(60px, 8vh, 76px); padding: 0 clamp(28px, 2.6vw, 40px); gap: 14px; font-size: clamp(18px, 1.5vw, 22px); }
.btn-star { width: .8em; height: auto; aspect-ratio: 208 / 206; transition: transform .6s var(--ease-io); }
.btn:hover .btn-star { transform: rotate(90deg); }
/* Ruled rows; each cell keeps 14px of padding for the hover band, the negative margin puts its text on the column edge. */
.join-perks { display: grid; margin: 0 -14px; }
.join-perks li {
  position: relative; isolation: isolate; display: grid; grid-template-columns: 3em minmax(0, 1fr); align-items: center; gap: 12px; padding: clamp(14px, 2.4vh, 24px) 14px;
  background: linear-gradient(var(--line), var(--line)) 14px 0 / calc(100% - 28px) 1px no-repeat; /* the rule, drawn inside the padding */
}
.join-perks li:last-child { background: linear-gradient(var(--line), var(--line)) 14px 0 / calc(100% - 28px) 1px no-repeat, linear-gradient(var(--line), var(--line)) 14px 100% / calc(100% - 28px) 1px no-repeat; }
/* Same band as the service rows: blue sweeps in from the right, text turns white. */
.join-perks li::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: var(--r-s); background: var(--blue); clip-path: inset(0 0 0 100%); transition: clip-path .5s var(--ease-io); }
.join-perks li:hover::before { clip-path: inset(0); }
.join-perks .perk-num { transition: color .45s var(--ease-io); }
.join-perks li:hover .perk-num { color: var(--white); }
/* Title at rest; on hover it slides up out of a mask and the sentence rises in its place, on the bell curve. Both share one grid cell, so the row never jumps. */
.perk-swap { display: grid; overflow: hidden; padding: .06em 0; }
.perk-swap > * { grid-area: 1 / 1; transition: transform .8s var(--ease-io), color .45s var(--ease-io); }
.join-perks li:hover h3 { transform: translateY(calc(-100% - 2em)); color: var(--white); }
.join-perks li:hover p { transform: none; transition-delay: .08s; }
.perk-num { font: 700 12px/1.9 var(--text); letter-spacing: .14em; color: var(--blue); }
.join-perks h3 { font: 700 clamp(20px, 1.9vw, 30px)/1.1 var(--display); letter-spacing: -.02em; position: relative; top: .035em; } /* Batica ink sits high in its line box: centre the ink, not the box */
.join-perks p { font: 700 clamp(15px, 1.15vw, 18px)/1.3 var(--text); color: var(--white); transform: translateY(calc(100% + 2em)); position: relative; top: .28em; } /* the text face's ink sits high in its line box too */
.join-perks .perk-swap { min-height: 3em; align-content: center; } /* every row as tall as a two-line sentence, so the rows stay even */

/* ---------- 09 CTA + footer ---------- */
.cta { justify-content: space-between; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
/* Start: pitch on the left, the white 3D play icon in its own column on the right (no tile on the blue page). */
.cta-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: clamp(32px, 5vw, 96px); position: relative; }
.cta-text { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(20px, 3.5vh, 40px); }
@media (width > 1024px) { .cta .cta-title { font-size: clamp(40px, min(9.5vw, 15vh), 170px); } } /* leaves room for the icon column */
.cta-visual { width: min(24vw, 42vh); aspect-ratio: 1; }
.cta-visual img { display: block; width: 100%; height: auto; }
.deck-on .cta-visual img { transform: translateY(75svh); } /* starts below the screen edge: it rises in without any mask cutting it */
.deck-on .cta.is-in .cta-visual img { transform: none; transition: transform 1.4s var(--ease-io) calc(var(--d, 0ms) + 400ms); }
@media (max-width: 1024px) {
  .cta-main { grid-template-columns: 1fr; row-gap: clamp(16px, 3vh, 32px); align-content: center; }
  .cta-visual { order: -1; width: min(34vw, 22vh); }
}
.footer { position: relative; display: grid; gap: 10px; border-top: 1px solid rgba(255, 255, 255, .25); padding-top: 16px; font-size: 13px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.footer nav a { opacity: .85; transition: opacity .3s; }
.footer nav a:hover { opacity: 1; }
.disclaimer { font-size: 11px; opacity: .75; max-width: 80ch; }
.disclaimer a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Reduced motion: no slides, short fades ---------- */
@media (prefers-reduced-motion: reduce) {
  .deck-on .a, .deck-on .line > span, .deck-on .intro-word .ch, .deck-on .mark-top, .deck-on .mark-bottom,
  .deck-on .intro-star-a, .deck-on .intro-star-b { transform: none !important; animation: none !important; }
  .icon-tile img { animation: none !important; }
  .craft-icon, :is(.float-icon, .hero-icon, .cta-visual), :is(.float-icon, .cta-visual) img { transition: none !important; }
  .cta-visual img { animation: none !important; }
  .deck-on .panel.is-in .a, .deck-on .intro.is-in .mark-top, .deck-on .intro.is-in .mark-bottom { transition: opacity .3s linear !important; transition-delay: 0s !important; }
  .menu, .menu :is(.menu-links a, .menu-side, .menu-foot) { transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .studio-intro, .studio-team, .studio-list { grid-column: 1 / -1; grid-row: auto; }
  .join-grid { grid-template-columns: 1fr; row-gap: clamp(20px, 4vh, 40px); }
}
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .header-cta { display: none; }
  .logo { font-size: 22px; }
  .intro-logo { flex-direction: column; gap: .12em; font-size: min(21vw, 11vh); }
  .loader-star { font-size: min(21vw, 11vh); }
  .intro-word { top: .055em; margin-bottom: -.14em; } /* drop the empty band under the baseline so the stack centres on its ink */
  .intro-star-a { top: 16vh; right: 10vw; }
  .intro-star-b { bottom: 20vh; left: 10vw; }
  .member-role, .member-crafts, .service-list span { display: none; }
  .member { padding: 10px; gap: 8px; }
  .member-photo { width: 30px; height: 30px; }
  .member-name { font-size: 15px; }
  .team { gap: 8px; }
  .menu-side .btn { min-height: 48px; }
  .join-roles { font-size: 14px; }
  .studio-grid { row-gap: 18px; }
  .service-list li { padding: 7px 14px; }
  .service-list h3 { font-size: 18px; }
  .proof { grid-template-columns: minmax(0, 1fr); }
  .proof-item { row-gap: 10px; padding: 14px 0; }
  .proof-item .games { font-size: 28px; gap: 20px; }
  .trust-track { font-size: 15px; }
  .menu-desc, .join-perks p { display: none; }
  .menu-links a { grid-template-columns: 2.6em 1fr; }
  .menu-pitch { font-size: 15px; }
  .footer nav { gap: 4px 16px; }
}


/* Language switch (header): the current language is full ink, the other one quiet. */
.lang-switch { display: inline-flex; gap: 2px; }
.lang-switch button { padding: 8px 6px; border: 0; background: none; color: inherit; font: 700 11px/1 var(--text); letter-spacing: .14em; opacity: .7; transition: opacity .45s var(--ease-io); } /* the inactive language stays readable (4.5:1); the underline marks the active one */
.lang-switch button:hover, .lang-switch button[aria-pressed="true"] { opacity: 1; }
.lang-switch button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }

/* Language curtain: wipes in from the right, swaps the text, leaves to the left. Clip-path keeps the star undistorted. */
/* Language switch: letter copies in a fixed overlay, each in its own mask padded for accents and descenders. */
.lx-on :is([data-i18n], .tile-title, .menu-btn span), .lx-on :is([data-i18n], .tile-title, .menu-btn span) * { -webkit-text-fill-color: transparent !important; } /* text-fill, not color: color transitions would fade it instead of hiding it */
.lx-on .lx.lx, .lx-on .lx.lx * { -webkit-text-fill-color: currentColor !important; } /* the copies sit inside the hidden text: keep them visible */
.lx { position: absolute; display: block; white-space: pre; clip-path: inset(0 -.3em); letter-spacing: 0; pointer-events: none; text-transform: none; }
.lx > span { display: block; will-change: transform; font: inherit !important; color: inherit !important; text-align: left; } /* a copy is a span: section rules for spans (.service-list span) must not restyle it */
.lx-on .line { overflow: visible; } /* a title line shrinks to the new words: it must not crop the old ones on their way out (each copy has its own mask) */
@media (max-width: 640px) {
  .gallery-filters { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; } /* phone: one line that scrolls, so the bar never covers the wall */
  .gallery-filters::-webkit-scrollbar { display: none; }
  .gallery-filters li { flex: none; }
}

/* Service colours (given by Stills, 2026-11-19; orange and purple softened at their request), in the services order. Bright tones: text on them is ink, never white
   (ink reaches 4.7:1 or more on each). Close services share a colour. Blue stays the brand; a service's colour only
   shows where that service is named. */
:root { --svc-orange: #F27B36; --svc-sky: #5AB2FF; --svc-indigo: #5B5BF0; --svc-emerald: #10B981; --svc-candy: #FF6FD8;
  --svc-orange-g: linear-gradient(135deg, #F7A06A, #F27B36); --svc-sky-g: linear-gradient(135deg, #A0D4FF, #5AB2FF); --svc-indigo-g: linear-gradient(135deg, #8F8FFF, #5B5BF0); --svc-emerald-g: linear-gradient(135deg, #5EE0B0, #10B981); --svc-candy-g: linear-gradient(135deg, #FFB3E6, #FF6FD8); }
.rotator .word[data-craft="0"], .crafts li:nth-child(1), .service-list li[data-craft="design"] { --svc: var(--svc-orange); --svc-grad: var(--svc-orange-g); }
.rotator .word[data-craft="1"], .crafts li:nth-child(2), .service-list li[data-craft="video"] { --svc: var(--svc-orange); --svc-grad: var(--svc-orange-g); }
.rotator .word[data-craft="2"], .crafts li:nth-child(3), .service-list li[data-craft="web"] { --svc: var(--svc-sky); --svc-grad: var(--svc-sky-g); }
.rotator .word[data-craft="3"], .crafts li:nth-child(4), .service-list li[data-craft="dev"] { --svc: var(--svc-indigo); --svc-grad: var(--svc-indigo-g); }
.rotator .word[data-craft="4"], .crafts li:nth-child(5), .service-list li[data-craft="config"] { --svc: var(--svc-indigo); --svc-grad: var(--svc-indigo-g); }
.rotator .word[data-craft="5"], .crafts li:nth-child(6), .service-list li[data-craft="builds"] { --svc: var(--svc-emerald); --svc-grad: var(--svc-emerald-g); }
.rotator .word[data-craft="6"], .crafts li:nth-child(7), .service-list li[data-craft="3d"] { --svc: var(--svc-emerald); --svc-grad: var(--svc-emerald-g); }
.rotator .word[data-craft="7"], .crafts li:nth-child(8), .service-list li[data-craft="management"] { --svc: var(--svc-candy); --svc-grad: var(--svc-candy-g); }

/* Micro-interactions (references: transitions.dev, bencho.dev). Page and content transitions keep the bell curve;
   these only touch what is pressed or what appears inside a panel. */
/* Project page: the visuals rise into place one after the other, a light blur clearing as they land. */
.project .visual { opacity: 0; translate: 0 12px; filter: blur(3px); }
.project.is-open .visual { opacity: 1; translate: none; filter: none; transition: opacity .35s var(--ease-smooth), translate .5s var(--ease-smooth), filter .35s var(--ease-smooth); transition-delay: calc(450ms + min(var(--k), 8) * 40ms); }
@media (prefers-reduced-motion: reduce) {
  .project .visual { opacity: 1; translate: none; filter: none; transition: none; }
}

/* Project visual from YouTube: thumbnail with a play button, then the player in the same frame. */
.visual-art .yt { position: absolute; inset: 0; padding: 0; border: 0; background: none; cursor: var(--cur-pointer, pointer); }
.visual-art .yt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Play: just a white triangle with soft corners, on a light veil that clears on hover. */
.visual-art .yt::after { content: ""; position: absolute; inset: 0; background: rgba(10, 10, 15, .25); transition: background-color .3s var(--ease-smooth); }
.visual-art .yt:is(:hover, :focus-visible)::after { background: transparent; }
.visual-art .yt-play { position: absolute; z-index: 1; left: 50%; top: 50%; width: 44px; height: 44px; translate: -40% -50%; background: var(--white);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.8v14.4L19 12z' fill='%23000' stroke='%23000' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.8v14.4L19 12z' fill='%23000' stroke='%23000' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.visual-art iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Video popup (project visuals from YouTube): dimmed page, the YouTube player in a rounded frame.
   Opens like a modal on transitions.dev (fade + scale .96 + blur, 300 ms), closes quicker (180 ms). */
.vbox { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: max(24px, 4vh) var(--gutter); }
.vbox-back { position: absolute; inset: 0; background: rgba(10, 10, 15, .88); opacity: 0; transition: opacity .3s var(--ease-smooth); }
.vbox-frame { position: relative; width: min(100%, 1280px, calc((100vh - 2 * max(24px, 4vh)) * 16 / 9)); aspect-ratio: 16 / 9; border-radius: var(--r-l); overflow: hidden; background: var(--ink);
  opacity: 0; scale: .96; filter: blur(6px); transition: opacity .3s var(--ease-smooth), scale .3s var(--ease-smooth), filter .3s var(--ease-smooth); }
.vbox.is-open .vbox-back, .vbox.is-open .vbox-frame { opacity: 1; scale: 1; filter: none; }
.vbox.is-closing .vbox-back, .vbox.is-closing .vbox-frame { transition-duration: .18s; }
.vbox.is-closing .vbox-frame { scale: .98; }
.vbox-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vbox-close { position: absolute; top: max(16px, 2vh); right: var(--gutter); display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: var(--white); color: var(--ink); cursor: var(--cur-pointer, pointer);
  opacity: 0; transition: opacity .3s var(--ease-smooth), scale .16s var(--ease-smooth); }
.vbox.is-open .vbox-close { opacity: 1; }
.vbox-close:active { scale: .92; }
.vbox-close svg { width: 20px; height: 20px; }
@media (prefers-reduced-motion: reduce) { .vbox-back, .vbox-frame, .vbox-close { transition: none; } .vbox-frame { filter: none; scale: 1; } }

/* Project page: header (icon, game, title, description, services), then the content grouped by service.
   Header pieces rise in one after the other when the page opens; the visuals follow. */
/* White page: the close button is the blue one, the white one would vanish into the page. */
.project .project-close { background-color: var(--blue); color: var(--white); position: absolute; top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 3vh); right: var(--gutter); z-index: 1; }
.project-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: center; max-width: min(100%, 1100px); padding-right: 140px; margin-bottom: clamp(28px, 5vh, 56px); }
.ph-icon { position: relative; width: clamp(88px, 9vw, 140px); }
.ph-icon img { position: absolute; inset: 14%; width: 72%; height: 72%; object-fit: contain; }
/* A project icon always sits on its own rounded tile, whatever the image (transparent logo or not). */
.ph-icon:has(img) { background: var(--paper); }
.ph-icon svg { position: absolute; inset: 30%; width: 40%; height: 40%; color: var(--white); }
.ph-text { display: grid; gap: 12px; justify-items: start; min-width: 0; }
.ph-game { font: 700 12px/1 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--grey); }
.ph-game .game { display: block; font-size: 24px; background: var(--ink); -webkit-mask: var(--logo) left center / contain no-repeat; mask: var(--logo) left center / contain no-repeat; }
.ph-desc { max-width: 60ch; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.55; color: var(--grey); }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.project-tags li { padding: 8px 12px; border-radius: var(--r-s); background: var(--svc-grad, var(--paper)); color: var(--ink); font: 700 12px/1 var(--text); letter-spacing: .06em; text-transform: uppercase; }
:is(.project-tags li, .pc-group):is([data-svc="design"], [data-svc="video"]) { --svc: var(--svc-orange); --svc-grad: var(--svc-orange-g); }
:is(.project-tags li, .pc-group)[data-svc="web"] { --svc: var(--svc-sky); --svc-grad: var(--svc-sky-g); }
:is(.project-tags li, .pc-group):is([data-svc="dev"], [data-svc="config"]) { --svc: var(--svc-indigo); --svc-grad: var(--svc-indigo-g); }
:is(.project-tags li, .pc-group):is([data-svc="build"], [data-svc="3d"]) { --svc: var(--svc-emerald); --svc-grad: var(--svc-emerald-g); }
:is(.project-tags li, .pc-group)[data-svc="management"] { --svc: var(--svc-candy); --svc-grad: var(--svc-candy-g); }
.project-content { display: grid; gap: clamp(32px, 6vh, 64px); padding-top: clamp(24px, 4vh, 40px); border-top: 1px solid var(--line); }
.pc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font: 700 clamp(20px, 1.8vw, 26px)/1 var(--display); letter-spacing: -.02em; }
.pc-head i { width: 10px; height: 10px; border-radius: 50%; background: var(--svc, var(--ink)); }
.pc-head span { font: 700 12px/1 var(--text); color: var(--grey); }
.project-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.visual-art { aspect-ratio: 16 / 9; }
.visual figcaption { letter-spacing: .04em; text-transform: none; font-size: 14px; color: var(--ink); }
.project .ph-icon, .project .ph-text > * { opacity: 0; translate: 0 14px; filter: blur(3px); }
.project.is-open .ph-icon, .project.is-open .ph-text > * { opacity: 1; translate: none; filter: none; transition: opacity .4s var(--ease-smooth), translate .6s var(--ease-smooth), filter .4s var(--ease-smooth); }
.project.is-open .ph-icon { transition-delay: .35s; }
.project.is-open .ph-text > :nth-child(1) { transition-delay: .4s; }
.project.is-open .ph-text > :nth-child(2) { transition-delay: .44s; }
.project.is-open .ph-text > :nth-child(3) { transition-delay: .48s; }
.project.is-open .ph-text > :nth-child(4) { transition-delay: .52s; }
@media (max-width: 760px) {
  .project-head { grid-template-columns: 1fr; padding-right: 0; padding-top: 56px; }
  .ph-icon { width: 80px; }
}
@media (prefers-reduced-motion: reduce) { .project .ph-icon, .project .ph-text > * { opacity: 1; translate: none; filter: none; transition: none; } }

/* Project header: services then the game, on one line, the game at the height of a tag. */
.ph-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 4px; }
.ph-meta .project-tags { margin-top: 0; }
.ph-meta .ph-game { display: flex; align-items: center; height: 28px; }
.ph-meta .ph-game .game { height: 18px; font-size: inherit; }
/* Content cards: the title sits on the card in a white label; on hover blue sweeps in and the text turns white. */
.project .visual { position: relative; }
.project .visual figcaption { position: absolute; z-index: 2; left: 12px; bottom: 12px; max-width: calc(100% - 24px); height: 30px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 12px; border-radius: var(--r-s); background: var(--white); color: var(--ink); font: 600 13px/30px var(--text); letter-spacing: 0; text-transform: none; pointer-events: none;
  background-image: linear-gradient(var(--blue), var(--blue)); background-repeat: no-repeat; background-position: right -1px center; background-size: 0% calc(100% + 2px);
  transition: color .45s var(--ease-io), background-color 0s, background-size .5s var(--ease-io); }
/* Same sweep as the buttons: blue fills from the right inside the background (one layer, no edge line). */
.project .visual:is(:hover, :focus-within) figcaption { background-size: calc(100% + 2px) calc(100% + 2px); background-color: var(--blue); color: var(--white);
  transition: color .45s var(--ease-io), background-size .5s var(--ease-io), background-color 0s linear .5s; }

/* Menu matches « Start a project » and « Log in » beside it; alone on a phone, it keeps its 44px touch target. */
.header-nav .menu-btn { min-height: 0; }
@media (max-width: 640px) { .header-nav .menu-btn { min-height: 44px; } }
