/* ==========================================================================
   Swapnil Dhage — portfolio
   One idea runs through everything: the pixel. Square corners, square cursor,
   square markers, and one orange square that travels through the site.
   ========================================================================== */

:root {
  --ink: #0e0e0e;
  --ink-2: #3a3a38;
  --muted: #6e6e6a;
  --line: #e4e4e0;
  --line-2: #d4d4cf;
  --paper: #ffffff;
  --soft: #f4f4f1;
  --soft-2: #ebebe6;
  --dark: #0e0e0e;
  --dark-line: #2a2a28;
  --on-dark: #ededea;
  --on-dark-muted: #9a9a95;

  /* The pixel. Change this one value to recolour the key object everywhere. */
  --pixel: #ff3d00;

  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --f-serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --nav-h: 72px;
  --sec-pad: clamp(96px, 13vw, 184px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  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, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ul, ol { list-style: none; padding: 0; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--pixel); outline-offset: 3px; }
::selection { background: var(--pixel); color: #fff; }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 10001;
  padding: 10px 14px; background: var(--ink); color: #fff;
  transform: translateY(-160%); transition: transform .2s;
}
.skip:focus { transform: none; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--sec-pad); }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.h2 {
  font-size: clamp(44px, 6.4vw, 104px);
  line-height: .94;
  letter-spacing: -0.045em;
  font-weight: 500;
}
.h2 em { letter-spacing: -0.02em; }

/* Section header: eyebrow / title / aside on a 12-col grid */
.sec-head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 20px;
  align-items: end;
  margin-bottom: clamp(48px, 7vw, 96px);
}
.sec-head .eyebrow { grid-column: 1 / -1; }
.sec-head .h2 { grid-column: 1 / span 7; }
.sec-head__aside { grid-column: 9 / span 4; color: var(--muted); max-width: 38ch; }
.sec-head--stack { display: block; }
.sec-head--stack .h2 { margin: 20px 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  --h: 48px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h);
  padding: 0 22px;
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color .35s var(--ease);
}
.btn::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: var(--pixel);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .45s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleY(1); }
.btn--dark { background: var(--ink); color: #fff; }
.btn__arrow { display: inline-block; transition: transform .45s var(--ease); }
.btn:hover .btn__arrow, .btn:focus-visible .btn__arrow { transform: translateX(4px); }
.btn--lg { --h: 56px; padding: 0 28px; font-size: 16px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color .25s;
}
.link-arrow:hover { color: var(--pixel); }

/* ==========================================================================
   Custom cursor (fine pointers only)
   ========================================================================== */
.cursor, .cursor-label { display: none; }
@media (hover: hover) and (pointer: fine) {
  html.has-cursor, html.has-cursor * { cursor: none !important; }
  html.has-cursor .cursor, html.has-cursor .cursor-label { display: block; }
}
.cursor {
  position: fixed; left: 0; top: 0; z-index: 10000;
  width: 12px; height: 12px;
  margin: -6px 0 0 -6px;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  opacity: 0;
  transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), opacity .25s;
  will-change: transform;
}
.cursor.is-on { opacity: 1; }
.cursor.is-btn { width: 6px; height: 6px; margin: -3px 0 0 -3px; }
.cursor.is-text { width: 2px; height: 22px; margin: -11px 0 0 -1px; }
.cursor.is-down { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; }
.cursor.is-hidden { opacity: 0; }

.cursor-label {
  position: fixed; left: 0; top: 0; z-index: 10000;
  margin: -6px 0 0 -6px;
  pointer-events: none;
  will-change: transform;
}
.cursor-label span {
  display: block;
  padding: 9px 12px 8px;
  background: var(--pixel);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 11px; line-height: 1;
  letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap;
  /* starts clipped to a 12px square, grows into the label */
  clip-path: inset(0 calc(100% - 12px) calc(100% - 12px) 0);
  opacity: 0;
  transition: clip-path .45s var(--ease), opacity .2s;
}
.cursor-label.is-on span { clip-path: inset(0 0 0 0); opacity: 1; }

/* ==========================================================================
   The pixel + loader
   ========================================================================== */
.pixel {
  position: fixed; left: 0; top: 0; z-index: 9999;
  width: 12px; height: 12px;
  background: var(--pixel);
  pointer-events: none;
  visibility: hidden;
  will-change: transform, width, height;
}

.sq { /* the square used as a full stop */
  display: inline-block;
  width: .3em; height: .3em;
  margin-left: .07em;
  background: var(--pixel);
  vertical-align: baseline;
}
html.js:not(.pixel-docked) .nav__logo .sq { visibility: hidden; }

.loader {
  position: fixed; inset: 0; z-index: 9000;
  display: grid; place-items: center;
  background: var(--paper);
  clip-path: inset(0 0 0 0);
}
.no-js .loader { display: none; }
.loader__line {
  padding-inline: var(--gutter);
  font-size: clamp(40px, 8.4vw, 136px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}
.loader .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: .04em .02em .1em; margin: 0 -.02em; }
.loader .w > span { display: inline-block; transform: translateY(115%); }
.loader__word { font-weight: 600; letter-spacing: -0.04em; }
.loader__slot {
  display: inline-block;
  width: .2em; height: .2em;
  margin-left: .04em;
  vertical-align: baseline;
  margin-bottom: .1em; /* matches .w bottom padding so it sits on the baseline */
}
.loader__meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between;
  padding: 24px var(--gutter);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.loader__count { color: var(--ink); font-variant-numeric: tabular-nums; }
html.is-loading, html.is-loading body { overflow: hidden; }

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding-inline: var(--gutter);
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav { transition: border-color .3s, background-color .35s, color .35s; }
.nav.is-dark { background: rgba(14, 14, 14, .82); color: var(--on-dark); border-bottom-color: var(--dark-line); }
.nav.is-dark .nav__links { color: var(--on-dark-muted); }
.nav.is-dark .nav__links a:hover { color: #fff; }
.nav.is-dark .nav__links a + a::before { background: #3a3a38; }
.nav.is-dark .btn--dark { background: #fff; color: var(--ink); }
.nav.is-dark .btn--dark:hover { color: #fff; }
.nav.is-dark .nav__toggle { border-color: var(--on-dark); }
.nav__logo { justify-self: start; font-size: 20px; font-weight: 600; letter-spacing: -0.035em; line-height: 1; }
.nav__links { display: flex; align-items: center; gap: 26px; font-size: 15px; color: var(--muted); }
.nav__links a { position: relative; transition: color .2s; }
.nav__links a:hover { color: var(--ink); }
.nav__links a + a::before {
  content: ""; position: absolute; left: -15px; top: 50%;
  width: 4px; height: 4px; margin-top: -2px; background: var(--line-2);
}
.nav__right { justify-self: end; display: flex; align-items: center; gap: 12px; }
.nav__cta { --h: 40px; padding: 0 18px; font-size: 14px; }
.nav__toggle { display: none; height: 40px; padding: 0 14px; border: 1px solid var(--ink); font-size: 14px; font-weight: 500; }

.menu {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--nav-h) + 32px) var(--gutter) 32px;
  background: var(--paper);
  opacity: 0; visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
}
.menu__links { display: flex; flex-direction: column; gap: 6px; }
.menu__links a { font-size: clamp(40px, 11vw, 64px); font-weight: 500; letter-spacing: -0.045em; line-height: 1.1; }
.menu__meta { font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
html.menu-open .menu { opacity: 1; visibility: visible; }
html.menu-open { overflow: hidden; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column;
  padding-top: var(--nav-h);
}
.hero__wrap {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  align-content: end;
  padding-top: clamp(56px, 10vh, 120px);
  padding-bottom: clamp(32px, 5vh, 56px);
}
.hero__eyebrow { grid-column: 1 / -1; margin-bottom: 28px; }
.hero__title {
  grid-column: 1 / -1;
  font-size: clamp(42px, 10.6vw, 172px);
  line-height: .9;
  letter-spacing: -0.055em;
  font-weight: 500;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero__title .line > span { display: inline-block; }
.hero__title em { letter-spacing: -0.03em; padding-right: .04em; }
html.js .hero__title .line > span { transform: translateY(108%); }
html.js [data-hero] { opacity: 0; }

.hero__foot {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px;
  align-items: end;
  margin-top: clamp(32px, 5vw, 64px);
}
.hero__lede { grid-column: 1 / span 5; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.5; color: var(--ink-2); max-width: 44ch; }
.hero__ctas { grid-column: 8 / -1; justify-self: end; display: flex; align-items: center; gap: 28px; }
.hero__meta {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.sq-dot { display: inline-block; width: 7px; height: 7px; margin-right: 10px; background: #1fb85b; animation: blink 2s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }


/* ==========================================================================
   Work
   ========================================================================== */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 40px); row-gap: clamp(56px, 7vw, 96px); }
.card { display: block; min-width: 0; }
.card__media { position: relative; overflow: hidden; background: var(--soft); aspect-ratio: 4 / 3; }
.cover { width: 100%; height: 100%; transition: transform 1s var(--ease); }
.card:hover .cover { transform: scale(1.04); }
.card__body { padding-top: 20px; }
.card__title { font-size: clamp(22px, 2vw, 30px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; }
.card__desc { margin-top: 6px; color: var(--muted); max-width: 46ch; }
.card__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span, .year { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.tags span { border: 1px solid var(--line-2); padding: 5px 8px 4px; }
.year { color: var(--muted); }

/* ==========================================================================
   Services: folders
   ========================================================================== */
.services { background: var(--soft); }
.folders {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1040px;
  margin-inline: auto;
  column-gap: clamp(32px, 6vw, 96px);
  row-gap: clamp(112px, 12vw, 168px);
  padding-top: clamp(80px, 9vw, 120px);
}
.folder { position: relative; outline: none; }
.folder__visual { position: relative; aspect-ratio: 5 / 4; perspective: 1000px; }
.folder__back {
  position: absolute; left: 0; right: 0; bottom: 0; top: 26px;
  background: #d9d9d3;
}
.folder__back::before { /* tab */
  content: ""; position: absolute; left: 0; top: -25px;
  width: 44%; height: 26px;
  background: #d9d9d3;
  clip-path: polygon(0 0, 76% 0, 100% 100%, 0 100%);
}
.folder__papers { position: absolute; left: 7%; right: 7%; top: 40px; bottom: 16%; }
.paper {
  position: absolute; inset: 0;
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3;
  transform-origin: 50% 100%;
  /* closed: tucked low enough that only blank paper edges peek out */
  transform: translateY(calc(var(--i) * 3px + 8%));
  transition: transform .7s var(--ease);
  transition-delay: calc((3 - var(--i)) * 30ms);
}
.paper span { font-family: var(--f-mono); font-size: 11px; color: var(--muted); letter-spacing: .06em; font-weight: 400; }
/* papers rise to staggered heights like index cards, so every label stays readable */
.paper:nth-child(1) { --i: 0; --r: -3deg;  --x: -5%; --y: -78%; }
.paper:nth-child(2) { --i: 1; --r: -1deg;  --x: -2%; --y: -61%; }
.paper:nth-child(3) { --i: 2; --r: 1deg;   --x: 2%;  --y: -44%; }
.paper:nth-child(4) { --i: 3; --r: 3deg;   --x: 5%;  --y: -27%; }
.paper:nth-child(4)::after { content: ""; position: absolute; right: 14px; top: 15px; width: 8px; height: 8px; background: var(--pixel); }
.folder:hover, .folder.is-open, .folder:focus-visible { z-index: 2; }

.folder__front {
  position: absolute; left: 0; right: 0; bottom: 0; height: 74%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(16px, 1.8vw, 24px);
  background: linear-gradient(180deg, #efefea 0%, #e5e5df 100%);
  border-top: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 -1px 0 rgba(0, 0, 0, .04);
  transform-origin: 50% 100%;
  transition: transform .7s var(--ease), box-shadow .7s var(--ease);
}
.folder__num, .folder__count { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.folder__name { font-size: clamp(22px, 2.1vw, 32px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; }
.folder__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
/* Subtle "best seller" flag: a small white sticker with the pixel */
.folder__badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 8px 4px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.folder__badge::before { content: ""; width: 6px; height: 6px; background: var(--pixel); flex: none; }
.folder__desc { margin-top: 18px; color: var(--muted); max-width: 40ch; }
.folder__enquire { display: none; margin-top: 10px; font-weight: 500; border-bottom: 1px solid currentColor; }

.folder.is-open .folder__front,
.folder:focus-visible .folder__front { transform: rotateX(-34deg); box-shadow: 0 -18px 30px rgba(0, 0, 0, .06); }
.folder.is-open .paper,
.folder:focus-visible .paper {
  transform: translate(var(--x), var(--y)) rotate(var(--r));
  transition-delay: calc(var(--i) * 45ms);
}
@media (hover: hover) and (pointer: fine) {
  .folder:hover .folder__front { transform: rotateX(-34deg); box-shadow: 0 -18px 30px rgba(0, 0, 0, .06); }
  .folder:hover .paper { transform: translate(var(--x), var(--y)) rotate(var(--r)); transition-delay: calc(var(--i) * 45ms); }
}
@media (hover: none), (pointer: coarse) {
  .folder.is-open .folder__enquire { display: inline-block; }
}
.folder:focus-visible .folder__visual { outline: 2px solid var(--pixel); outline-offset: 6px; }

/* ==========================================================================
   About (dark) with the flip-card portrait
   ========================================================================== */
.about { background: var(--dark); color: var(--on-dark); }
.about .eyebrow { color: var(--on-dark-muted); }
.about__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 56px; align-items: center; }
.about__media { grid-column: 1 / span 5; }
.about__content { grid-column: 7 / -1; display: grid; gap: 28px; }
.about__body { display: grid; gap: 18px; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.6; color: #c9c9c4; max-width: 56ch; }
.about__facts {
  display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 24px; row-gap: 22px;
  margin-top: 12px;
  border-top: 1px solid var(--dark-line);
}
.about__facts > div { padding-top: 18px; }
.about__facts dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-muted); }
.about__facts dd { margin-top: 8px; font-size: clamp(20px, 1.8vw, 26px); letter-spacing: -0.03em; font-weight: 500; }

/* Flip card: tilt toward the pointer, glare, click or drag to flip (motion in main.js) */
.flip {
  --gx: 50%; --gy: 50%;
  position: relative;
  width: 100%; max-width: 460px;
  aspect-ratio: 4 / 5;
  perspective: 1100px;
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
  outline: none;
}
.flip__rotor { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.flip__face {
  position: absolute; inset: 0;
  overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
}
.flip__face::after { /* glare */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .22), transparent 55%);
  opacity: 0; transition: opacity .35s var(--ease);
}
.flip.is-hover .flip__face::after { opacity: 1; }
/* each face sits a hair toward its own side so their edges never bleed through */
.flip__face--front { background: #161616; transform: translateZ(1px); }
.flip__face--front img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; pointer-events: none; -webkit-user-drag: none; }
.flip__face--back {
  transform: rotateY(180deg) translateZ(1px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  padding: clamp(24px, 3vw, 40px);
  background: #1a1a19;
  box-shadow: inset 0 0 0 1px var(--dark-line), 0 30px 70px rgba(0, 0, 0, .45);
}
.flip__name { font-size: clamp(30px, 3vw, 44px); font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.flip__role { margin-top: 12px; color: var(--on-dark-muted); font-size: 17px; }
.flip__list { display: grid; border-top: 1px solid var(--dark-line); }
.flip__list li { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--dark-line); font-weight: 500; }
.flip__list span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-muted); font-weight: 400; padding-top: 3px; }
.flip__hint {
  position: absolute; left: 14px; bottom: 14px;
  padding: 7px 10px 6px;
  background: rgba(14, 14, 14, .72); color: #fff;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
}
.flip__face--back .flip__hint { position: static; align-self: flex-start; background: var(--pixel); }
.flip:focus-visible .flip__rotor { outline: 2px solid var(--pixel); outline-offset: 6px; }

/* ==========================================================================
   Process
   ========================================================================== */
.process { padding-top: var(--sec-pad); }
.process__head { margin-bottom: clamp(24px, 4vw, 48px); }
.process__pin { min-height: 100vh; display: flex; align-items: center; padding-block: calc(var(--nav-h) + 16px) 40px; }
.process__wrap { display: flex; flex-direction: column; gap: clamp(40px, 6vh, 72px); }

.timeline__track { position: relative; height: 1px; background: var(--line-2); }
.timeline__fill { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.timeline__mark { position: absolute; top: -5px; left: 0; width: 11px; height: 11px; margin-left: -5px; background: var(--pixel); }
.timeline__steps { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 22px; }
.timeline__steps button { font-family: var(--f-mono); font-size: 14px; color: var(--muted); padding: 4px 0; transition: color .3s; }
.timeline__steps button.is-active { color: var(--ink); }

.process__body { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: center; }
.steps { grid-column: 1 / span 6; display: grid; gap: 56px; }
html.process-pinned .steps { gap: 0; }
html.process-pinned .step { grid-area: 1 / 1; }
html:not(.process-pinned) .timeline,
html:not(.process-pinned) .grid-art { display: none; }
html:not(.process-pinned) .process__pin { min-height: 0; padding-block: 0 var(--sec-pad); }
.step__title { font-size: clamp(48px, 6vw, 96px); line-height: .95; letter-spacing: -0.05em; font-weight: 500; }
.step__text { margin-top: 20px; font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-2); max-width: 40ch; }
.step__note {
  margin-top: 32px; padding-left: 18px;
  border-left: 2px solid var(--pixel);
  font-family: var(--f-serif); font-style: italic; font-size: clamp(19px, 1.6vw, 24px); line-height: 1.35;
  color: var(--ink); max-width: 40ch;
}
.step__note span { display: block; margin-bottom: 6px; font-family: var(--f-mono); font-style: normal; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.grid-art {
  grid-column: 8 / span 5;
  position: relative;
  width: 100%; max-width: 520px; justify-self: end;
  aspect-ratio: 1;
  background: var(--soft);
}
.grid-art .cell { position: absolute; left: 0; top: 0; background: var(--ink); will-change: transform; }
.grid-art .cell.is-hero { background: var(--pixel); z-index: 1; }

/* Desktop pinned mode: only the active step is shown */
html.process-pinned .step { opacity: 0; visibility: hidden; }
html.process-pinned .step.is-active { opacity: 1; visibility: visible; }

/* ==========================================================================
   Testimonials (horizontal track on white)
   ========================================================================== */
.testimonials { background: #fff; }
.t-pin { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 40px; padding-block: calc(var(--nav-h) + 24px) 40px; overflow: hidden; }
.t-track { display: flex; align-items: stretch; gap: clamp(20px, 2.4vw, 32px); width: max-content; padding-inline: var(--gutter); will-change: transform; }
.t-panel, .t-card { flex: none; min-height: min(62vh, 560px); }
.t-panel { display: flex; flex-direction: column; justify-content: center; }
.t-panel--intro { width: min(34vw, 460px); padding-right: 24px; }
.t-panel--intro .h2 { margin: 20px 0 22px; }
.t-panel__text { color: var(--muted); font-size: 18px; max-width: 26ch; }
.t-hint { margin-top: 36px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.t-hint--touch { display: none; }
@media (max-width: 899px) {
  .t-hint--desk { display: none; }
  .t-hint--touch { display: inline; }
}
.t-card {
  width: min(64vw, 880px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: clamp(28px, 3.6vw, 56px);
  border: 1px solid var(--line);
  background: #fff;
}
.t-card__project { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.t-card__quote { font-size: clamp(28px, 3.2vw, 50px); line-height: 1.12; letter-spacing: -0.035em; font-weight: 400; max-width: 22ch; }
.t-card__who { display: flex; align-items: center; gap: 14px; }
.t-card__who strong { display: block; font-weight: 500; }
.t-card__who span span { display: block; color: var(--muted); font-size: 15px; }
.t-card__avatar { width: 44px; height: 44px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 600; }
.t-panel--cta { width: min(40vw, 560px); padding: clamp(28px, 3.6vw, 56px); background: var(--soft); align-items: flex-start; gap: 28px; }
.t-panel__big { font-size: clamp(30px, 3.2vw, 48px); line-height: 1.05; letter-spacing: -0.04em; font-weight: 500; max-width: 14ch; }
.t-progress { display: flex; align-items: center; gap: 24px; }
.t-progress__bar { position: relative; flex: 1; height: 1px; background: var(--line-2); }
.t-progress__mark { position: absolute; top: -5px; left: 0; width: 11px; height: 11px; background: var(--pixel); }
.t-progress__count { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 40px; }
.faq__grid > .sec-head { grid-column: 1 / span 5; margin: 0; }
.faq__list { grid-column: 7 / -1; border-bottom: 1px solid var(--line); }
.qa { border-top: 1px solid var(--line); }
.qa summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 0;
  font-size: clamp(19px, 1.6vw, 24px); font-weight: 500; letter-spacing: -0.025em;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa__icon { position: relative; flex: none; width: 14px; height: 14px; }
.qa__icon::before, .qa__icon::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 2px; background: currentColor; transition: transform .35s var(--ease), background .2s; }
.qa__icon::after { transform: rotate(90deg); }
.qa[open] .qa__icon::after { transform: rotate(0); }
.qa[open] .qa__icon::before { background: var(--pixel); }
.qa__a { padding: 0 48px 28px 0; color: var(--muted); font-size: 17px; max-width: 60ch; animation: qa-in .45s var(--ease); }
@keyframes qa-in { from { opacity: 0; transform: translateY(-6px); } }

/* ==========================================================================
   Contact + form
   ========================================================================== */
.contact { padding-top: 0; }
.contact__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 48px; align-items: start; }
.contact__intro { grid-column: 1 / span 5; position: sticky; top: calc(var(--nav-h) + 32px); }
.contact__intro .h2 { margin: 20px 0 24px; }
.contact__lede { color: var(--muted); font-size: 18px; max-width: 40ch; }
.contact__list { margin-top: 40px; border-top: 1px solid var(--line); }
.contact__list li { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.contact__list .k { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contact__list .v { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 500; }
.contact__list a { border-bottom: 1px solid transparent; transition: border-color .2s; }
.contact__list a:hover { border-color: currentColor; }
.copy { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px 4px; border: 1px solid var(--line-2); color: var(--ink-2); transition: background .2s, color .2s; }
.copy:hover { background: var(--ink); color: #fff; }

.form {
  grid-column: 7 / -1;
  display: grid; gap: 22px;
  padding: clamp(24px, 3.4vw, 48px);
  background: var(--soft);
}
.form__head { padding-bottom: 22px; border-bottom: 1px solid var(--line-2); }
.form__head h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 500; letter-spacing: -0.03em; }
.form__head p { margin-top: 6px; font-size: 14px; color: var(--muted); }
.form i { font-style: normal; color: var(--pixel); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field label, .field legend { font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 0; }
.field legend { margin-bottom: 10px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 0;
  -webkit-appearance: none; appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { height: auto; min-height: 140px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: #a5a5a0; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.field__err { display: none; font-size: 13px; color: #c4320a; }
.field.is-invalid .field__err { display: block; }
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid .phone { border-color: #c4320a; }

.phone { display: flex; height: 52px; background: #fff; border: 1px solid var(--line-2); transition: border-color .2s, box-shadow .2s; }
.phone:focus-within { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.phone__cc { position: relative; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 10px 0 14px; border-right: 1px solid var(--line-2); font-size: 15px; }
.phone__iso { font-family: var(--f-mono); font-size: 10px; letter-spacing: .06em; padding: 3px 4px 2px; background: var(--ink); color: #fff; }
.phone__dial { font-variant-numeric: tabular-nums; }
.phone__caret { width: 12px; height: 12px; color: var(--muted); }
.phone__cc select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; }
.phone .field-input, .phone input[type="tel"] { flex: 1; height: 100%; border: 0 !important; box-shadow: none !important; background: transparent; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; height: 40px; padding: 0 14px;
  background: #fff; border: 1px solid var(--line-2);
  font-size: 14px;
  transition: background .2s, color .2s, border-color .2s;
}
.chip span::before { content: ""; width: 7px; height: 7px; margin-right: 9px; border: 1px solid var(--line-2); transition: background .2s, border-color .2s; }
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip input:checked + span::before { background: var(--pixel); border-color: var(--pixel); }
.chip input:focus-visible + span { outline: 2px solid var(--pixel); outline-offset: 2px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 6px; }
.form__note { font-size: 13px; color: var(--muted); }
.form__status { font-size: 15px; font-weight: 500; }
.form__status:empty { display: none; }
.form__status.is-ok::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; background: var(--pixel); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--dark); color: var(--on-dark); overflow: hidden; }
.footer__values { border-bottom: 1px solid var(--dark-line); }
.footer__values-row { display: flex; justify-content: center; gap: clamp(24px, 6vw, 96px); padding-block: 22px; flex-wrap: wrap; }
.footer__values-row div { display: flex; align-items: center; gap: 14px; font-size: 15px; color: #c9c9c4; }
.ico { width: 36px; height: 36px; flex: none; display: grid; place-items: center; background: #1c1c1b; position: relative; }
.ico::after { content: ""; width: 10px; height: 10px; }
.ico--fill::after { background: var(--pixel); }
.ico--line::after { border: 2px solid var(--pixel); }
.ico--split::after { background: linear-gradient(135deg, var(--pixel) 50%, transparent 50%); border: 1px solid var(--pixel); }

.footer__main {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 48px;
  padding-block: clamp(64px, 8vw, 104px);
}
.footer__brand { grid-column: 1 / span 4; }
.footer__logo { display: inline-block; font-size: clamp(30px, 3vw, 44px); font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.footer__why { margin-top: 24px; color: var(--on-dark-muted); max-width: 38ch; }
.footer__why strong { font-weight: 500; color: var(--on-dark); }
.footer__follow { margin-top: 28px; font-weight: 500; }
.socials { display: flex; gap: 8px; margin-top: 12px; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--dark-line); color: var(--on-dark); transition: background .2s, color .2s, border-color .2s; }
.socials a:hover { background: var(--pixel); color: #fff; border-color: var(--pixel); }
.socials svg { width: 18px; height: 18px; }
.footer__col { grid-column: span 2; }
.footer__col:nth-of-type(1) { grid-column: 7 / span 2; }
.footer__col:last-child { grid-column: span 2; }
.footer__col h4 { font-size: 17px; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 18px; }
.footer__col li + li { margin-top: 10px; }
.footer__col a { color: var(--on-dark-muted); transition: color .2s; }
.footer__col a:hover { color: var(--pixel); }
.footer__col address { font-style: normal; color: var(--on-dark-muted); margin-bottom: 14px; }
.footer__start { font-weight: 500; color: var(--on-dark) !important; border-bottom: 1px solid currentColor; }

/* Closing line: "It starts with PIXEL■", sized to the full width in main.js */
.footer__word { padding-inline: var(--gutter); max-width: var(--max); margin-inline: auto; }
.footer__word-text {
  display: inline-block; /* shrink-wraps the text so the fit script can measure it */
  font-size: 12vw; /* refined by the fit script */
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: .82;
  white-space: nowrap;
  color: var(--on-dark);
  padding-bottom: .06em;
}
.footer__word-sq { display: inline-block; width: .2em; height: .2em; margin-left: .04em; background: var(--pixel); vertical-align: baseline; }

.footer__bar { border-top: 1px solid var(--dark-line); }
.footer__bar-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding-block: 14px; font-size: 14px; color: var(--on-dark-muted); flex-wrap: wrap; }
.footer__bar-row a { font-weight: 500; color: var(--on-dark); }
.footer__bar-row a:hover { color: var(--pixel); }
.footer__made { color: #6e6e6a; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .footer__brand { grid-column: 1 / -1; }
  .footer__col, .footer__col:nth-of-type(1), .footer__col:last-child { grid-column: span 4; }
}

@media (max-width: 899px) {
  :root { --nav-h: 64px; }
  .nav { grid-template-columns: 1fr auto; }
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; align-items: center; }
  .nav__logo { font-size: 18px; }

  .sec-head .h2, .sec-head__aside { grid-column: 1 / -1; }

  .hero__lede, .hero__ctas { grid-column: 1 / -1; }
  .hero__ctas { justify-self: start; margin-top: 28px; }
  .hero__meta .hero__scroll { display: none; }

  .cards { row-gap: 64px; }
  .cards { grid-template-columns: 1fr; }

  .folders { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 120px; }

  .about__media, .about__content { grid-column: 1 / -1; }
  .flip { max-width: 380px; }

  .process__body { display: block; }
  .step { padding-top: 32px; border-top: 1px solid var(--line); }

  .t-pin { min-height: 0; padding-block: var(--sec-pad); }
  .t-track {
    width: auto; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    scroll-padding-inline: var(--gutter);
  }
  .t-track::-webkit-scrollbar { display: none; }
  .t-panel, .t-card { min-height: 0; scroll-snap-align: start; }
  .t-panel--intro { width: 78vw; }
  .t-card { width: 84vw; }
  .t-panel--cta { width: 78vw; }
  .t-progress { display: none; }

  .faq__grid > .sec-head, .faq__list { grid-column: 1 / -1; }

  .contact__intro, .form { grid-column: 1 / -1; position: static; }
}

@media (max-width: 599px) {
  .hero__meta { flex-direction: column; gap: 6px; }
  .folders { grid-template-columns: 1fr; row-gap: 112px; max-width: 340px; }
  .row { grid-template-columns: 1fr; }
  .footer__col, .footer__col:nth-of-type(1), .footer__col:last-child { grid-column: span 6; }
  .footer__col:last-child { grid-column: 1 / -1; }
  .footer__values-row { justify-content: flex-start; flex-direction: column; gap: 14px; }
  .loader__line { white-space: normal; line-height: 1.02; }
}

@media (prefers-reduced-motion: reduce) {
  .sq-dot { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
