/* ─────────────────────────────────────────────────────────────
   Joel Varghese · Portfolio
   System: "proof sheet". Paper, ink, and one marker colour.
   Type: Archivo (variable width) · Libre Caslon Text · IBM Plex Mono
   ───────────────────────────────────────────────────────────── */

:root {
  --paper: #EEEAE1;      /* page: warm newsprint / limestone      */
  --paper-2: #E3DDCF;    /* the sheet underneath                    */
  --sheet: #F8F6F1;      /* the sheet on top                        */
  --ink: #17150F;        /* letterpress black, slightly warm        */
  --ink-2: #4D4940;      /* graphite: body copy                     */
  --ink-3: #8A8476;      /* pencil: captions, meta                  */
  --rule: #D2CBBB;       /* hairlines                               */
  --signal: #D2462A;     /* the editor's red pen                    */

  --f-display: 'Archivo', 'Arial Narrow', Arial, sans-serif;
  --f-serif: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --f-num: 'Bodoni Moda', 'Libre Caslon Text', Georgia, serif; /* numerals only */

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --shadow-sheet: 0 1px 0 rgba(23,21,15,.04), 0 18px 40px -24px rgba(23,21,15,.28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 17px;
  line-height: 1.6;
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--signal); color: var(--sheet); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--ink); color: var(--sheet); padding: 10px 14px; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 400; }

/* ── buttons ─────────────────────────────────────────────── */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; gap: 12px;
  height: var(--h); padding: 0 26px;
  border-radius: 3px; border: 1.5px solid var(--ink);
  font-family: var(--f-display); font-weight: 600; font-size: 15px; letter-spacing: .01em;
  font-variation-settings: 'wdth' 108;
  text-decoration: none; white-space: nowrap;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .3s var(--ease); }
.btn-ink { background: var(--ink); color: var(--sheet); }
.btn-line { background: transparent; color: var(--ink); }
.btn-sm { --h: 40px; padding: 0 18px; font-size: 14px; }
.btn:active { transform: translateY(1px); }

/* ── nav ─────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(238,234,225,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-color: var(--rule); }
.nav.hide { transform: translateY(-100%); }
.nav-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: 72px; display: flex; align-items: center; gap: 24px; }
.nav-logo img { height: 34px; width: auto; filter: brightness(0); }
.nav-links { margin: 0 auto; display: flex; gap: 6px; }
.nav-links a, .mobile-menu a:not(.btn) {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 8px 14px; text-decoration: none;
  font-weight: 600; font-size: 14px; letter-spacing: .06em; text-transform: uppercase;
  font-variation-settings: 'wdth' 112;
  position: relative;
}
.nav-links a span, .mobile-menu a span { font-family: var(--f-mono); font-size: 10px; color: var(--ink-3); font-weight: 400; }
.nav-links a::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1.5px; background: var(--signal); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav-links a.on::after { transform: scaleX(1); }
.nav-burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 1.5px solid var(--ink); border-radius: 3px; background: transparent; position: relative; }
.nav-burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
.nav-burger span:first-child { top: 16px; } .nav-burger span:last-child { top: 25px; }
.nav-burger[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
.mobile-menu[hidden] { display: none; }
.mobile-menu { background: var(--paper); border-bottom: 1px solid var(--rule); padding: 8px var(--gutter) 24px; display: grid; gap: 4px; }
.mobile-menu a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 20px; }
.mobile-menu .btn { margin-top: 16px; justify-content: center; }

/* ── hero ──────────────────────────────────────────────── */
.hero { position: relative; padding: 112px 0 clamp(40px, 6vh, 64px); min-height: 100svh; display: flex; }
.hero > .wrap { display: flex; flex-direction: column; }
.hero-title { margin: auto 0; padding: clamp(24px, 5vh, 56px) 0; }
.hero-word {
  display: block; white-space: nowrap;
  font-weight: 860; font-variation-settings: 'wdth' 125;
  /* sized so "PORTFOLIO." spans the content width exactly */
  font-size: min(178px, calc((min(100vw, var(--max)) - 2 * var(--gutter)) / 7.72));
  line-height: .8; letter-spacing: -.035em; text-transform: uppercase;
  margin-left: -.045em;
  overflow: clip; overflow-clip-margin: .06em; padding-top: .04em;
}
.hero-word .ch { display: inline-block; animation: ch-rise 1.05s var(--ease) both; animation-delay: calc(.08s + var(--i) * 45ms); }
.hero-word .dot { color: var(--signal); }
.hero-name {
  display: block;
  font-family: var(--f-serif); font-style: italic; font-weight: 400;
  font-size: clamp(36px, 6.4vw, 100px); line-height: 1.12; letter-spacing: -.015em;
  margin: clamp(14px, 2.4vw, 34px) 0 0 clamp(2px, 10.5vw, 176px);
  padding-bottom: .1em;
}
.hero-foot { display: grid; grid-template-columns: 1fr auto; gap: clamp(24px, 4vw, 64px); align-items: end; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-disc { text-align: right; display: grid; gap: 8px; padding-top: 18px; border-top: 1.5px solid var(--ink); min-width: 260px; }
.hero-disc .lead { font-weight: 750; font-variation-settings: 'wdth' 112; font-size: 21px; line-height: 1.15; text-transform: uppercase; letter-spacing: .01em; }
.hero-disc .mono { color: var(--ink-2); font-size: 12px; letter-spacing: .18em; }

/* hero entrance */
.hero-name, .hero-foot > * { animation: rise 1s var(--ease) both; }
.hero-name { animation-delay: .55s; }
.hero-foot > :nth-child(1) { animation-delay: .7s; }
.hero-foot > :nth-child(2) { animation-delay: .78s; }
@keyframes rise { from { opacity: 0; transform: translateY(32px); } }
@keyframes ch-rise { from { transform: translateY(105%); } }

/* ── tape ────────────────────────────────────────────────── */
.tape { background: var(--ink); color: var(--paper); overflow: hidden; padding: 18px 0; transform: rotate(-1.2deg); margin: 8px -20px 0; position: relative; z-index: 3; }
.tape-track { display: flex; align-items: center; gap: 28px; padding-right: 28px; width: max-content; animation: tape 38s linear infinite; }
.tape-track span { font-weight: 700; font-variation-settings: 'wdth' 120; font-size: clamp(18px, 2.2vw, 28px); text-transform: uppercase; letter-spacing: .01em; white-space: nowrap; }
.tape-track b { width: 10px; height: 10px; background: var(--signal); flex: none; }
@keyframes tape { to { transform: translateX(-50%); } }

/* ── section heads ───────────────────────────────────────── */
main { overflow-x: clip; }
section { position: relative; }
.sec-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px 32px; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-title {
  font-weight: 860; font-variation-settings: 'wdth' 125;
  font-size: clamp(42px, 7vw, 96px); line-height: .9; letter-spacing: -.035em; text-transform: uppercase;
}
.sec-title i { font-style: normal; color: var(--signal); }
.sec-title em { font-style: normal; color: var(--signal); }
.sec-aside { font-family: var(--f-serif); font-style: italic; font-size: clamp(19px, 2vw, 26px); color: var(--ink-2); max-width: 24ch; text-align: right; line-height: 1.3; }

/* ── services: stacked sheets ────────────────────────────── */
.services { padding: clamp(96px, 12vw, 160px) 0 clamp(80px, 10vw, 140px); }
.svc-stack { display: grid; gap: 28px; }
.svc {
  position: sticky; top: calc(100px + var(--i) * 26px);
  display: grid; grid-template-columns: clamp(110px, 12vw, 170px) 1.1fr 1.4fr; grid-template-rows: auto 1fr; gap: 12px 40px;
  min-height: 300px; padding: clamp(28px, 4vw, 48px);
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px;
  box-shadow: var(--shadow-sheet);
}
.svc:nth-child(2) { background: var(--paper-2); }
.svc:nth-child(3) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.svc-num { grid-column: 1; grid-row: 1 / 3; align-self: start; font-family: var(--f-num); font-style: italic; font-weight: 800; font-variation-settings: 'opsz' 11; font-size: clamp(76px, 8.6vw, 128px); line-height: .78; letter-spacing: -.02em; color: var(--signal); }
.svc h3 { grid-column: 2; grid-row: 1 / 3; font-weight: 800; font-variation-settings: 'wdth' 118; font-size: clamp(28px, 3.4vw, 46px); line-height: .98; letter-spacing: -.02em; text-transform: uppercase; }
.svc p { grid-column: 3; grid-row: 1; color: var(--ink-2); font-size: 17px; max-width: 48ch; }
.svc:nth-child(3) p { color: #CFC8B9; }
.tags { grid-column: 3; grid-row: 2; align-self: end; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border: 1px solid currentColor; border-radius: 2px; opacity: .8; }

/* ── about ───────────────────────────────────────────────── */
.about { padding: clamp(96px, 12vw, 160px) 0; background: var(--paper-2); }
.about::before { content: ''; position: absolute; inset: 0 0 auto; height: 1px; background: var(--rule); }
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
.about-copy .sec-title { margin: 0 0 28px; }
.about-hi { font-family: var(--f-serif); font-style: italic; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.15; margin-bottom: 24px; }
.about-copy > p:not(.about-hi) { color: var(--ink-2); max-width: 58ch; margin-bottom: 18px; font-size: 18px; }
.connect { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--rule); display: grid; gap: 12px; justify-items: start; }
.connect-title { font-family: var(--f-serif); font-style: italic; font-size: 26px; margin-bottom: 4px; }
.line-link { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; font-size: 17px; background: linear-gradient(var(--signal), var(--signal)) 0 100% / 0 1.5px no-repeat; padding-bottom: 2px; transition: background-size .35s var(--ease); }
.line-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.portrait { position: relative; justify-self: end; width: min(100%, 440px); margin-top: 24px; }
.portrait-photo { position: relative; z-index: 2; border-radius: 8px; overflow: hidden; background: var(--paper); }
.portrait-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.portrait-layers i { position: absolute; inset: 0; bottom: 74px; border-radius: 8px; }
.portrait-layers i:first-child { background: var(--sheet); border: 1px solid var(--rule); transform: translate(-22px, 22px) rotate(-3deg); }
.portrait-layers i:last-child { border: 1.5px solid var(--signal); transform: translate(18px, -18px); }
.stamp { position: absolute; z-index: 3; left: -92px; top: 56px; width: clamp(124px, 11.5vw, 158px); height: auto; color: var(--signal); opacity: .92; transform: rotate(-13deg); pointer-events: none; }
.socials { position: relative; z-index: 2; display: flex; gap: 10px; justify-content: center; margin-top: 26px; }
.socials a { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; transition: background .25s var(--ease), color .25s var(--ease); }
.socials svg { width: 19px; height: 19px; fill: currentColor; }
.socials svg.stroke { fill: none; stroke: currentColor; stroke-width: 1.6; }

/* ── skills ──────────────────────────────────────────────── */
.skills { padding: clamp(96px, 12vw, 160px) 0 clamp(64px, 8vw, 110px); overflow: hidden; }
.certs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; border-top: 1.5px solid var(--ink); }
.certs a { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--rule); text-decoration: none; transition: padding .35s var(--ease); }
.certs .n { font-family: var(--f-num); font-style: italic; font-weight: 800; font-variation-settings: 'opsz' 11; font-size: 30px; line-height: 1; color: var(--signal); }
.certs b { font-weight: 650; font-size: 17px; line-height: 1.35; }
.certs em { font-style: normal; color: var(--ink-3); font-size: 11px; }
.tools { margin-top: clamp(56px, 7vw, 88px); overflow: hidden; }
.tools-track { display: flex; width: max-content; padding: 10px 0; animation: tools var(--loop, 30s) linear infinite; }
@keyframes tools { to { transform: translateX(-50%); } }
.tool { width: 150px; height: 150px; flex: none; margin-right: 16px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; display: grid; grid-template-rows: 1fr auto; justify-items: center; padding: 26px 12px 16px; }
.tool img { width: 48px; height: 48px; object-fit: contain; align-self: center; }
.tool span { font-weight: 600; font-size: 13px; text-align: center; line-height: 1.2; }

/* ── work: arc carousel ──────────────────────────────────── */
.work { padding: clamp(96px, 12vw, 160px) 0 clamp(80px, 10vw, 130px); background: var(--sheet); border-top: 1px solid var(--rule); }
.work .sec-head { margin-bottom: clamp(16px, 3vw, 32px); }
.arc {
  --cw: clamp(196px, 21vw, 312px);
  --ch: calc(var(--cw) * 1.42);
  position: relative; height: calc(var(--ch) * 1.32); overflow: hidden;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  cursor: grab; isolation: isolate;
}
.arc.dragging { cursor: grabbing; }
.arc-ring { position: absolute; left: 50%; top: calc(var(--ch) * .14); width: 0; height: 0; }
.card {
  contain: paint;
  position: absolute; left: 0; top: 0;
  width: var(--cw); height: var(--ch);
  margin-left: calc(var(--cw) / -2);
  border: 0; padding: 0; border-radius: 18px; overflow: hidden;
  background: var(--c); color: #fff;
  container-type: size;
  box-shadow: 0 30px 50px -28px rgba(23,21,15,.55), 0 2px 6px rgba(23,21,15,.12);
  will-change: transform;
  text-align: left;
}
.card-inner { position: absolute; inset: 0; transition: transform .45s var(--ease); }
.card .card-logo { position: absolute; left: 50%; top: 11cqh; transform: translate(-50%, -50%); max-width: 66cqw; max-height: 16cqh; width: auto; height: auto; object-fit: contain; }
.card .logo-white { filter: brightness(0) invert(1); }
.card .logo-ink { filter: brightness(0); }
.card .logo-tall { max-height: 19cqh; top: 13cqh; }
.card .logo-mid { max-width: 54cqw; max-height: 14cqh; }
.card .logo-plate { background: #fff; padding: 2.4cqw 3.4cqw; border-radius: 1.4cqw; max-width: 64cqw; }
.card-tag { position: absolute; left: 6cqw; bottom: 5cqw; z-index: 4; font-family: var(--f-mono); font-size: max(9px, 3.6cqw); letter-spacing: .08em; text-transform: uppercase; background: rgba(23,21,15,.86); color: #F8F6F1; padding: 1.4cqw 2.6cqw; border-radius: 1cqw; opacity: 0; transform: translateY(6px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.card.is-light { color: var(--ink); }

/* device mockups, all sized in card container units */
.dev { position: absolute; }
.dev img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.laptop { width: 118cqw; left: 12cqw; bottom: 9cqh; }
.laptop .screen { aspect-ratio: 16 / 10; background: #0d0d0d; border-radius: 3.2cqw 3.2cqw 0 0; padding: 2.2cqw 2.2cqw 2.8cqw; box-shadow: 0 0 0 .5cqw #2a2a2a inset; }
.laptop .screen img { border-radius: .6cqw; }
.laptop .base { height: 3.4cqw; margin: 0 -8cqw; background: #cfd0d4; border-radius: 0 0 3cqw 3cqw; position: relative; box-shadow: 0 2cqw 4cqw -1cqw rgba(0,0,0,.4); }
.laptop .base::after { content: ''; position: absolute; left: 50%; top: 0; width: 18cqw; height: 1.4cqw; transform: translateX(-50%); background: #b2b3b8; border-radius: 0 0 1.2cqw 1.2cqw; }
.phone { width: 42cqw; aspect-ratio: 9 / 19.2; background: #0d0d0d; border-radius: 6.4cqw; padding: 1.6cqw; box-shadow: 0 0 0 .5cqw #33302c, 0 3cqw 6cqw -2cqw rgba(0,0,0,.5); }
.phone img { border-radius: 5cqw; }
.phone::before { content: ''; position: absolute; left: 50%; top: 3.2cqw; width: 12cqw; height: 3.2cqw; transform: translateX(-50%); background: #0d0d0d; border-radius: 2cqw; z-index: 2; }
.tablet { width: 112cqw; aspect-ratio: 4 / 3; left: 10cqw; bottom: 10cqh; background: #0d0d0d; border-radius: 5cqw; padding: 3cqw; box-shadow: 0 0 0 .5cqw #2b2b2b, 0 3cqw 6cqw -2cqw rgba(0,0,0,.45); transform: rotate(-4deg); }
.tablet img { border-radius: 2cqw; object-position: left top; }

.m-laptop-phone .laptop { left: -6cqw; bottom: 22cqh; width: 108cqw; }
.m-laptop-phone .phone { right: 6cqw; bottom: -12cqh; width: 40cqw; }
.m-two-phones .phone.a { left: 8cqw; bottom: -10cqh; transform: rotate(-6deg); }
.m-two-phones .phone.b { right: 4cqw; bottom: -2cqh; transform: rotate(5deg); }
.m-two-phones .phone img { object-position: center; }
.m-posters .poster { position: absolute; width: 50cqw; aspect-ratio: 5 / 7; border-radius: 1.6cqw; overflow: hidden; box-shadow: 0 3cqw 7cqw -2cqw rgba(0,0,0,.5); }
.m-posters .poster.a { left: 4cqw; bottom: 8cqh; transform: rotate(-9deg); }
.m-posters .poster.b { left: 26cqw; bottom: 14cqh; transform: rotate(1deg); z-index: 2; }
.m-posters .poster.c { right: -2cqw; bottom: 4cqh; transform: rotate(10deg); width: 46cqw; aspect-ratio: 1; }

.arc-controls { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.ctl { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--ink); background: transparent; display: grid; place-items: center; transition: background .25s var(--ease), color .25s var(--ease); }
.ctl svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.ctl .i-play { display: none; fill: currentColor; stroke: none; }
.ctl[aria-pressed="true"] .i-play { display: block; }
.ctl[aria-pressed="true"] .i-pause { display: none; }
.arc-hint { margin-left: auto; color: var(--ink-3); }

.index { margin-top: clamp(48px, 6vw, 80px); border-top: 1.5px solid var(--ink); }
.index li { border-bottom: 1px solid var(--rule); }
.index button {
  width: 100%; display: grid; grid-template-columns: clamp(72px, 7vw, 104px) 1.3fr 1fr 110px 28px; gap: 16px; align-items: center;
  padding: 22px 0; background: none; border: 0; text-align: left; position: relative;
}
.index button::before { content: ''; position: absolute; inset: 0 -12px; background: var(--paper); border-radius: 6px; transform: scaleY(.4); opacity: 0; transition: transform .35s var(--ease), opacity .25s; z-index: -1; }
.index .n { font-family: var(--f-num); font-style: italic; font-weight: 800; font-variation-settings: 'opsz' 11; font-size: clamp(38px, 3.8vw, 56px); line-height: .9; color: var(--ink); transition: color .3s var(--ease); }
.index .t { font-weight: 750; font-variation-settings: 'wdth' 115; font-size: clamp(20px, 2.4vw, 30px); letter-spacing: -.01em; display: flex; align-items: center; gap: 14px; }
.index .t i { width: 12px; height: 12px; border-radius: 2px; background: var(--c); flex: none; }
.index .t em { font-style: normal; font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; background: var(--signal); color: var(--sheet); padding: 3px 7px; border-radius: 2px; }
.index .k, .index .y { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.index svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.6; transition: transform .3s var(--ease); }

/* ── contact ─────────────────────────────────────────────── */
.contact { padding: clamp(96px, 12vw, 160px) 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 7vw, 110px); align-items: start; }

.contact-list { margin-top: 44px; display: grid; gap: 14px; }
.contact-list a { display: inline-flex; align-items: center; gap: 16px; text-decoration: none; font-weight: 600; font-size: 18px; }
.ci { width: 46px; height: 46px; border: 1.5px solid var(--ink); border-radius: 3px; display: grid; place-items: center; flex: none; transition: background .25s var(--ease); }
.ci svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.5; }
.ci svg.fill { fill: var(--ink); stroke: none; }
.form-stack { position: relative; }
.form-under { position: absolute; inset: 0; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 14px; transform: translate(16px, 16px) rotate(1.4deg); }
.form { position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; padding: clamp(24px, 4vw, 44px); display: grid; gap: 22px; box-shadow: var(--shadow-sheet); }
.field { display: grid; gap: 6px; }
.field span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1.5px solid var(--rule); border-radius: 0;
  padding: 8px 0 10px; outline: none; transition: border-color .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { border-color: var(--ink); }
.field.bad input, .field.bad textarea { border-color: var(--signal); }
.err { font-style: normal; font-size: 13px; color: var(--signal); min-height: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.form .btn { justify-self: start; }
.form .btn[disabled] { opacity: .6; pointer-events: none; }
.form-status { font-size: 15px; min-height: 1.4em; }
.form-status.ok { color: #2E6B45; }
.form-status.fail { color: var(--signal); }

/* ── footer ──────────────────────────────────────────────── */
.footer { background: var(--ink); color: #BDB6A7; padding: clamp(64px, 8vw, 104px) 0 calc(92px + env(safe-area-inset-bottom)); } /* room for the back-to-top button */
.footer-grid { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 48px clamp(32px, 6vw, 96px); padding-bottom: clamp(44px, 5vw, 64px); }
.footer-main { display: grid; justify-items: start; gap: 30px; }
.footer-logo { display: block; }
.footer-logo img { height: clamp(44px, 4.4vw, 58px); width: auto; filter: brightness(0) invert(1); }
.footer-nav { display: grid; gap: 4px; }
.footer-nav a { color: var(--paper); text-decoration: none; font-weight: 700; font-variation-settings: 'wdth' 112; font-size: 19px; letter-spacing: .04em; text-transform: uppercase; padding: 6px 0; width: max-content; background: linear-gradient(var(--signal), var(--signal)) 0 calc(100% - 4px) / 0 1.5px no-repeat; transition: background-size .35s var(--ease); }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 46px; height: 46px; border-radius: 50%; background: var(--sheet); display: grid; place-items: center; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.footer-social svg, .footer-social img { width: 22px; height: 22px; }
.footer-contact { display: grid; gap: 8px; }
.footer-contact a { color: #CFC8B9; text-decoration: none; font-size: 16px; width: max-content; max-width: 100%; overflow-wrap: anywhere; }
.footer-name { margin: 0; justify-self: end; text-align: right; color: var(--paper); font-weight: 900; font-variation-settings: 'wdth' 125; /* "VARGHESE" is ~7.07em wide: size it to the space beside the link column */ font-size: min(152px, calc((min(100vw, var(--max)) - 2 * var(--gutter) - 360px) / 7.3)); line-height: .84; letter-spacing: -.04em; text-transform: uppercase; }
.footer-name .line { overflow-clip-margin: .08em; }
.footer-row { display: flex; justify-content: flex-start; align-items: center; gap: 12px 32px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid #3A362E; font-size: 13px; }
.footer-legal { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-legal button { background: none; border: 0; padding: 6px 0; font-size: 13px; color: #BDB6A7; }

/* ── legal dialogs ───────────────────────────────────────── */
.legal { width: min(640px, calc(100vw - 32px)); max-height: 84vh; border: 1px solid var(--rule); border-radius: 14px; background: var(--sheet); color: var(--ink); padding: 32px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.5); }
.legal::backdrop { background: rgba(23,21,15,.55); }
.legal-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 8px; }
.legal h2 { font-weight: 800; font-variation-settings: 'wdth' 118; font-size: 28px; text-transform: uppercase; letter-spacing: -.01em; }
.legal h3 { font-size: 16px; font-weight: 700; margin: 22px 0 6px; }
.legal p { color: var(--ink-2); font-size: 15.5px; }
.legal-date { color: var(--ink-3); margin-bottom: 16px; font-size: 11px; }
.legal-x { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--ink); background: none; flex: none; }

/* ── reveal ──────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── case study layer ────────────────────────────────────── */
html.case-open, html.case-open body { overflow: hidden; }
.case { position: fixed; inset: 0; z-index: 120; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); -webkit-overflow-scrolling: touch; }
.case[hidden] { display: none; }
.case:focus { outline: none; }
.case-band { position: relative; background: var(--c); color: #fff; min-height: min(86svh, 760px); padding: 96px 0 140px; overflow: hidden; }
.case.light .case-band { color: var(--ink); }
.case-bar { position: fixed; z-index: 5; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px var(--gutter); pointer-events: none; }
.case-bar > * { pointer-events: auto; }
.case-bar::before { content: ''; position: absolute; inset: 0; background: rgba(238,234,225,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); opacity: 0; transition: opacity .3s var(--ease); z-index: -1; }
.case.bar-solid .case-bar::before { opacity: 1; }
.case-back { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px 0 14px; border-radius: 3px; border: 0; background: var(--ink); color: var(--sheet); font-weight: 600; font-size: 14px; font-variation-settings: 'wdth' 108; box-shadow: 0 8px 20px -10px rgba(0,0,0,.5); }
.case-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.case-back kbd { font-family: var(--f-mono); font-size: 10px; border: 1px solid #5A554B; padding: 2px 5px; border-radius: 2px; color: #BDB6A7; }
.case-pager { display: flex; gap: 8px; }
.case-pager button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: var(--sheet); display: grid; place-items: center; box-shadow: 0 8px 20px -10px rgba(0,0,0,.5); }
.case-pager svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.case-band-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.case-head { display: grid; justify-items: start; gap: clamp(18px, 2.4vw, 30px); min-width: 0; }
.case-title { margin: 0; line-height: 0; }
.case-title img { display: block; width: auto; max-width: min(100%, 560px); height: auto; max-height: clamp(64px, 9vw, 128px); object-fit: contain; }
.case-title.logo-tall img { max-height: clamp(120px, 15vw, 200px); }
.case-title.logo-mid img { max-width: min(100%, 380px); }
.case-title.logo-white img { filter: brightness(0) invert(1); }
.case-title.logo-ink img { filter: brightness(0); }
.case-title.logo-plate img { background: #fff; padding: clamp(10px, 1.4vw, 18px) clamp(14px, 2vw, 26px); border-radius: 12px; }
.case-sub { font-family: var(--f-serif); font-style: italic; font-size: clamp(22px, 2.6vw, 36px); line-height: 1.2; max-width: 26ch; text-wrap: balance; }
.case-visual { justify-self: center; position: relative; }
.case-visual .card { position: relative; margin: 0; --cw: clamp(230px, 26vw, 360px); --ch: calc(var(--cw) * 1.42); transform: rotate(3deg); box-shadow: 0 40px 80px -30px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08) inset; cursor: default; }
.case-visual .card .card-tag { display: none; }
.case-visual::before { content: ''; position: absolute; inset: 0; border-radius: 18px; background: rgba(255,255,255,.1); transform: rotate(-4deg) translate(-14px, 8px); }
.case.light .case-visual::before { background: rgba(23,21,15,.1); }

.case-sheet { position: relative; z-index: 2; margin-top: -88px; background: var(--paper); border-radius: 26px 26px 0 0; padding: clamp(40px, 6vw, 80px) 0 0; box-shadow: 0 -30px 60px -40px rgba(0,0,0,.4); }
.case-sheet::before { content: ''; position: absolute; left: 4%; right: 4%; top: -12px; height: 40px; background: var(--paper-2); border-radius: 22px 22px 0 0; z-index: -1; }
.case-lede { font-family: var(--f-serif); font-size: clamp(21px, 2.3vw, 30px); line-height: 1.42; max-width: 40ch; color: var(--ink); }
.case-top { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.case-meta { display: grid; gap: 0; border-top: 1.5px solid var(--ink); }
.case-meta div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.case-meta dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.case-meta dd { margin: 0; font-weight: 600; font-size: 16px; }
.case-live { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.case-social { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; transition: background .25s var(--ease), transform .25s var(--ease); }
.case-social img { width: 22px; height: 22px; }
.case-stats { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.case-stats div { padding: 28px 24px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--sheet); }
.case-stats b { display: block; font-weight: 860; font-variation-settings: 'wdth' 125; font-size: clamp(40px, 5vw, 68px); line-height: .9; letter-spacing: -.04em; }
.case-stats span { display: block; margin-top: 12px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }

.cs { padding: clamp(56px, 8vw, 110px) 0 0; }
.cs-head { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: clamp(28px, 4vw, 48px); align-items: baseline; }
.cs-title { font-weight: 800; font-variation-settings: 'wdth' 118; font-size: clamp(30px, 4vw, 54px); line-height: .98; letter-spacing: -.025em; text-transform: uppercase; }
.cs-intro { color: var(--ink-2); max-width: 62ch; font-size: 18px; }
.cs-text p { font-size: 19px; color: var(--ink-2); max-width: 64ch; margin-bottom: 18px; }
.cs-cards { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 14px; }
.cs-cards article { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 26px; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.cs-cards h4 { font-weight: 750; font-variation-settings: 'wdth' 110; font-size: 19px; line-height: 1.2; margin: 14px 0 10px; }
.cs-cards p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.cs-cards .n { font-family: var(--f-num); font-style: italic; font-weight: 800; font-variation-settings: 'opsz' 11; font-size: 34px; line-height: 1; color: var(--signal); }
.cs-steps { counter-reset: s; border-top: 1.5px solid var(--ink); }
.cs-steps li { display: grid; grid-template-columns: 90px 1fr 1.3fr; gap: 16px 32px; padding: 30px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.cs-steps .sn { font-family: var(--f-num); font-style: italic; font-weight: 800; font-variation-settings: 'opsz' 11; font-size: 72px; line-height: .8; color: var(--signal); }
.cs-steps .sk { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.cs-steps h4 { font-weight: 750; font-variation-settings: 'wdth' 112; font-size: 22px; line-height: 1.2; }
.cs-steps p { color: var(--ink-2); font-size: 16px; }
.cs-list { border-top: 1.5px solid var(--ink); }
.cs-list li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--rule); font-size: 19px; line-height: 1.45; }
.cs-list .ln { font-family: var(--f-num); font-style: italic; font-weight: 800; font-variation-settings: 'opsz' 11; font-size: 30px; line-height: 1; color: var(--signal); }
.cs-list.check .ln { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; padding: 0; margin-top: 3px; }
.cs-list.check .ln svg { width: 12px; height: 12px; fill: none; stroke: var(--sheet); stroke-width: 2.2; }
.cs-fig { margin: 0; }
.cs-fig .frame { background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; padding: clamp(10px, 1.6vw, 18px); box-shadow: var(--shadow-sheet); cursor: zoom-in; }
.cs-fig img { width: 100%; height: auto; border-radius: 6px; }
.cs-fig figcaption { margin-top: 12px; font-family: var(--f-serif); font-style: italic; color: var(--ink-2); font-size: 16px; }
.cs-fig.phone-fig .frame { width: min(340px, 80%); margin: 0 auto; background: #0d0d0d; border-radius: 40px; padding: 10px; border: 0; }
.cs-fig.phone-fig img { border-radius: 30px; }
.cs-fig.phone-fig figcaption { text-align: center; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--rule); }
.swatches div { min-height: 190px; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; background: var(--s); color: #fff; }
.swatches div.lt { color: var(--ink); }
.swatches b { font-weight: 700; font-size: 15px; }
.swatches span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .82; }
.sw-note { margin-top: 16px; color: var(--ink-2); font-family: var(--f-serif); font-style: italic; font-size: 17px; }
.cs-timeline { position: relative; border-left: 1.5px solid var(--ink); margin-left: 6px; }
.cs-timeline li { position: relative; display: grid; grid-template-columns: 140px 1fr; gap: 8px 28px; padding: 0 0 30px 32px; }
.cs-timeline li::before { content: ''; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 50%; }
.cs-timeline li:last-child::before { background: var(--signal); border-color: var(--signal); }
.cs-timeline .d { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.cs-timeline h4 { font-weight: 750; font-variation-settings: 'wdth' 110; font-size: 19px; }
.cs-timeline p { grid-column: 2; color: var(--ink-2); font-size: 16px; }
.persona { display: grid; grid-template-columns: .9fr 1.1fr; gap: 14px; }
.persona > * { min-width: 0; }
.persona-card { background: var(--ink); color: var(--paper); border-radius: 14px; padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.persona-card .pa { width: 64px; height: 64px; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-weight: 860; font-variation-settings: 'wdth' 125; font-size: 24px; color: var(--ink); }
.persona-card h4 { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: 40px; line-height: 1; }
.persona-card .mono { color: #A8A193; font-size: 11px; }
.persona-card ul { display: grid; gap: 10px; border-top: 1px solid #3A362E; padding-top: 18px; }
.persona-card li { display: flex; gap: 10px; align-items: baseline; font-size: 16px; }
.persona-card li::before { content: ''; width: 7px; height: 7px; background: var(--c); flex: none; transform: translateY(-2px); }
.persona-why { background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; padding: 32px; display: flex; flex-direction: column; gap: 22px; }
.persona-why p { color: var(--ink-2); font-size: 17px; }
.persona-why .why-t { font-weight: 750; font-variation-settings: 'wdth' 110; font-size: 19px; color: var(--ink); }
.persona-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); padding-top: 18px; gap: 12px; }
.persona-stats b { display: block; font-weight: 860; font-variation-settings: 'wdth' 125; font-size: 34px; line-height: 1; letter-spacing: -.03em; }
.persona-stats span { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.persona-note { font-size: 15px !important; font-style: italic; font-family: var(--f-serif); }
.cs-outcomes { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 14px; }
.cs-outcomes article { border-radius: 12px; padding: 26px; background: var(--ink); color: var(--paper); display: flex; flex-direction: column; gap: 14px; min-height: 220px; }
.cs-outcomes h4 { font-family: var(--f-mono); font-weight: 400; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #A8A193; }
.cs-outcomes b { font-weight: 860; font-variation-settings: 'wdth' 120; font-size: clamp(28px, 3vw, 40px); line-height: 1; letter-spacing: -.03em; margin-top: auto; }
.cs-outcomes p { font-size: 14.5px; color: #CFC8B9; }
.cs-outcomes article:first-child { background: var(--signal); }
.cs-outcomes article:first-child h4, .cs-outcomes article:first-child p { color: #FBE5DE; }
.gal-group + .gal-group { margin-top: 40px; }
.gal-title { font-family: var(--f-serif); font-style: italic; font-size: 24px; margin-bottom: 16px; }
.gal { display: flex; flex-wrap: wrap; gap: 14px; }
.gal::after { content: ''; flex: 1000 1 0; }
.gal-item { flex: calc(var(--r) * 100) 1 calc(var(--r) * 210px); max-width: min(100%, calc(var(--r) * 400px)); margin: 0; }
.gal-item button { display: block; width: 100%; border: 0; padding: 0; background: var(--paper-2); border-radius: 8px; overflow: hidden; aspect-ratio: var(--r); position: relative; cursor: zoom-in; }
.gal-item.plate button { background: var(--sheet); border: 1px solid var(--rule); }
.gal-item img, .gal-item video { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gal-item.plate img { object-fit: contain; padding: 12%; }
.gal-item .play { position: absolute; left: 12px; bottom: 12px; display: inline-flex; gap: 8px; align-items: center; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; background: var(--ink); color: var(--sheet); padding: 6px 10px; border-radius: 2px; }
.gal-item .play::before { content: ''; border-left: 7px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.gal-item figcaption { display: flex; justify-content: space-between; gap: 8px; padding-top: 8px; font-size: 14px; }
.gal-item figcaption b { font-weight: 650; }
.gal-item figcaption span { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); text-align: right; }
.cs-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.cs-tools li { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 40px; font-weight: 600; font-size: 15px; }
.cs-tools img { width: 22px; height: 22px; object-fit: contain; }
.cs-tools .dot { width: 8px; height: 8px; background: var(--signal); border-radius: 50%; margin: 0 4px; }

.case-end { margin-top: clamp(80px, 10vw, 140px); background: var(--ink); color: var(--paper); padding: clamp(56px, 8vw, 96px) 0 calc(92px + env(safe-area-inset-bottom)); }
.case-end-grid { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.case-end h3 { margin-top: 0; font-weight: 860; font-variation-settings: 'wdth' 125; font-size: clamp(36px, 6vw, 84px); line-height: .9; letter-spacing: -.035em; text-transform: uppercase; }
.case-end .contact-mini { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 17px; }
.case-end .contact-mini a { text-decoration: none; border-bottom: 1px solid #5A554B; }
.case-next { display: grid; gap: 10px; justify-items: end; text-align: right; background: none; border: 0; color: inherit; padding: 0; }
.case-next .nx { display: flex; align-items: center; gap: 14px; font-weight: 750; font-variation-settings: 'wdth' 115; font-size: clamp(22px, 3vw, 36px); }
.case-next .nx-l { font-family: var(--f-serif); font-style: italic; font-size: 18px; color: #CFC8B9; }
.case-next i { width: 14px; height: 14px; border-radius: 3px; background: var(--c); }
.case-next svg { width: 22px; height: 22px; fill: none; stroke: var(--signal); stroke-width: 1.8; transition: transform .3s var(--ease); }
.case-end .btn-line { color: var(--paper); border-color: var(--paper); }
.case-foot { margin-top: 56px; padding-top: 20px; border-top: 1px solid #3A362E; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13px; color: #A8A193; }

/* entrance of case content */
.case .case-band-grid > *, .case .case-sheet { transition: opacity .6s var(--ease), transform .8s var(--ease); }
.case.pre .case-band-grid > * { opacity: 0; transform: translateY(26px); }
.case.pre .case-sheet { transform: translateY(80px); opacity: 0; }
.case.pre .case-visual { transform: translateY(26px) scale(.96); }
.case .case-band-grid > :nth-child(2) { transition-delay: .08s; }
.case.leaving .case-band-grid > *, .case.leaving .case-sheet, .case.leaving .case-bar { opacity: 0; transition-duration: .22s; }

/* flying clone used for the lift-out */
.fly { position: fixed; z-index: 130; margin: 0 !important; pointer-events: none; transform-origin: 50% 50%; }
.fly .card-inner { transition: none; }

/* ── back to top ─────────────────────────────────────────── */
.to-top {
  position: fixed; z-index: 140;
  right: calc(var(--gutter) * .6 + env(safe-area-inset-right));
  bottom: calc(20px + env(safe-area-inset-bottom));
  width: 54px; height: 54px; border-radius: 50%; border: 0; padding: 0;
  background: var(--ink); color: var(--sheet);
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(248,246,241,.22), 0 14px 30px -14px rgba(23,21,15,.6);
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.9);
  transition: opacity .3s var(--ease), transform .4s var(--ease), visibility 0s linear .3s, background .25s var(--ease);
}
.to-top.show { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top > svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; position: relative; z-index: 1; transition: transform .3s var(--ease); }
.to-top .ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top .ring circle { fill: none; stroke-width: 2.5; }
.to-top .ring .track { stroke: rgba(248,246,241,.14); }
.to-top .ring .bar { stroke: var(--signal); stroke-linecap: round; transition: stroke-dashoffset .12s linear; }
@media (hover: none) { .arc-hint { display: none; } }

/* ── lightbox ────────────────────────────────────────────── */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(15,14,10,.94); display: grid; grid-template-rows: auto 1fr auto; padding: 16px; }
.lightbox[hidden] { display: none; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; color: #CFC8B9; gap: 12px; }
.lb-bar .mono { font-size: 11px; }
.lb-bar button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #5A554B; background: none; color: #F8F6F1; display: grid; place-items: center; }
.lb-stage { display: grid; place-items: center; min-height: 0; padding: 12px 0; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.lb-nav { display: flex; justify-content: center; gap: 10px; }
.lb-nav button { width: 48px; height: 48px; border-radius: 50%; border: 1px solid #5A554B; background: none; color: #F8F6F1; display: grid; place-items: center; }
.lb-nav svg, .lb-bar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* ── responsive ──────────────────────────────────────────── */
@media (max-width: 1080px) {
  .svc { grid-template-columns: 100px 1fr; grid-template-rows: auto auto auto; }
  .svc-num { grid-row: 1 / 4; font-size: 80px; }
  .svc h3 { grid-column: 2; grid-row: 1; }
  .svc p { grid-column: 2; grid-row: 2; }
  .tags { grid-column: 2; grid-row: 3; }
  .cs-head { grid-template-columns: 1fr; }
  .cs-intro { grid-column: 1; }
}
@media (max-width: 1180px) {
  .stamp { left: -30px; top: -36px; width: 128px; }
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; align-items: start; }
  .footer-name { font-size: calc((100vw - 2 * var(--gutter)) / 7.3); }
  .cs-cards, .cs-outcomes { grid-template-columns: repeat(2, 1fr); }
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: block; }
  .hero-disc { grid-column: 1 / -1; grid-row: 1; text-align: left; min-width: 0; }
  .about-grid, .contact-grid, .case-top, .case-band-grid { grid-template-columns: 1fr; }
  .portrait { justify-self: center; margin-top: 40px; }
  .certs { grid-template-columns: 1fr; }
  .sec-head { grid-template-columns: 1fr; }
  .sec-aside { text-align: left; }
  .index button { grid-template-columns: 64px 1fr 28px; }
  .index .n { grid-row: 1 / 3; font-size: 40px; }
  .cs-steps .sn { font-size: 52px; }
  .index .k { grid-column: 2; grid-row: 2; margin-top: -8px; }
  .index .y { display: none; }
  .index svg { grid-column: 3; grid-row: 1 / 3; }
  .case-visual { display: none; }
  .case-band { min-height: 0; padding: 104px 0 130px; }
  .cs-steps li { grid-template-columns: 56px 1fr; }
  .cs-steps li p { grid-column: 2; }
  .persona { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: repeat(2, 1fr); }
  .swatches div { min-height: 120px; }
  .swatches div:first-child { grid-column: 1 / -1; }
  .case-end-grid { grid-template-columns: 1fr; }
  .case-next { justify-items: start; text-align: left; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .cs-cards, .cs-outcomes { grid-template-columns: 1fr; }
  .persona-card, .persona-why { padding: 24px 20px; }
  .persona-stats { gap: 8px; }
  .persona-stats b { font-size: 28px; }
  .persona-card h4 { font-size: 34px; }
  .hero { padding-top: 96px; min-height: 92svh; }
  .hero-name { margin-left: 0; }
  .stamp { left: -10px; top: -34px; width: 108px; }
  .case-foot .footer-legal { order: 3; width: 100%; }
  .hero-foot { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1; justify-content: center; }
  .svc { position: relative; top: 0; grid-template-columns: 1fr; min-height: 0; }
  .svc h3, .svc p, .tags, .svc-num { grid-column: 1; grid-row: auto; }
  .svc-num { font-size: 68px; margin-bottom: 4px; }
  .portrait-layers i:first-child { transform: translate(-10px, 14px) rotate(-3deg); }
  .portrait-layers i:last-child { transform: translate(10px, -10px); }
  .arc { --cw: 62vw; }
  .arc-hint { display: none; }
  .form-under { transform: translate(8px, 10px) rotate(1.4deg); }
  .cs-timeline li { grid-template-columns: 1fr; padding-left: 24px; }
  .cs-timeline p { grid-column: 1; }
  .cs-list li { grid-template-columns: 40px 1fr; font-size: 17px; }
  .case-meta div { grid-template-columns: 84px 1fr; }
  .case-back kbd { display: none; }
  .legal { padding: 22px; }
}

@media (max-width: 600px), (max-aspect-ratio: 4/5) {
  .hero { min-height: 0; padding-bottom: clamp(40px, 6vh, 64px); }
  .hero-title { margin: clamp(48px, 9vh, 120px) 0 clamp(56px, 9vh, 120px); padding: 0; }
  .hero-name { font-size: clamp(38px, 8.6vw, 92px); }
}
@media (max-width: 600px) {
  .to-top { width: 48px; height: 48px; right: calc(14px + env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom)); }
}

/* ── motion layer ────────────────────────────────────────── */
/* titles rise line by line out of a mask */
.line { display: block; overflow: clip; overflow-clip-margin: .12em; padding-bottom: .05em; margin-bottom: -.05em; }
.line > span { display: block; transform: translateY(108%); transition: transform 1.05s var(--ease); transition-delay: calc(.08s + var(--k, 0) * 90ms); }
.in .line > span, .line.in > span { transform: none; }

/* lists: rows arrive in sequence while their rules draw in like ink */
.rules > *, .stagger > * { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--k, 0) * 70ms); }
.rules.in > *, .stagger.in > * { opacity: 1; transform: none; }
.rules.done > *, .stagger.done > * { transition-delay: 0s; }
.rules > * { position: relative; border-bottom-color: transparent !important; }
.rules > *::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--rule); transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease); transition-delay: calc(.15s + var(--k, 0) * 70ms); pointer-events: none; }
.rules.in > *::after { transform: none; }
.certs.rules a { border-bottom-color: transparent; }

/* lazy images develop like a print: muted and soft, then full tone */
.dev-img { opacity: 0; transform: scale(1.02); transition: opacity .7s var(--ease), transform 1.2s var(--ease); }
.dev-img.ok { opacity: 1; transform: none; }

/* about: the photo slides out of the sheet, the layers fan out, then the stamp lands */
.portrait-photo img { transform: translateY(101%); transition: transform 1.25s var(--ease) .15s; }
.portrait.in .portrait-photo img { transform: none; }
.portrait-layers i { transition: transform 1.1s var(--ease) .55s, opacity .6s var(--ease) .55s; }
.portrait:not(.in) .portrait-layers i { transform: none !important; opacity: 0; }
.stamp { transition: opacity .2s ease-out 1.35s, transform .5s cubic-bezier(.25, 1.6, .45, 1) 1.35s; }
.portrait:not(.in) .stamp { opacity: 0; transform: rotate(-24deg) scale(1.75); }
.portrait.in .portrait-photo { animation: stamp-jolt .32s ease-out 1.6s; }
@keyframes stamp-jolt { 35% { translate: 0 2px; } }

/* services: lower sheets sink back as the next one slides over */
.svc { transform-origin: 50% 0; }
.svc-shade { position: absolute; inset: 0; border-radius: inherit; background: var(--ink); opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .svc { will-change: transform; } .svc-shade { will-change: opacity; } }


/* numbers that count up keep a steady width */
.case-stats b, .persona-stats b, .num-grid b { font-variant-numeric: tabular-nums; }

/* ── in numbers ─────────────────────────────────────────── */
.numbers { padding: clamp(96px, 12vw, 150px) 0; background: var(--paper); border-top: 1px solid var(--rule); }
.num-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1.5px solid var(--ink); }
.num-grid li { border-bottom: 1px solid var(--rule); }
.num-grid li:not(:nth-child(3n)) { border-right: 1px solid var(--rule); }
.num-grid button { width: 100%; height: 100%; display: grid; grid-template-rows: auto 1fr auto; gap: 14px; text-align: left; padding: clamp(24px, 3vw, 40px); background: transparent; border: 0; transition: background .35s var(--ease); }
.num-grid b { font-weight: 860; font-variation-settings: 'wdth' 125; font-size: clamp(48px, 6.2vw, 92px); line-height: .9; letter-spacing: -.04em; }
.num-grid .nl { font-size: 17px; color: var(--ink-2); max-width: 26ch; }
.num-grid .np { display: flex; align-items: center; gap: 10px; font-family: var(--f-serif); font-style: italic; font-size: 18px; color: var(--ink); }
.num-grid .np i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); flex: none; }
.num-grid .np svg { width: 15px; height: 15px; fill: none; stroke: var(--signal); stroke-width: 1.7; margin-left: auto; transition: transform .3s var(--ease); }
@media (max-width: 900px) {
  .num-grid { grid-template-columns: 1fr 1fr; }
  .num-grid li:not(:nth-child(3n)) { border-right: 0; }
  .num-grid li:nth-child(odd) { border-right: 1px solid var(--rule); }
}
@media (max-width: 600px) {
  .num-grid { grid-template-columns: 1fr; }
  .num-grid li:nth-child(odd) { border-right: 0; }
  .num-grid button { grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 6px 18px; align-items: center; padding: 22px 0; }
  .num-grid b { grid-row: 1 / 3; font-size: 46px; min-width: 4.2ch; }
  .num-grid .nl { font-size: 15px; }
  .num-grid .np { font-size: 15px; }
}

/* marquees: composited, paused off screen */
.tape-track, .tools-track { will-change: transform; }
.paused .tape-track, .paused .tools-track { animation-play-state: paused; }

/* ── pointer & touch ─────────────────────────────────────── */
a, button, [role="button"] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover svg { transform: translateX(4px); }
  .btn-ink:hover { background: var(--signal); border-color: var(--signal); }
  .btn-line:hover { background: var(--ink); color: var(--sheet); }
  .nav-links a:hover::after { transform: scaleX(1); }
  .line-link:hover { background-size: 100% 1.5px; }
  .socials a:hover { background: var(--ink); color: var(--paper); }
  .certs a:hover { padding-left: 10px; }
  .card:hover .card-inner, .card:focus-visible .card-inner { transform: translateY(-3%); }
  .card:hover .card-tag, .card:focus-visible .card-tag { opacity: 1; transform: none; }
  .ctl:hover { background: var(--ink); color: var(--sheet); }
  .index button:hover::before { transform: none; opacity: 1; }
  .index button:hover .n { color: var(--signal); }
  .index button:hover svg { transform: translateX(5px); stroke: var(--signal); }
  .contact-list a:hover { color: var(--signal); }
  .contact-list a:hover .ci { background: var(--ink); }
  .contact-list a:hover .ci svg { stroke: var(--paper); }
  .contact-list a:hover .ci svg.fill { fill: var(--paper); stroke: none; }
  .case-social:hover { background: var(--sheet); transform: translateY(-2px); }
  .cs-cards article:hover { transform: translateY(-4px); box-shadow: var(--shadow-sheet); }
  .gal-item button:hover img { transform: scale(1.03); }
  .case-end .contact-mini a:hover { border-color: var(--signal); }
  .case-next:hover svg { transform: translateX(6px); }
  .case-end .btn-line:hover { background: var(--paper); color: var(--ink); }
  .to-top:hover { background: var(--signal); }
  .to-top:hover > svg { transform: translateY(-2px); }
  .to-top:hover .ring .bar { stroke: var(--sheet); }
  .num-grid button:hover { background: var(--sheet); }
  .num-grid button:hover .np svg { transform: translateX(5px); }
  .footer-nav a:hover { background-size: 100% 1.5px; }
  .footer-social a:hover { transform: translateY(-3px); box-shadow: 0 10px 22px -10px rgba(0,0,0,.6); }
  .footer-contact a:hover { color: var(--paper); }
  .footer-legal button:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }
}
@media (hover: none), (pointer: coarse) {
  /* immediate press feedback instead of hover states */
  .btn, .ctl, .socials a, .footer-social a, .case-social, .to-top, .case-back, .case-pager button, .tool, .num-grid button, .index button { transition-duration: .12s; }
  .btn:active, .ctl:active, .socials a:active, .footer-social a:active, .case-social:active, .case-back:active, .case-pager button:active { transform: scale(.95); }
  .to-top.show:active { transform: scale(.92); }
  .card:active .card-inner { transform: scale(.97); transition-duration: .12s; }
  .index button:active::before { transform: none; opacity: 1; transition-duration: .1s; }
  .num-grid button:active, .gal-item button:active, .cs-fig .frame:active { background: var(--sheet); opacity: .85; }
  /* solid bars: background blur is expensive while scrolling on phones */
  .nav.scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(238,234,225,.97); }
  .case-bar::before { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(238,234,225,.97); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal, .rules > *, .stagger > * { opacity: 1; transform: none; }
  .line > span { transform: none; }
  .rules > *::after { transform: none; }
  .portrait-photo img { transform: none; }
  .portrait:not(.in) .stamp { opacity: .92; transform: rotate(-13deg); }
  .dev-img { opacity: 1; filter: none; transform: none; }
}
