/* ==========================================================================
   Darius — Web Designer & Developer
   ========================================================================== */

:root {
  --ink: #121212;
  --ink-2: #191918;
  --ink-3: #222220;
  --paper: #dcd9d3;
  --paper-2: #cfcbc3;
  --fg: #ebe8e2;
  --fg-dim: #8a8781;
  --ink-dim: #5f5c56;
  --line-d: rgba(235, 232, 226, .13);
  --line-l: rgba(18, 18, 18, .16);
  --live: #9bd98f;

  --f-sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;

  --gutter: clamp(16px, 2.6vw, 40px);
  --header-h: 76px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); scroll-behavior: smooth; scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
html.menu-open { overflow: hidden; }
/* Lenis does the smoothing; native smooth scroll would also break ScrollTrigger's measurements. */
html.motion { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  background: var(--ink);
  color: var(--fg);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
::selection { background: var(--fg); color: var(--ink); }
.light ::selection { background: var(--ink); color: var(--paper); }

:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }
[tabindex="-1"]:focus { outline: none; }

.skip {
  position: fixed; left: var(--gutter); top: 12px; z-index: 300;
  padding: 10px 16px; background: var(--fg); color: var(--ink);
  font-size: 14px; font-weight: 600; border-radius: 99px;
  transform: translateY(-160%); transition: transform .4s var(--ease);
}
.skip:focus { transform: none; }

/* ---------- Type primitives ---------- */
.script {
  font-family: var(--f-script);
  font-weight: 400;
  font-style: normal;
  font-stretch: 100%;
  text-transform: none;
  letter-spacing: 0;
}
.g { display: inline-block; }
.label {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.3;
}
.sec-label {
  display: flex;
  gap: 14px;
  color: var(--ink-dim);
  margin-bottom: clamp(40px, 7vh, 90px);
}
.sec-label--dark { color: var(--fg-dim); }

/* Grotesk -> script hover swap */
.swap { position: relative; display: inline-block; }
.swap__a { display: inline-block; transition: transform .7s var(--ease), opacity .45s var(--ease); }
.swap__b {
  position: absolute; left: 0; top: 50%;
  font-family: var(--f-script);
  font-weight: 400;
  font-stretch: 100%;
  font-size: 1.3em;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-30%);
  clip-path: inset(-30% 100% -30% -10%);
  transition: transform .7s var(--ease), opacity .3s, clip-path .9s var(--ease);
  pointer-events: none;
}
.swap:hover .swap__a,
a:focus-visible .swap__a, a.swap:focus-visible .swap__a,
.svc__item:hover .swap__a,
.menu__nav a:hover .swap__a { opacity: 0; transform: translateY(-35%); }
.swap:hover .swap__b,
a:focus-visible .swap__b, a.swap:focus-visible .swap__b,
.svc__item:hover .swap__b,
.menu__nav a:hover .swap__b { opacity: 1; transform: translateY(-50%); clip-path: inset(-30% -10% -30% -10%); }

/* ---------- Loader ---------- */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 24px var(--gutter) 28px;
  background: var(--ink);
  color: var(--fg);
  animation: loader-failsafe .01s linear 7s forwards;
}
@keyframes loader-failsafe { to { visibility: hidden; opacity: 0; } }
/* Centred monogram: the outline draws itself, then the solid mark fills upward with progress. */
.loader__mark {
  position: absolute; left: 50%; top: 50%;
  width: clamp(110px, 12vw, 170px); aspect-ratio: 34 / 28;
  transform: translate(-50%, -50%);
}
.loader__logo { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.loader__logo--line { fill: none; stroke: var(--fg); stroke-width: .22; opacity: .45; }
.loader__logo--line > g > *, .loader__logo--line > path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: loader-draw 1.6s var(--ease-io) forwards; }
.loader__logo--line > path { animation-delay: .25s; }
@keyframes loader-draw { to { stroke-dashoffset: 0; } }
.loader__logo--fill { fill: var(--fg); clip-path: inset(100% 0 0 0); }
.loader.is-done { display: none; }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 150;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--fg);
  mix-blend-mode: difference;
  pointer-events: none;
  opacity: 0;
  display: grid; place-items: center;
  transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease), opacity .3s, background-color .3s;
}
.cursor.is-visible { opacity: 1; }
/* Over links the dot steps aside and the ring takes over. */
.cursor.is-hover { width: 0; height: 0; margin: 0; }
.cursor.is-down { width: 6px; height: 6px; margin: -3px 0 0 -3px; }

/* Trailing ring; JS writes its position, `scale` handles the states. */
.cursor-ring {
  position: fixed; left: 0; top: 0; z-index: 149;
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1px solid var(--fg); border-radius: 50%;
  mix-blend-mode: difference;
  pointer-events: none;
  opacity: 0;
  transition: scale .6s var(--ease), opacity .35s, background-color .4s, border-color .4s;
}
.cursor-ring.is-visible { opacity: .55; }
.cursor-ring.is-hover { scale: 1.7; opacity: 1; background-color: rgba(235, 232, 226, .08); }
.cursor-ring.is-down { scale: .72; }
.cursor-ring.is-hover.is-down { scale: 1.35; }
.cursor-ring.is-label { scale: .4; opacity: 0; }
html.has-cursor, html.has-cursor * { cursor: none !important; }
.cursor.is-label { width: 92px; height: 92px; margin: -46px 0 0 -46px; mix-blend-mode: normal; }
.cursor__label {
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); opacity: 0; transition: opacity .3s;
}
.cursor.is-label .cursor__label { opacity: 1; }
/* Frosted-glass variant used over full-bleed imagery */
.cursor.is-glass {
  width: 116px; height: 116px; margin: -58px 0 0 -58px;
  background: rgba(235, 232, 226, .16);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.cursor.is-glass .cursor__label { color: var(--fg); font-size: 13px; font-weight: 500; letter-spacing: .02em; text-transform: none; }
@media (hover: none), (pointer: coarse) { .cursor, .cursor-ring { display: none; } }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter);
  color: var(--fg);
  mix-blend-mode: difference;
  pointer-events: none;
}
.header > * { pointer-events: auto; }
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo svg { width: 32px; height: 26px; fill: currentColor; }
.logo__word { font-weight: 700; font-size: 15px; letter-spacing: .02em; text-transform: uppercase; }
.nav { display: flex; gap: clamp(20px, 2.4vw, 40px); margin-left: auto; font-size: 14px; font-weight: 500; }
.menu-btn { display: none; align-items: center; gap: 14px; font-size: 14px; font-weight: 500; padding: 8px 0 8px 8px; }
.menu-btn__lines { position: relative; width: 34px; height: 10px; }
.menu-btn__lines i {
  position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform .6s var(--ease), top .6s var(--ease);
}
.menu-btn__lines i:first-child { top: 0; }
.menu-btn__lines i:last-child { top: 8.5px; }
.menu-btn[aria-expanded="true"] .menu-btn__lines i:first-child { top: 4.25px; transform: scaleX(.62) rotate(38deg); }
.menu-btn[aria-expanded="true"] .menu-btn__lines i:last-child { top: 4.25px; transform: scaleX(.62) rotate(-38deg); }

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: 55;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 4vh) var(--gutter) 28px;
  background: var(--ink-2);
  color: var(--fg);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 1s var(--ease-io), visibility 0s linear 1s;
}
.menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 1s var(--ease-io), visibility 0s; }
.menu__nav li { border-bottom: 1px solid var(--line-d); overflow: hidden; }
.menu__nav li:first-child { border-top: 1px solid var(--line-d); }
.menu__nav a {
  display: flex; align-items: center; gap: clamp(16px, 4vw, 64px);
  padding: 1.2vh 0;
  font-size: clamp(34px, min(9vh, 13vw), 120px);
  font-weight: 800; line-height: 1; letter-spacing: -.045em; text-transform: uppercase;
  transform: translateY(105%);
  transition: transform .9s var(--ease);
}
.menu.is-open .menu__nav a { transform: none; }
.menu.is-open li:nth-child(1) a { transition-delay: .32s; }
.menu.is-open li:nth-child(2) a { transition-delay: .38s; }
.menu.is-open li:nth-child(3) a { transition-delay: .44s; }
.menu.is-open li:nth-child(4) a { transition-delay: .50s; }
.menu.is-open li:nth-child(5) a { transition-delay: .56s; }
.menu__num { font-family: var(--f-script); font-weight: 400; letter-spacing: 0; font-size: .42em; color: var(--fg-dim); width: 1.6em; }
.menu__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; font-size: 14px; color: var(--fg-dim); flex-wrap: wrap; }
.menu__social, .menu__contact { display: flex; gap: 24px; flex-wrap: wrap; }
.menu__foot a:hover { color: var(--fg); }

/* ---------- Fluted canvas ---------- */
.fluted { width: 100%; height: 100%; }
.fluted.is-fallback {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 2px, transparent 2px 36px, rgba(0,0,0,.25) 36px 38px),
    radial-gradient(40% 55% at 62% 45%, #8b877f 0%, transparent 70%),
    radial-gradient(30% 40% at 30% 70%, #4a4844 0%, transparent 70%),
    var(--ink);
}
.about__canvas.is-fallback {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 2px, transparent 2px 30px, rgba(0,0,0,.08) 30px 32px),
    radial-gradient(45% 50% at 55% 40%, #2a2a2a 0%, transparent 75%),
    var(--paper-2);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh; height: 100svh; min-height: 560px;
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
}
.hero__canvas { position: absolute; inset: 0; z-index: -1; }
.hero__inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 var(--gutter);
  will-change: transform;
}
.hero__titlewrap { position: relative; }
.hero__title {
  font-size: clamp(84px, 21vw, 440px);
  font-weight: 800;
  line-height: .8;
  letter-spacing: -.045em;
  text-transform: uppercase;
  color: var(--fg);
}
.hero__word { display: block; white-space: nowrap; }
.hero__word .char { display: inline-block; will-change: transform; }
.hero__hello {
  position: absolute; z-index: 2;
  left: .04em; top: -.62em;
  font-size: clamp(34px, 6.6vw, 140px);
  line-height: 1;
  color: var(--fg);
  transform: rotate(-7deg);
  transform-origin: left bottom;
  white-space: nowrap;
}
.hero__role {
  display: flex; flex-direction: column; align-items: center;
  margin-top: clamp(24px, 4.5vh, 56px);
  font-size: 13px; font-weight: 600; line-height: 1.3;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--fg);
}
.hero__foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end;
  padding: 0 var(--gutter) clamp(20px, 3.4vh, 34px);
  font-size: 13px; line-height: 1.45; color: var(--fg-dim);
}
.hero__foot .label { display: block; color: var(--fg); margin-bottom: 6px; }
.hero__foot-r { text-align: right; justify-self: end; }
.hero__scroll {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg);
}
.hero__scroll-line { position: relative; width: 1px; height: 54px; background: var(--line-d); overflow: hidden; }
.hero__scroll-line::after {
  content: ""; position: absolute; inset: 0; background: var(--fg);
  transform: translateY(-100%);
  animation: scroll-line 2.2s var(--ease-io) infinite;
}
@keyframes scroll-line { 0% { transform: translateY(-100%); } 55% { transform: translateY(0); } 100% { transform: translateY(100%); } }
.dot {
  display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%;
  background: var(--live); vertical-align: 1px;
  box-shadow: 0 0 0 0 rgba(155, 217, 143, .5);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(155, 217, 143, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(155, 217, 143, 0); } }

/* ---------- Light sections ---------- */
.light { background: var(--paper); color: var(--ink); }
.dark { background: var(--ink); color: var(--fg); }

/* ---------- Statement ---------- */
.statement {
  position: relative; z-index: 1;
  padding: clamp(140px, 26vh, 320px) var(--gutter) clamp(160px, 30vh, 360px);
}
.statement__title {
  font-size: clamp(28px, 9.6vw, 220px);
  font-weight: 800;
  line-height: .86;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.statement__title .row { display: block; white-space: nowrap; }
.statement__title .r2 { padding-left: 13vw; }
.statement__title .r3 { padding-left: 4.5vw; }
.statement__title .r4 { text-align: right; }
.statement__title .s {
  display: inline-block;
  font-size: 1.22em;
  line-height: 0;
  margin-right: .06em;
  position: relative; top: .04em;
}
.statement__foot { display: flex; justify-content: flex-end; margin-top: clamp(80px, 16vh, 200px); }
.statement__copy {
  max-width: 22ch;
  font-size: clamp(19px, 1.75vw, 28px);
  line-height: 1.3;
  letter-spacing: -.01em;
  margin-right: 6vw;
}
.statement__copy em { font-family: var(--f-script); font-style: normal; font-size: 1.45em; line-height: 0; }

/* ---------- About ---------- */
.about { padding: 0 var(--gutter) clamp(180px, 34vh, 420px); }
.about__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: center; }
.about__figure { grid-column: 2 / span 4; }
.about__frame { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 3px; background: var(--paper-2); }
.about__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; filter: grayscale(1) contrast(1.05); }
.about__figure figcaption {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 14px; color: var(--ink-dim);
}
.about__figure figcaption .script { font-size: 34px; line-height: 1; color: var(--ink); }
.about__text { grid-column: 7 / span 5; }
.about__title {
  font-size: clamp(38px, 4.6vw, 84px);
  font-weight: 800;
  line-height: .92;
  letter-spacing: -.045em;
  text-transform: uppercase;
  margin-bottom: clamp(28px, 4vh, 44px);
}
.about__title .script { font-size: 1.32em; line-height: 0; margin-left: .12em; }
.about__text p { max-width: 26ch; font-size: clamp(20px, 1.8vw, 28px); line-height: 1.32; letter-spacing: -.01em; color: var(--ink); }

/* ---------- Shift / numbers ---------- */
/* Static by default; the pinned, scroll-driven version only exists once JS motion is running (.motion). */
.shift { position: relative; background: var(--ink); color: var(--fg); }
.shift__pin { position: relative; height: 100vh; height: 100svh; min-height: 600px; overflow: hidden; }
.motion .shift { height: 270vh; }
.motion .shift__pin { position: sticky; top: 0; min-height: 0; }
.shift__stage {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: calc(var(--header-h) + 5vh) var(--gutter) clamp(28px, 6vh, 64px);
}
.shift__stage { justify-content: center; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; align-items: center; text-align: center; }
.stat__num {
  font-size: clamp(110px, 19vw, 340px);
  font-weight: 800; font-stretch: 68%;
  line-height: .8; letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.stat__num sup { font-size: .34em; vertical-align: top; position: relative; top: .08em; margin-left: .06em; font-stretch: 100%; }
.stat__label { margin-top: clamp(12px, 2vh, 22px); font-size: clamp(14px, 1.5vw, 24px); font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; line-height: 1; }
.stat__script { font-size: clamp(34px, 3.8vw, 72px); line-height: 1; color: var(--fg-dim); }
.shutters { position: absolute; inset: 0; display: none; pointer-events: none; }
.motion .shutters { display: flex; }
.shutters i { flex: 1; margin-right: -1px; background: var(--paper); transform-origin: 50% 0; }

/* ---------- Services ---------- */
.services { padding: clamp(160px, 28vh, 340px) var(--gutter) clamp(140px, 24vh, 300px); }
.services__title { font-size: clamp(20px, 2vw, 30px); font-weight: 500; letter-spacing: -.01em; line-height: 1; margin-bottom: clamp(48px, 9vh, 110px); }
.services__title .script { font-size: 1.6em; color: var(--fg-dim); }
.svc { border-top: 1px solid var(--line-d); }
.svc__item {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(220px, 26%); align-items: center; gap: var(--gutter);
  padding: clamp(16px, 3vh, 34px) 0;
  border-bottom: 1px solid var(--line-d);
  transition: color .6s var(--ease);
}
.svc__item::before {
  content: ""; position: absolute; z-index: -1;
  inset: -1px calc(var(--gutter) * -1);
  background: var(--fg);
  transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform .7s var(--ease);
}
.svc__item:hover { color: var(--ink); }
.svc__item:hover::before { transform: scaleY(1); }
.svc__num { font-size: 40px; line-height: 1; color: var(--fg-dim); transition: color .6s var(--ease); }
.svc__item:hover .svc__num, .svc__item:hover .svc__desc { color: #4a4844; }
.svc__name {
  font-size: clamp(34px, 7.2vw, 140px);
  font-weight: 800; line-height: .9; letter-spacing: -.045em; text-transform: uppercase;
  justify-self: start;
}
.svc__name .swap__b { font-size: 1.12em; }
.svc__desc { font-size: 15px; color: var(--fg-dim); max-width: 32ch; transition: color .6s var(--ease); }

/* ---------- Work ---------- */
.work { background: var(--ink); }
.work__head { padding: clamp(160px, 32vh, 380px) var(--gutter) clamp(80px, 13vh, 160px); }
.work__title {
  display: flex; flex-direction: column; align-items: center;
  font-size: clamp(64px, 10.4vw, 240px);
}
.work__title .g { font-weight: 800; line-height: .8; letter-spacing: -.045em; text-transform: uppercase; margin-left: .62em; }
.work__script {
  position: relative; z-index: 2;
  font-size: 1.12em; line-height: 1;
  margin: 0 1.1em -.2em 0;
}

/* Full-bleed project teasers (also the "next project" block on case-study pages) */
.teaser {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 110vh; height: 110svh; min-height: 560px;
  padding: 0 var(--gutter);
  background: var(--ink); color: var(--fg);
  text-align: center;
}
.teaser__title {
  display: flex; flex-direction: column; align-items: center;
  font-size: clamp(58px, 9.6vw, 220px);
}
.teaser__sans { font-weight: 800; line-height: .8; letter-spacing: -.045em; text-transform: uppercase; }
.teaser__script { display: inline-block; font-size: 1.04em; line-height: 1; margin: -.1em 0 0 .9em; }
.teaser__kicker { margin-bottom: clamp(20px, 4vh, 44px); font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-dim); }
.teaser__meta {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(22px, 4vh, 44px);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px;
  font-size: 13px; color: var(--fg-dim);
}
.teaser__meta > :first-child { justify-self: start; }
.teaser__meta > :last-child { justify-self: end; }
.teaser__kind {
  color: var(--fg);
  padding-bottom: 4px;
  background: linear-gradient(currentColor, currentColor) right bottom / 100% 1px no-repeat;
  transition: background-size .8s var(--ease);
}
.teaser:hover .teaser__kind, .teaser:focus-visible .teaser__kind { background-size: 0 1px; }
.teaser:focus-visible { outline-offset: -6px; }

/* Photo behind reeded glass: the <img> is the no-WebGL / no-JS fallback, the canvas fades in over it. */
.fmedia { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--ink); }
.fmedia::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(75% 70% at 50% 50%, rgba(18, 18, 18, .46), rgba(18, 18, 18, .74));
}
/* Mostly-white screenshots need more shade to sit as dark as a photo would. */
.fmedia--light::after { background: radial-gradient(75% 70% at 50% 50%, rgba(18, 18, 18, .6), rgba(18, 18, 18, .84)); }
.fmedia__layer { position: absolute; inset: -14% 0; will-change: transform; }
.fmedia img, .fmedia canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.6s var(--ease), opacity 1.2s var(--ease);
}
.fmedia img { filter: brightness(.8) saturate(.95); }
.fmedia canvas { opacity: 0; }
.fmedia canvas.is-ready { opacity: 1; }
.fmedia canvas.is-fallback { display: none; }
.teaser:hover .fmedia img, .teaser:hover .fmedia canvas { transform: scale(1.045); }

/* Browser mockups (all sizing in cqw so they scale with their container) */
.mock {
  container-type: inline-size;
  width: 100%;
  display: flex; flex-direction: column;
  border-radius: 6px; overflow: hidden;
  background: #fff;
  box-shadow: 0 60px 120px -50px rgba(0, 0, 0, .9);
}
.mock__bar {
  flex: none;
  display: flex; align-items: center; gap: .8cqw;
  height: max(22px, 3.2cqw);
  padding: 0 1.6cqw;
  background: #e8e6e1;
}
.mock__bar i { width: max(7px, .9cqw); aspect-ratio: 1; border-radius: 50%; background: #cbc8c1; }
.mock__bar span {
  margin: 0 auto; transform: translateX(-2cqw);
  padding: .35cqw 3cqw; border-radius: 99px;
  font-size: max(9px, 1cqw); color: #8d8a83; background: #f4f3ef;
}
.mock__shot { overflow: hidden; background: #f4f6fb; }
.mock__shot img { width: 100%; height: auto; }
.mock--dark .mock__bar { background: #1c1d22; }
.mock--dark .mock__bar i { background: #3a3b42; }
.mock--dark .mock__bar span { background: #26272d; color: #8b8c95; }
.mock--dark .mock__shot { background: #111216; }

/* ---------- Page transition ---------- */
/* Three panels rise to cover the page before navigating; the next page starts covered (.pt-enter) and peels them away. */
.pt { position: fixed; inset: 0; z-index: 140; pointer-events: none; }
.pt i { position: absolute; inset: 0; transform: scaleY(0); transform-origin: 50% 100%; }
.pt i:nth-child(1) { background: var(--paper-2); }
.pt i:nth-child(2) { background: var(--ink-3); }
.pt i:nth-child(3) { background: var(--ink); }
.pt-enter .pt { pointer-events: auto; animation: pt-failsafe .01s linear 6s forwards; }
.pt-enter .pt i { transform: none; }
.js.pt-enter .loader { display: none; }
@keyframes pt-failsafe { to { visibility: hidden; } }

/* ---------- Case-study pages ---------- */
/* Paper behind the page so adjacent light sections never show an ink seam at fractional pixel edges. */
.page-project main { background: var(--paper); }
.page-project .footer { padding-top: 22px; }
.page-project .footer__bar { margin-top: 0; border-top: 0; padding-top: 0; }

.ph {
  position: relative;
  height: 100vh; height: 100svh; min-height: 620px;
  display: flex; align-items: flex-end;
  padding: 0 var(--gutter) clamp(28px, 5vh, 56px);
  overflow: hidden;
}
.ph__text { position: relative; z-index: 2; width: 50%; padding-right: var(--gutter); }
.ph__crumb { display: flex; gap: 10px; margin-bottom: clamp(18px, 3.4vh, 36px); color: var(--ink-dim); }
.ph__crumb a { background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size .6s var(--ease), color .4s; }
.ph__crumb a:hover { color: var(--ink); background-size: 100% 1px; }
.ph__title { display: flex; flex-direction: column; align-items: flex-start; font-size: clamp(60px, 8.6vw, 200px); }
.ph__sans { font-weight: 800; line-height: .8; letter-spacing: -.045em; text-transform: uppercase; white-space: nowrap; }
.ph__script { display: inline-block; font-size: 1.04em; line-height: 1; margin: -.1em 0 0 1.3em; white-space: nowrap; }
.ph__media { position: absolute; top: 0; right: 0; width: 50%; height: 100%; overflow: hidden; }
.ph__media .fmedia { z-index: 0; }
.ph__media .fmedia::after { background: linear-gradient(180deg, rgba(18, 18, 18, .35), rgba(18, 18, 18, 0) 30%); }
.ph__media .fmedia__layer { inset: 0; transform-origin: 50% 0; }
.ph__media .fmedia img { filter: none; }
.ph__wipe { position: absolute; inset: 0; z-index: 3; background: var(--paper); transform-origin: 0 50%; transform: scaleX(0); }

.pshow {
  --pull: clamp(70px, 11vh, 130px);
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(110px, 20vh, 240px) var(--gutter) calc(var(--pull) + clamp(90px, 15vh, 180px));
  background: var(--ink);
}
.pshow__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.pshow__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 18, 18, .55), rgba(18, 18, 18, .2) 45%, rgba(18, 18, 18, .7)); }
.pshow__bg img { position: absolute; top: -12%; left: 0; width: 100%; height: 124%; object-fit: cover; filter: blur(42px) brightness(.6) saturate(1.25); transform: scale(1.2); }
.pshow__shot { width: min(1180px, 100%); margin: 0 auto; }

.pinfo {
  --pull: clamp(70px, 11vh, 130px);
  position: relative; z-index: 2;
  margin-top: calc(var(--pull) * -1);
  padding: 0 var(--gutter);
  background: linear-gradient(180deg, transparent var(--pull), var(--paper) var(--pull));
}
.pinfo__box {
  width: min(1180px, 100%); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px var(--gutter);
  padding: clamp(32px, 4.4vw, 76px);
  background: var(--ink-2); color: var(--fg);
  border-radius: 4px;
}
.pinfo__item dt { margin-bottom: 8px; font-size: 13px; color: var(--fg-dim); }
.pinfo__item dd { font-size: clamp(16px, 1.3vw, 21px); font-weight: 500; line-height: 1.3; letter-spacing: -.01em; }

.pabout { padding: clamp(110px, 18vh, 220px) var(--gutter) clamp(120px, 20vh, 240px); }
.pabout__row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: start; }
.pabout__row + .pabout__row { margin-top: clamp(56px, 9vh, 110px); }
.pabout__label { grid-column: 2 / span 2; font-size: 15px; font-weight: 700; line-height: 1.5; }
.pabout__lead { grid-column: 4 / span 8; font-size: clamp(24px, 2.6vw, 44px); line-height: 1.16; letter-spacing: -.025em; font-weight: 500; }
.pabout__row--cols .pabout__col:first-child { grid-column: 4 / span 4; }
.pabout__col { grid-column: span 4; font-size: 16px; line-height: 1.6; color: var(--ink-dim); max-width: 46ch; }
.pstack { grid-column: 4 / span 8; display: flex; flex-wrap: wrap; gap: 10px; }
.pstack li {
  padding: 9px 16px; border: 1px solid var(--line-l); border-radius: 99px;
  font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
}

.plive { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 0 var(--gutter) clamp(140px, 24vh, 280px); }
.cta.cta--ink { background: var(--ink); color: var(--fg); }
.cta.cta--ink:hover { color: var(--ink); }
.plive__url { font-size: 15px; color: var(--ink-dim); transition: color .4s; }
.plive__url:hover { color: var(--ink); }

.teaser--next { height: 100vh; height: 100svh; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- 404 ---------- */
.nf {
  position: relative; isolation: isolate; overflow: hidden;
  height: 100vh; height: 100svh; min-height: 560px;
  background: var(--ink); color: var(--fg);
}
.nf__canvas { position: absolute; inset: 0; z-index: -1; }
.nf__inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--header-h) var(--gutter) 0; text-align: center;
}
.nf__titlewrap { position: relative; }
.nf__title { font-size: clamp(150px, 31vw, 520px); font-weight: 800; line-height: .8; letter-spacing: -.05em; }
.nf__word { display: block; white-space: nowrap; }
.nf__word .char { display: inline-block; will-change: transform; }
.nf__oops {
  position: absolute; z-index: 2; left: .02em; top: -.55em;
  font-size: clamp(44px, 7.4vw, 140px); line-height: 1;
  transform: rotate(-7deg); transform-origin: left bottom; white-space: nowrap;
}
.nf__copy { margin-top: clamp(26px, 5vh, 56px); max-width: 34ch; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.5; color: var(--fg-dim); }
.nf__actions { margin-top: clamp(26px, 5vh, 52px); }
.nf__foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px;
  padding: 0 var(--gutter) clamp(20px, 3.4vh, 34px);
  font-size: 13px; line-height: 1.45; color: var(--fg-dim);
}
.nf__foot .label { display: block; color: var(--fg); margin-bottom: 6px; }
.nf__foot-r { justify-self: end; }
.nf__links { display: flex; gap: 8px; }
.nf__links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line-d); border-radius: 99px; color: var(--fg);
  transition: background-color .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease);
}
.nf__links a:hover, .nf__links a:focus-visible { background: var(--fg); color: var(--ink); border-color: var(--fg); }

/* ---------- Contact ---------- */
.contact { padding: clamp(120px, 22vh, 280px) var(--gutter) clamp(140px, 24vh, 300px); text-align: center; }
.contact .sec-label { justify-content: center; }
.contact__title {
  font-size: clamp(36px, 10.6vw, 230px);
  font-weight: 800; line-height: .86; letter-spacing: -.05em; text-transform: uppercase;
}
.contact__title .row { display: block; white-space: nowrap; }
.contact__title .row--script { line-height: .9; }
.contact__title .row--script .script { display: inline-block; font-size: .92em; color: var(--fg-dim); padding: 0 .1em; }
.contact__actions { display: flex; flex-direction: column; align-items: center; gap: 44px; margin-top: clamp(80px, 14vh, 160px); }
.cta {
  position: relative;
  display: grid; place-items: center;
  width: clamp(150px, 14vw, 210px); aspect-ratio: 1; border-radius: 50%;
  background: var(--fg); color: var(--ink);
  font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2;
  overflow: hidden;
  transition: background-color .5s var(--ease), transform .8s var(--ease);
}
.cta::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--live);
  transform: scale(0); transition: transform .7s var(--ease);
}
.cta:hover::before { transform: scale(1); }
.cta__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.contact__meta { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.contact__mail {
  font-size: clamp(20px, 2.4vw, 36px); font-weight: 500; letter-spacing: -.02em;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  padding-bottom: 4px;
  transition: background-size .7s var(--ease);
}
.contact__mail:hover { background-size: 100% 1px; }

/* ---------- Footer ---------- */
.footer { overflow: hidden; padding: 0 var(--gutter) 22px; background: var(--ink); color: var(--fg); }
.footer__word {
  margin: 0 calc(var(--gutter) * -1);
  font-size: 25.6vw;
  font-weight: 800;
  line-height: .74;
  letter-spacing: -.06em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
}
.footer__word span { display: inline-block; }
.footer__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 3vh; padding-top: 18px;
  border-top: 1px solid var(--line-d);
  font-size: 13px; color: var(--fg-dim);
}
.footer__links { display: flex; flex-wrap: wrap; gap: 8px; }
/* Pill buttons: a comfortable 44px target instead of bare 20px text. */
.footer__links a, .footer__top {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line-d); border-radius: 99px;
  color: var(--fg-dim);
  transition: color .5s var(--ease), border-color .5s var(--ease);
}
.footer__links a::before, .footer__top::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--fg); border-radius: inherit;
  transform: translateY(101%); transition: transform .6s var(--ease);
}
.footer__links a:hover, .footer__top:hover,
.footer__links a:focus-visible, .footer__top:focus-visible { color: var(--ink); border-color: var(--fg); }
.footer__links a:hover::before, .footer__top:hover::before,
.footer__links a:focus-visible::before, .footer__top:focus-visible::before { transform: none; }

/* ---------- Grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 120;
  width: 200%; height: 200%;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(5%, -7%); }
  60% { transform: translate(-3%, 8%); } 80% { transform: translate(7%, 2%); } 100% { transform: translate(-2%, -5%); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .about__figure { grid-column: 1 / span 5; }
  .about__text { grid-column: 7 / span 6; }
  .svc__item { grid-template-columns: 64px minmax(0, 1fr) minmax(200px, 30%); }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .hero__scroll { display: none; }
  .hero__foot { grid-template-columns: 1fr 1fr; }
  .about__grid { grid-template-columns: 1fr; row-gap: 64px; }
  .about__figure, .about__text { grid-column: auto; }
  .about__figure { width: min(78%, 420px); }
  .svc__item { grid-template-columns: 44px minmax(0, 1fr); row-gap: 10px; }
  .svc__num { font-size: 30px; }
  .svc__desc { grid-column: 2; }
  .teaser { height: 100vh; height: 100svh; }
  .teaser__title { font-size: 15vw; }
  .ph { height: auto; min-height: 0; flex-direction: column; align-items: stretch; padding: calc(var(--header-h) + 16vh) var(--gutter) 0; }
  .ph__text { width: 100%; padding-right: 0; }
  .ph__title { font-size: 15vw; }
  .ph__media { position: relative; width: auto; height: 62vh; margin: clamp(36px, 6vh, 56px) calc(var(--gutter) * -1) 0; }
  .pinfo__box { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pabout__row { grid-template-columns: 1fr; row-gap: 18px; }
  .pabout__label, .pabout__lead, .pabout__col, .pstack, .pabout__row--cols .pabout__col:first-child { grid-column: auto; }
}

@media (max-width: 600px) {
  .nf__foot { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .nf__foot > p { display: none; }

  .logo__word { display: none; }
  .hero__title { font-size: 24.5vw; }
  .hero__hello { font-size: 10vw; top: -.7em; }
  .hero__foot { font-size: 12px; }
  .statement__title .r2 { padding-left: 8vw; }
  .statement__title .r3 { padding-left: 0; }
  .statement__copy { margin-right: 0; }
  .stats { grid-template-columns: 1fr; row-gap: 9vh; }
  .stat__num { font-size: 30vw; }
  .work__title { font-size: 17vw; }
  .teaser__meta { grid-template-columns: 1fr; justify-items: center; }
  .teaser__meta > :first-child, .teaser__meta > :last-child { display: none; }
  .pinfo__box { grid-template-columns: 1fr; gap: 22px; }
  .menu__foot { font-size: 13px; }
  .footer__bar { justify-content: center; text-align: center; }
  .footer__links { order: -1; width: 100%; justify-content: center; }
}

@media (max-width: 400px) {
  .svc__name { font-size: 9.4vw; }
}

/* ---------- No animation / no JS fallbacks ---------- */
.no-anim .loader { display: none; }
html:not(.js) .menu-btn { display: none; }
html:not(.js) .nav { display: flex; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .loader, .shutters, .pt { display: none; }
  .grain, .dot, .hero__scroll-line::after { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* About: short factual line + link to the About page */
.about__text .about__more { margin-top: 1.4em; max-width: 36ch; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.6; letter-spacing: 0; color: var(--ink); opacity: .72; }
.about__link { display: inline-block; margin-top: 1.4em; font-size: clamp(15px, 1.15vw, 18px); font-weight: 600; color: var(--ink); }

/* About page: question headings + plain answer text */
.pabout__text { grid-column: 4 / span 7; max-width: 52ch; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.45; letter-spacing: -.01em; }
.pabout__text a { border-bottom: 1px solid currentColor; }
@media (max-width: 900px) { .pabout__text { grid-column: auto; } }
