/* Ammar Rajabi portfolio — design system 2026 */
/* ---------- Fonts (self-hosted, OFL): Instrument Serif + Instrument Sans ---------- */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-latin-ext-400-italic.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/instrument-sans-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("../fonts/instrument-sans-latin-ext-wght-italic.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("../fonts/instrument-sans-latin-wght-italic.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
/* ---------- Tokens ---------- */
:root {
  --paper: #FFFFFF;
  --surface: #F3F5F9;
  --ink: #0E1A2B;
  --stone: #566173;
  --line: #E2E7EE;
  --gold: #2350E6;
  --gold-ink: #2350E6;
  --accent-soft: #E8EEFF;
  --ok: #16A34A;
  --frame: #FFFFFF;
  --band: #0E1A2B;
  --band-text: #F3F5F9;
  --bezel: #0E1A2B;
  --shadow: 15, 27, 45;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 56px);
  --ease: cubic-bezier(.22, .61, .21, 1);
  --slow: 900ms;

  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0A111E;
    --surface: #111B2D;
    --ink: #E9EEF6;
    --stone: #9FAABD;
    --line: #22304A;
    --gold: #8EADFF;
    --gold-ink: #8EADFF;
    --accent-soft: #16244A;
    --ok: #4ADE80;
    --frame: #152238;
    --band: #111B2D;
    --band-text: #E9EEF6;
    --bezel: #05080F;
    --shadow: 0, 0, 0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0A111E;
  --surface: #111B2D;
  --ink: #E9EEF6;
  --stone: #9FAABD;
  --line: #22304A;
  --gold: #8EADFF;
  --gold-ink: #8EADFF;
  --accent-soft: #16244A;
  --ok: #4ADE80;
  --frame: #152238;
  --band: #111B2D;
  --band-text: #E9EEF6;
  --bezel: #05080F;
  --shadow: 0, 0, 0;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: inherit; }
html { font-synthesis-weight: none; scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 80px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 450;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; max-width: 62ch; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.1; margin: 0; letter-spacing: -.012em; font-weight: 400; }
h3 { font-weight: 500; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Scroll progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--gold); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background-color .5s var(--ease);
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header-in { display: flex; align-items: center; gap: 32px; height: 72px; }
.mark { font-family: var(--serif); font-size: 1.25rem; text-decoration: none; letter-spacing: .005em; white-space: nowrap; font-weight: 400; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--stone); position: relative; padding: 4px 0; transition: color .3s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.tools { display: flex; align-items: center; gap: 18px; padding-left: 24px; border-left: 1px solid var(--line); }
.tools a, .lang { font-size: .9rem; text-decoration: none; color: var(--stone); }
.tools a:hover { color: var(--ink); }
.lang b { color: var(--ink); font-weight: 600; }
.theme {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--ink);
}
.theme svg { width: 16px; height: 16px; }
.m-bar { display: none; margin-left: auto; align-items: center; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent;
  color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.burger { position: relative; width: 18px; height: 10px; display: block; }
.burger::before, .burger::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform .45s var(--ease), top .45s var(--ease);
}
.burger::before { top: 0; }
.burger::after { top: 8.5px; }
.is-menu-open .burger::before { top: 4.25px; transform: rotate(45deg); }
.is-menu-open .burger::after { top: 4.25px; transform: rotate(-45deg); }

.m-panel {
  position: fixed; left: 0; right: 0; bottom: 0; top: calc(64px + env(safe-area-inset-top, 0px));
  z-index: 49; background: var(--paper); display: none; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 8px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px));
}
.is-menu-open .m-panel { display: flex; }
.m-nav { display: flex; flex-direction: column; }
.m-nav a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  text-decoration: none; padding: 18px 0; border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: clamp(1.7rem, 7vw, 2.2rem); line-height: 1.1; color: var(--ink); font-weight: 400; }
.m-nav a span { font-family: var(--sans); font-size: .85rem; font-weight: 500; color: var(--stone); }
.m-nav a[aria-current="page"] { color: var(--gold-ink); }
.m-nav a span { white-space: nowrap; }
@media (max-width: 359px) { .m-nav a span { display: none; } }
.m-foot { margin-top: auto; padding-top: 32px; display: grid; gap: 18px; }
.m-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: .92rem; color: var(--stone); font-weight: 500; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 2px; }
.seg a, .seg b { padding: 8px 16px; font-size: .9rem; text-decoration: none; font-weight: 600; }
.seg b { background: var(--ink); color: var(--paper); }
.seg a { color: var(--ink); }
.m-cv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-cv .btn { justify-content: center; padding: 13px 12px; }
.m-mail { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--gold); width: fit-content; padding-bottom: 3px; font-weight: 400; }
.js .m-panel .m-nav a, .js .m-panel .m-foot { opacity: 0; transform: translateY(12px); }
.is-menu-open .m-panel .m-nav a, .is-menu-open .m-panel .m-foot { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }
.is-menu-open .m-panel .m-nav a:nth-child(2) { transition-delay: 50ms; }
.is-menu-open .m-panel .m-nav a:nth-child(3) { transition-delay: 100ms; }
.is-menu-open .m-panel .m-nav a:nth-child(4) { transition-delay: 150ms; }
.is-menu-open .m-panel .m-nav a:nth-child(5) { transition-delay: 200ms; }
.is-menu-open .m-panel .m-foot { transition-delay: 250ms; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 2px; text-decoration: none;
  font-size: .95rem; font-weight: 500; letter-spacing: .01em;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn-primary { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-primary:hover { background: transparent; color: var(--ink); }
.btn-outline { border: 1px solid var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.text-link { display: inline-flex; gap: 10px; align-items: baseline; text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--gold); padding-bottom: 3px; }
.text-link .arr { display: inline-block; transition: transform .45s var(--ease); color: var(--gold-ink); }
.text-link:hover .arr { transform: translateX(5px); }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 11vh, 128px) 0 clamp(56px, 9vh, 104px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 112px); align-items: end; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 4.75rem); line-height: 1.02; font-weight: 600; }
.line { display: block; overflow: hidden; padding-bottom: .06em; }
.line > span { display: block; }
.role { font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 2vw, 1.6rem); color: var(--stone); margin: 22px 0 28px; font-weight: 400; }
.hero-rule { height: 1px; background: var(--gold); width: 88px; transform-origin: 0 50%; margin-bottom: 28px; }
.hero-text { color: var(--stone); font-size: 1.1rem; max-width: 48ch; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.index { border-top: 1px solid var(--line); }
.index-title { font-size: .9rem; color: var(--stone); margin: 18px 0 6px; }
.index a { display: grid; grid-template-columns: 2.2rem 1fr auto; align-items: baseline; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.index .n { font-family: var(--serif); color: var(--gold-ink); font-size: .95rem; font-weight: 400; }
.index .t { font-family: var(--serif); font-size: 1.35rem; font-weight: 400; }
.index .k { font-size: .85rem; color: var(--stone); text-align: right; }
.index a:hover .t { font-style: italic; }
.avail { margin-top: 18px; font-size: .9rem; color: var(--stone); display: flex; gap: 10px; align-items: center; }
.avail i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); display: inline-block; }

/* ---------- Work sequence ---------- */
.section-head { margin-bottom: 0; display: flex; justify-content: space-between; align-items: end; gap: 24px; padding: 40px 0 8px; border-top: 1px solid var(--line); }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
.section-head p { color: var(--stone); margin: 0; max-width: 40ch; }

.project {
  --accent: var(--gold);
  background: color-mix(in oklab, var(--paper) 95%, var(--accent));
  transition: background-color .8s var(--ease);
  padding: clamp(56px, 9vh, 112px) 0;
  border-bottom: 1px solid var(--line);
}
.project[data-p="pamir"] { --accent: #1F6FD1; }
.project[data-p="afghan"] { --accent: #2F6B66; }
.project[data-p="dyb"] { --accent: #9C4A3A; }
.project-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.caption { position: sticky; top: 120px; }
.count { font-family: var(--serif); color: var(--gold-ink); font-size: 1rem; display: flex; gap: 14px; align-items: center; font-weight: 400; }
.count::after { content: ""; height: 1px; width: 48px; background: var(--gold); }
.caption h3 { font-size: clamp(2rem, 3.4vw, 3rem); margin: 18px 0 14px; }
.caption .sum { color: var(--stone); }
.facts { margin: 26px 0 30px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.facts span:first-child { color: var(--stone); }
.facts span:last-child { text-align: right; }
.swatch { display: inline-block; width: 22px; height: 3px; background: var(--accent); vertical-align: middle; margin-right: 10px; }

.media { position: relative; padding-bottom: 72px; }
.browser { background: var(--frame); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(var(--shadow), .35); }
.browser-bar { height: 26px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.browser-bar i { width: 26px; height: 3px; border-radius: 2px; background: var(--line); }
.phone {
  position: absolute; left: -36px; bottom: 0; width: 26%; min-width: 128px;
  border: 7px solid var(--bezel); border-radius: 26px; overflow: hidden; background: var(--bezel); outline: 1px solid var(--line);
  box-shadow: 0 30px 50px -24px rgba(var(--shadow), .5);
  aspect-ratio: 9 / 18.5;
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.photo { border-radius: 4px; overflow: hidden; }
.photo-small { position: absolute; right: -24px; bottom: 0; width: 34%; border-radius: 4px; overflow: hidden; box-shadow: 0 30px 50px -24px rgba(var(--shadow), .45); }
.reveal-img { clip-path: inset(0 0 0 0); }
.project .open { margin-top: 4px; }

/* ---------- Proof ---------- */
.proof { padding: clamp(72px, 12vh, 136px) 0; }
.proof h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); max-width: 18ch; }
.ledger { margin-top: 48px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.ledger div { padding: 26px 24px 0 0; }
.ledger div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.ledger strong { display: block; font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1; margin-bottom: 14px; font-weight: 400; }
.ledger span { color: var(--stone); font-size: .95rem; display: block; max-width: 26ch; }

/* ---------- Capabilities ---------- */
.caps { background: var(--surface); padding: clamp(72px, 12vh, 136px) 0; transition: background-color .5s var(--ease); }
.caps-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(32px, 6vw, 96px); }
.caps h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
.pillar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.pillar:last-child { border-bottom: 1px solid var(--line); }
.pillar h3 { font-size: 1.6rem; }
.pillar p { color: var(--stone); margin-bottom: 10px; }
.pillar .tools-list { font-size: .9rem; color: var(--ink); margin: 0; }

/* ---------- Testimonials ---------- */
.quotes { padding: clamp(72px, 12vh, 136px) 0; }
.quotes h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); margin-bottom: 48px; }
.quote-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); }
.quote { margin: 0; border-top: 1px solid var(--gold); padding-top: 28px; display: flex; flex-direction: column; }
.quote blockquote { margin: 0 0 28px; font-family: var(--sans); font-size: clamp(1.0625rem, 1.3vw, 1.2rem); line-height: 1.65; font-weight: 450; }
.who { display: flex; gap: 14px; align-items: center; margin-top: auto; }
.who img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; filter: grayscale(.2); }
.who strong { display: block; font-weight: 600; font-size: .98rem; }
.who span { font-size: .88rem; color: var(--stone); }
.who a { margin-left: auto; font-size: .9rem; }

/* ---------- Closing ---------- */
.closing { background: var(--band); color: var(--band-text); border-top: 1px solid var(--line); padding: clamp(72px, 12vh, 128px) 0; }
.closing-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.closing h2 { font-size: clamp(2rem, 4vw, 3.25rem); color: var(--band-text); }
.closing p { color: color-mix(in srgb, var(--band-text) 72%, var(--band)); }
.closing .btn-primary { background: var(--band-text); color: var(--band); border-color: var(--band-text); }
.closing .btn-primary:hover { background: transparent; color: var(--band-text); }
.closing .mail { display: block; font-family: var(--serif); font-size: clamp(1.2rem, 2vw, 1.5rem); color: var(--band-text); text-decoration: none; margin-bottom: 22px; border-bottom: 1px solid var(--gold); width: fit-content; padding-bottom: 4px; font-weight: 400; }

/* ---------- Footer ---------- */
.footer { padding: 40px 0 32px; font-size: .9rem; color: var(--stone); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.footer .mark { color: var(--ink); display: inline-block; margin-bottom: 6px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; padding-top: 20px; flex-wrap: wrap; }

/* ---------- Case study ---------- */
.cs-intro { padding: clamp(40px, 8vh, 96px) 0 clamp(40px, 6vh, 72px); }
.back { font-size: .92rem; color: var(--stone); text-decoration: none; display: inline-flex; gap: 8px; margin-bottom: 40px; }
.back:hover { color: var(--ink); }
.cs-intro h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); }
.cs-lede { font-family: var(--sans); font-size: clamp(1.125rem, 1.6vw, 1.35rem); color: var(--stone); max-width: 38ch; margin: 22px 0 0; line-height: 1.4; }
.cs-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 56px; border-top: 1px solid var(--ink); }
.cs-meta div { padding: 18px 20px 0 0; }
.cs-meta div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.cs-meta dt { font-size: .85rem; color: var(--stone); margin-bottom: 6px; }
.cs-meta dd { margin: 0; font-size: .98rem; }
.cs-hero { padding-bottom: clamp(56px, 10vh, 112px); }
.cs-block { padding: clamp(56px, 10vh, 112px) 0; border-top: 1px solid var(--line); }
.cs-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 80px); }
.cs-row h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.cs-row + .cs-row { margin-top: 48px; }
.cs-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.cs-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }

.compare-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; }
.compare-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.tabs { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 2px; }
.tabs button { background: none; border: 0; padding: 10px 18px; font: inherit; font-size: .9rem; color: var(--stone); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 40px); }
.pair + .pair-label { margin-top: 64px; }
.pair-label { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--ink); padding: 14px 0 20px; }
.pair-label h3 { font-size: 1.4rem; }
.pair-label span { color: var(--stone); font-size: .92rem; }
.shot figcaption { font-size: .88rem; color: var(--stone); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.shot figcaption i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--stone); }
.shot.after figcaption i { background: var(--gold); border-color: var(--gold); }
.shot figure, .shot { margin: 0; }
.scroller { height: min(72vh, 640px); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 8px; background: var(--frame); scrollbar-width: thin; }
.scroller img { width: 100%; }
.scroll-hint { font-size: .85rem; color: var(--stone); margin-top: 12px; }

.qa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 40px); margin-top: 40px; }
.qa-grid figure { margin: 0; }
.qa-grid figcaption { font-size: .88rem; color: var(--stone); margin-top: 10px; }
.cs-quote { max-width: 860px; }
.cs-quote blockquote { font-family: var(--sans); font-size: clamp(1.125rem, 1.8vw, 1.4rem); line-height: 1.6; font-weight: 450; margin: 0 0 28px; }

.next { display: block; text-decoration: none; padding: clamp(56px, 10vh, 112px) 0; border-top: 1px solid var(--line); }
.next small { color: var(--stone); font-size: .95rem; display: block; margin-bottom: 14px; }
.next strong { font-family: var(--serif); font-size: clamp(2rem, 6vw, 4.5rem); line-height: 1.05; display: inline-flex; flex-wrap: wrap; gap: 4px 20px; align-items: baseline; font-weight: 400; }
.next strong .arr { font-size: .5em; color: var(--gold-ink); transition: transform .5s var(--ease); }
.next:hover strong { font-style: italic; }
.next:hover .arr { transform: translateX(10px); }


/* ---------- Motion ---------- */
.js .line > span { transform: translateY(105%); }
.js .hero-rule { transform: scaleX(0); }
.js .fade { opacity: 0; transform: translateY(14px); }
/* Hero text is the LCP element: always painted at once, only a gentle slide */
.js [data-hero] .fade { opacity: 1; }
.js .cs-hero .reveal-img { opacity: 1; }
.is-in .line > span { transform: none; transition: transform var(--slow) var(--ease); }
.is-in .line:nth-child(2) > span { transition-delay: 120ms; }
.is-in .hero-rule { transform: none; transition: transform 1.1s var(--ease) 500ms; }
.is-in .fade { opacity: 1; transform: none; transition: opacity .8s var(--ease) 380ms, transform .8s var(--ease) 380ms; }
.is-in .fade.d2 { transition-delay: 520ms; }
.js .reveal-img { clip-path: inset(12% 0 0 0); opacity: .001; }
.reveal-img.is-shown { clip-path: inset(0 0 0 0); opacity: 1; transition: clip-path 1.1s var(--ease), opacity .6s var(--ease); }
.js .rise { opacity: 0; transform: translateY(18px); }
.rise.is-shown { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .browser { transition: transform .8s var(--ease); }
  .project:hover .browser { transform: translateY(-4px); }
}

/* ---------- Page transitions (progressive) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

/* ---------- Inner page hero ---------- */
.page-hero { padding: clamp(48px, 10vh, 112px) 0 clamp(40px, 7vh, 80px); }
.page-hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.25rem); line-height: 1.04; }
.lede { font-family: var(--sans); font-weight: 450; font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--stone); max-width: 40ch; margin: 22px 0 0; }
.kicker { font-size: .95rem; color: var(--stone); margin: 0 0 18px; font-weight: 500; }

/* ---------- Work list ---------- */
.work-row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 80px); align-items: center; padding: clamp(48px, 9vh, 96px) 0; border-top: 1px solid var(--line); }
.work-row:nth-child(even) .work-media { order: 2; }
.work-row h2 { font-size: clamp(2rem, 3.6vw, 3rem); margin: 16px 0 14px; }
.work-row .sum { color: var(--stone); }
.work-media { position: relative; display: block; }
.work-media .browser { transition: transform .8s var(--ease); }

/* ---------- Gallery + lightbox ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); margin-top: 40px; }
.g-item { margin: 0; }
.g-btn { display: block; width: 100%; padding: 0; border: 1px solid var(--line); background: var(--frame); border-radius: 6px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; }
.g-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.g-item figcaption { margin-top: 12px; }
.g-item strong { display: block; font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.g-item span { color: var(--stone); font-size: .92rem; }
.lightbox { border: 0; padding: 0; max-width: min(1200px, 94vw); max-height: 92vh; background: transparent; color: var(--ink); }
.lightbox::backdrop { background: rgba(5, 8, 15, .84); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 6px; background: var(--frame); }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 4px 0; color: #E8EDF5; }
.lightbox-bar button { background: transparent; border: 1px solid rgba(232, 237, 245, .4); color: #E8EDF5; border-radius: 2px; padding: 9px 16px; font: inherit; font-size: .9rem; cursor: pointer; }

/* ---------- Case study galleries ---------- */
.chapter { padding: clamp(56px, 10vh, 112px) 0; border-top: 1px solid var(--line); }
.chapter-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 80px); margin-bottom: clamp(32px, 5vh, 56px); }
.chapter-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.chapter-head p { color: var(--stone); margin: 0; }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 40px); align-items: start; }
.shots.one { grid-template-columns: 1fr; }
.shots.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shots figure { margin: 0; }
.shots figcaption, .cap { font-size: .9rem; color: var(--stone); margin-top: 12px; }
.plain { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--frame); }
.phones { display: flex; justify-content: center; gap: clamp(16px, 4vw, 56px); }
.phones .phone { position: static; width: min(260px, 40%); min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); margin-top: 40px; }
.stats div { padding: 20px 20px 0 0; }
.stats div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.stats strong { display: block; font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.1; margin-bottom: 8px; font-weight: 400; }
.stats span { color: var(--stone); font-size: .92rem; }
.scores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 40px); margin-top: 32px; }
.score { border-top: 1px solid var(--ink); padding-top: 16px; }
.score h3 { font-size: 1.3rem; margin-bottom: 12px; }
.score ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.score li { display: flex; flex-direction: column; gap: 2px; font-size: .85rem; color: var(--stone); }
.score b { font-family: var(--serif); font-size: 1.6rem; color: var(--ink); font-weight: 400; }
.live { margin-top: 28px; }

/* ---------- Journey ---------- */
.journey-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.portrait { margin: 0; position: relative; }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; border-radius: 4px; filter: grayscale(.15) contrast(1.02); }
.portrait::after { content: ""; position: absolute; left: -14px; top: 14px; width: 1px; height: 64%; background: var(--gold); }
.portrait figcaption { margin-top: 14px; font-size: .92rem; color: var(--stone); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: clamp(20px, 4vw, 64px); padding: 28px 0; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline time { font-family: var(--serif); font-size: 1.15rem; color: var(--gold-ink); font-weight: 400; }
.timeline h3 { font-size: 1.45rem; margin-bottom: 8px; }
.timeline p { color: var(--stone); margin: 0; }
.langs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.langs li { padding: 18px 18px 0 0; }
.langs li + li { padding-left: 18px; border-left: 1px solid var(--line); }
.langs strong { display: block; font-family: var(--serif); font-size: 1.3rem; font-weight: 400; }
.langs span { color: var(--stone); font-size: .92rem; }

/* ---------- Capabilities page ---------- */
.pillar-lg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 80px); padding: clamp(40px, 7vh, 72px) 0; border-top: 1px solid var(--line); }
.pillar-lg h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.pillar-lg .intro { font-size: 1.1rem; }
.pillar-lg ul { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--line); }
.pillar-lg li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.pillar-lg li span:first-child { font-weight: 600; }
.pillar-lg li span:last-child { color: var(--stone); }
.proof-link { margin-top: 20px; font-size: .95rem; color: var(--stone); }
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); counter-reset: step; }
.steps li { padding: 22px 22px 0 0; counter-increment: step; }
.steps li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--serif); color: var(--gold-ink); margin-bottom: 14px; font-weight: 400; }
.steps h3 { font-size: 1.35rem; margin-bottom: 8px; }
.steps p { color: var(--stone); margin: 0; font-size: .98rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: clamp(32px, 6vw, 96px); padding-bottom: clamp(72px, 12vh, 128px); }
.details { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.details li { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.details span { font-size: .88rem; color: var(--stone); }
.details a, .details b { font-family: var(--serif); font-size: 1.2rem; text-decoration: none; overflow-wrap: anywhere; font-weight: 400; }
.details a:hover { color: var(--gold-ink); }
.cv-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.note { font-size: .95rem; color: var(--stone); margin-top: 24px; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; align-content: start; }
.field { display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .9rem; font-weight: 600; }
.field input, .field textarea {
  width: 100%; font: inherit; font-weight: 450; color: var(--ink); background: var(--frame);
  border: 1px solid var(--line); border-radius: 2px; padding: 14px 14px; transition: border-color .3s var(--ease);
}
.field textarea { min-height: 180px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 35%, transparent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.form-foot small { color: var(--stone); font-size: .88rem; max-width: 44ch; }
.form button.btn { cursor: pointer; font-family: inherit; }
.form button[disabled] { opacity: .6; cursor: progress; }
.status { grid-column: 1 / -1; margin: 0; font-weight: 600; min-height: 1.6em; }
.status.ok { color: var(--gold-ink); }

/* ---------- Legal / 404 ---------- */
.prose { max-width: 720px; padding-bottom: clamp(72px, 12vh, 128px); }
.prose h2 { font-size: 1.5rem; margin: 40px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--stone); }
.prose a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
.not-found { min-height: 70vh; display: grid; align-content: center; padding: 64px 0; }
.not-found h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.not-found .code { font-family: var(--serif); color: var(--gold-ink); font-size: 1.1rem; margin-bottom: 14px; font-weight: 400; }
.nf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; margin-top: 40px; }
.nf-grid p { color: var(--stone); }

.section { padding: clamp(72px, 12vh, 136px) 0; }
.section-title { font-size: clamp(1.9rem, 3.4vw, 2.75rem); max-width: 22ch; }
.more { margin-top: 36px; }

@media (hover: hover) and (pointer: fine) {
  .work-row:hover .browser { transform: translateY(-4px); }
  .g-btn:hover img { transform: scale(1.03); }
}
@media (max-width: 920px) {
  .work-row, .journey-hero, .contact-grid, .chapter-head, .pillar-lg { grid-template-columns: 1fr; }
  .work-row:nth-child(even) .work-media { order: 0; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats, .steps, .langs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div:nth-child(3), .steps li:nth-child(3), .langs li:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats div:nth-child(n+3), .steps li:nth-child(n+3), .langs li:nth-child(n+3) { margin-top: 24px; border-top: 1px solid var(--line); }
  .shots.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portrait { max-width: 420px; }
}
@media (max-width: 640px) {
  .gallery, .shots, .shots.three, .scores, .nf-grid, .form { grid-template-columns: 1fr; }
  .stats, .steps, .langs { grid-template-columns: 1fr; }
  .stats div, .stats div + div, .steps li, .steps li + li, .langs li, .langs li + li { padding-left: 0; border-left: 0; }
  .stats div + div, .steps li + li, .langs li + li { margin-top: 20px; border-top: 1px solid var(--line); }
  .timeline li, .pillar-lg li { grid-template-columns: 1fr; gap: 6px; }
  .score ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phones .phone { width: 46%; }
  .portrait::after { display: none; }
  .form-foot .btn { width: 100%; justify-content: center; }
}

/* ---------- Studio ---------- */
.project[data-p="caly"] { --accent: #E4572E; }
.studio-links { display: flex; flex-wrap: wrap; gap: 14px 28px; margin: 0; }
.studio-media { padding-bottom: 72px; }
.studio-refs a { font-family: var(--serif); font-size: 1.2rem; text-decoration: none; font-weight: 400; }
.studio-refs a:hover { color: var(--gold-ink); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; z-index: 40;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; padding: 0; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 12px 30px -14px rgba(var(--shadow), .45);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .4s var(--ease), transform .4s var(--ease), visibility 0s linear .4s, border-color .3s var(--ease), background-color .5s var(--ease);
}
.to-top svg { width: 18px; height: 18px; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .4s var(--ease), transform .4s var(--ease), visibility 0s, border-color .3s var(--ease), background-color .5s var(--ease); }
.to-top:hover { border-color: var(--gold); color: var(--gold-ink); }
.is-menu-open .to-top { opacity: 0; visibility: hidden; }
@media (min-width: 921px) { .to-top { right: max(28px, env(safe-area-inset-right, 0px)); bottom: 28px; } }
@media print { .to-top, .progress, .m-panel { display: none !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { gap: 20px; }
  .tools { gap: 14px; padding-left: 16px; }
}
@media (max-width: 920px) {
  .nav, .tools { display: none; }
  .m-bar { display: flex; }
  .header-in { height: 64px; }
  .is-menu-open .header { background: var(--paper); border-bottom-color: var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .hero-grid, .project-grid, .caps-grid, .closing-grid { grid-template-columns: 1fr; }
  .caption { position: static; }
  .project-grid .media { order: -1; }
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger div:nth-child(3) { padding-left: 0; border-left: 0; }
  .ledger div:nth-child(n+3) { margin-top: 28px; border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-meta div:nth-child(3) { padding-left: 0; border-left: 0; }
  .cs-meta div:nth-child(n+3) { margin-top: 18px; border-top: 1px solid var(--line); }
  .cs-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .phone { left: -8px; width: 25%; border-width: 5px; border-radius: 18px; }
  .photo-small { right: -8px; }
  .media { padding-bottom: 48px; }
  .index .k { display: none; }
  .index a { grid-template-columns: 2rem 1fr; }
  .section-head { flex-direction: column; align-items: start; }
  .ledger { grid-template-columns: 1fr; }
  .ledger div, .ledger div + div { padding-left: 0; border-left: 0; }
  .ledger div + div { margin-top: 24px; border-top: 1px solid var(--line); }
  .pillar { grid-template-columns: 1fr; gap: 10px; }
  .quote-grid, .qa-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .compare-head { flex-direction: column; align-items: start; }
  .pair { grid-template-columns: 1fr; }
  .pair[data-show="before"] .after, .pair[data-show="after"] .before { display: none; }
  .scroller { height: 70vh; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
  :root { --slow: 650ms; }
}
@media (min-width: 641px) { .tabs { display: none; } }
@media (min-width: 921px) { .m-panel { display: none !important; } }
@media (max-width: 360px) { .mark { font-size: 1.1rem; } .icon-btn { width: 40px; height: 40px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0ms !important; animation: none !important; scroll-behavior: auto !important; }
  .js .line > span, .js .hero-rule, .js .fade, .js .reveal-img, .js .rise { transform: none; opacity: 1; clip-path: none; }
}

/* ---------- 2026-10 update: tagline, trust strip, logo avatars ---------- */
.role { margin-bottom: 10px; }
.tagline { margin: 0 0 28px; font-size: 1rem; font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.trust { padding: 0 0 clamp(36px, 6vh, 64px); }
.trust-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 20px clamp(32px, 5vw, 64px); border-top: 1px solid var(--line); padding-top: 28px; }
.trust-title { margin: 0; font-size: .9rem; color: var(--stone); }
.trust-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 18px clamp(28px, 4vw, 56px); }
.trust-list a { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.trust-list img { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 12px; border: 1px solid var(--line); background: #FFFFFF; object-fit: cover; }
.trust-list strong { display: block; font-weight: 600; font-size: 1rem; line-height: 1.25; transition: color .3s var(--ease); }
.trust-list small { display: block; font-size: .84rem; color: var(--stone); line-height: 1.35; }
.trust-list a:hover strong, .trust-list a:focus-visible strong { color: var(--gold-ink); }
.who img.logo { border-radius: 12px; filter: none; border: 1px solid var(--line); }
@media (max-width: 640px) {
  .trust-grid { flex-direction: column; align-items: flex-start; gap: 16px; }
  .trust-list { flex-direction: column; gap: 14px; }
}

/* ---------- 2026-10 v2: availability badge, copy e-mail, readability ---------- */
.status { display: inline-flex; align-items: center; gap: 8px; margin-left: 18px; padding: 5px 11px 5px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; line-height: 1.2; transition: border-color .3s var(--ease); }
.status:hover, .status:focus-visible { border-color: var(--ok); }
.status i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: 0 0 8px; }
.status i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--ok); opacity: 0; animation: status-pulse 2.4s var(--ease) infinite; }
@keyframes status-pulse { 0% { transform: scale(.5); opacity: .7; } 80%, 100% { transform: scale(1.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .status i::after { animation: none; } }
@media (max-width: 920px) { .header-in { gap: 10px; } .status { margin-left: 0; } }
@media (max-width: 380px) { .status { padding: 5px 9px; } .status span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 22px; }
.closing .mail-row .mail { margin-bottom: 0; }
.details .mail-row { margin: 0; }
.copy { font: inherit; font-size: .85rem; font-weight: 600; line-height: 1; padding: 9px 14px; min-height: 36px; border-radius: 999px; cursor: pointer; background: transparent; color: var(--ink); border: 1px solid var(--line); transition: border-color .3s var(--ease), background-color .3s var(--ease); }
.copy:hover, .copy:focus-visible { border-color: var(--gold); }
.copy.is-done { border-color: var(--ok); }
.closing .copy { color: var(--band-text); border-color: color-mix(in srgb, var(--band-text) 35%, var(--band)); }
.closing .copy:hover, .closing .copy:focus-visible { border-color: var(--band-text); }
.copy-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Readability: Instrument Sans for every long text */
body { line-height: 1.65; letter-spacing: .003em; }
.quote blockquote, .cs-quote blockquote { font-weight: 400; line-height: 1.7; letter-spacing: .002em; }
.sum, .hero-text, .cs-row p, .chapter-head p, .intro, .lede, .cs-lede { line-height: 1.65; }
/* Instrument Serif is a display face: larger titles, sans for small data */
.hero h1 { font-size: clamp(3.1rem, 7.4vw, 5.6rem); line-height: .98; }
.section-head h2, .quotes h2, .proof h2, .caps h2 { font-size: clamp(2.2rem, 3.9vw, 3.2rem); }
.closing h2 { font-size: clamp(2.3rem, 4.6vw, 3.75rem); }
.caption h3 { font-size: clamp(2.3rem, 3.9vw, 3.4rem); }
.mark { font-size: 1.4rem; }
.index .t { font-size: 1.55rem; }
.index .n, .count { font-family: var(--sans); font-size: .85rem; font-weight: 600; letter-spacing: .02em; }
.details a, .details b, .closing .mail, .m-mail { font-family: var(--sans); font-weight: 500; letter-spacing: 0; }
.details a, .details b { font-size: 1.05rem; }
.closing .mail { font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
.m-mail { font-size: 1rem; }
@media (max-width: 360px) { .mark { font-size: 1.2rem; } }

/* ---------- Case-study slides (2026-10-13) ---------- */
.slides { display: grid; gap: clamp(32px, 6vh, 64px); }
.slides.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.slides.spaced { margin-top: clamp(32px, 6vh, 64px); }
.slide { margin: 0; }
.slide .g-btn { border-radius: 12px; box-shadow: 0 30px 60px -34px rgba(var(--shadow), .45); }
.slide-hero .g-btn { border-radius: 14px; }
.slide figcaption { margin-top: 14px; display: grid; gap: 4px; }
.slide figcaption strong { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; line-height: 1.25; color: var(--ink); }
.slide figcaption span { color: var(--stone); font-size: .95rem; max-width: 68ch; }
.slide-cover { border-radius: 10px; box-shadow: 0 30px 60px -30px rgba(var(--shadow), .4); }
.slide-cover img { width: 100%; height: auto; }
.media:not(:has(.phone, .photo-small)) { padding-bottom: 0; }
.chapter .scores + .slides, .chapter .slides + .stats { margin-top: clamp(32px, 6vh, 56px); }
@media (max-width: 920px) { .slides.two { grid-template-columns: 1fr; } }
@media (hover: hover) and (pointer: fine) {
  .slide-cover { transition: transform .8s var(--ease); }
  .project:hover .slide-cover, .work-row:hover .slide-cover { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) { .slide-cover, .slide .g-btn img { transition: none; } }

/* ---------- Studio case-study intro ---------- */
.case-intro { padding-bottom: 0; }
.case-intro .chapter-head { margin-bottom: 0; }
.case-intro + .chapter { border-top: 0; }

/* ---------- Zoom hint icon on zoomable images ---------- */
.g-btn { position: relative; }
.g-btn::after { content: ""; position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(14, 26, 43, .72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'/%3E%3C/svg%3E") center / 18px no-repeat;
  opacity: .85; transition: opacity .3s var(--ease), transform .3s var(--ease); pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .g-btn::after { opacity: 0; transform: scale(.9); } .g-btn:hover::after, .g-btn:focus-visible::after { opacity: 1; transform: none; } }
@media (max-width: 640px) { .g-btn::after { width: 32px; height: 32px; right: 8px; bottom: 8px; background-size: 15px; } }

/* ---------- Gallery viewer ---------- */
.v-lock, .v-lock body { overflow: hidden; }
.viewer { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(7, 10, 16, var(--vfade, 1)); color: #E9EEF6; overflow: hidden; overscroll-behavior: contain; }
.viewer::backdrop { background: transparent; }
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: v-in .22s var(--ease); }
@keyframes v-in { from { opacity: 0; } to { opacity: 1; } }
.v-top { display: flex; justify-content: space-between; align-items: center; padding: max(12px, env(safe-area-inset-top)) 16px 8px; gap: 12px; }
.v-count { font-size: .9rem; letter-spacing: .08em; color: rgba(233, 238, 246, .75); font-variant-numeric: tabular-nums; }
.v-tools { display: flex; gap: 8px; }
.v-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(233, 238, 246, .22); background: rgba(255, 255, 255, .06); color: #E9EEF6;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: background-color .2s, border-color .2s; }
.v-btn:hover { background: rgba(255, 255, 255, .14); border-color: rgba(233, 238, 246, .45); }
.v-btn:focus-visible { outline: 2px solid #8FB4FF; outline-offset: 2px; }
.v-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.v-stage { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; margin: 0 clamp(8px, 4vw, 88px); cursor: zoom-in; }
.viewer.zoomed .v-stage { cursor: grab; }
.v-img { display: block; max-width: none; border-radius: 6px; transform-origin: center center; will-change: transform; -webkit-user-drag: none; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7); }
.v-img.anim { transition: transform .28s var(--ease); }
.v-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(7, 10, 16, .55); }
.v-prev { left: 16px; } .v-next { right: 16px; }
.v-cap { margin: 0 auto; max-width: 900px; padding: 10px 20px max(16px, env(safe-area-inset-bottom)); text-align: center; font-size: .92rem; line-height: 1.45; color: rgba(233, 238, 246, .72); }
.v-cap strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.15rem; color: #E9EEF6; }
.viewer.zoomed .v-cap, .viewer.zoomed .v-nav { opacity: 0; pointer-events: none; }
.v-hint { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); margin: 0; padding: 9px 16px; border-radius: 99px; background: rgba(22, 28, 40, .94); border: 1px solid rgba(233, 238, 246, .18);
  font-size: .82rem; text-align: center; width: max-content; max-width: calc(100vw - 32px); opacity: 0; pointer-events: none; transition: opacity .4s; }
.viewer.hint .v-hint { opacity: 1; }
@media (pointer: coarse) { .v-nav, .v-zin, .v-zout { display: none; } .v-stage { cursor: default; } }
@media (max-width: 640px) { .v-stage { margin: 0; } .v-img { border-radius: 0; } .v-cap { font-size: .85rem; } .v-cap strong { font-size: 1rem; } }
@media (prefers-reduced-motion: reduce) { .viewer[open] { animation: none; } }
.v-btn[hidden] { display: none; }
