/* ==========================================================================
   codariva — core stylesheet
   Tokens → base → layout → chrome (header/menu/footer) → components → case
   Page-specific styles live in assets/css/pages/*.css
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink: #0b0b0c;
  --ink-2: #2a2a2d;
  --muted: #67676d;
  --paper: #ffffff;
  --paper-2: #f4f3f0;
  --paper-3: #e9e7e2;
  --line: rgba(11, 11, 12, 0.13);
  --line-strong: rgba(11, 11, 12, 0.88);
  --accent: #2e3cff;
  --accent-ink: #ffffff;
  --danger: #d92d20;

  --font-sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;

  --fs-display: clamp(2.6rem, 1.15rem + 4.9vw, 6.75rem);
  --fs-h1: clamp(2.25rem, 1.3rem + 3.3vw, 5rem);
  --fs-h2: clamp(1.75rem, 1.2rem + 1.9vw, 3.25rem);
  --fs-h3: clamp(1.3rem, 1.1rem + 0.7vw, 1.875rem);
  --fs-h4: clamp(1.125rem, 1.05rem + 0.3vw, 1.3rem);
  --fs-lead: clamp(1.3rem, 1.12rem + 0.65vw, 1.75rem);
  --fs-body: clamp(1.0625rem, 1.03rem + 0.15vw, 1.1875rem);
  --fs-small: 0.9375rem;
  --fs-label: 0.875rem;
  --fs-micro: 0.75rem;

  --container: 1520px;
  --gutter: clamp(20px, 4.2vw, 72px);
  --col-gap: clamp(16px, 2vw, 32px);
  --section: clamp(80px, 10vw, 176px);
  --header-h: 76px;
  --radius: 6px;
  --radius-lg: 12px;

  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.6s;

  /* Case colours — overridden per case page / card */
  --case: var(--paper-2);
  --case-ink: var(--ink);
  --case-soft: var(--paper-2);
}

@media (max-width: 899px) {
  :root { --header-h: 64px; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}
body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video, canvas, picture { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul[role="list"], ol[role="list"], .list-reset { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.28s var(--ease-in-out) both; }
::view-transition-new(root) { animation: vt-in 0.42s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Typography ---------- */
p, .serif { font-family: var(--font-serif); font-weight: 400; }
.sans { font-family: var(--font-sans); }

.display {
  font-family: var(--font-sans);
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.042em;
}
.h1, h1 { font-size: var(--fs-h1); line-height: 1.02; letter-spacing: -0.038em; }
.h2, h2 { font-size: var(--fs-h2); line-height: 1.06; letter-spacing: -0.03em; }
.h3, h3 { font-size: var(--fs-h3); line-height: 1.16; letter-spacing: -0.02em; }
.h4, h4 { font-size: var(--fs-h4); line-height: 1.3; letter-spacing: -0.01em; }
.lead {
  font-family: var(--font-serif);
  font-size: var(--fs-lead);
  line-height: 1.38;
  letter-spacing: -0.005em;
}
.body-lg { font-size: clamp(1.125rem, 1.06rem + 0.3vw, 1.3125rem); line-height: 1.55; }
.small { font-size: var(--fs-small); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
}
.label--mark::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--mark, var(--accent));
  flex: none;
}
.label--muted { color: var(--muted); }
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.prose > * + * { margin-top: 1.05em; }
.prose p { font-size: var(--fs-body); line-height: 1.62; color: var(--ink-2); }
.prose h3 { margin-top: 2em; }
.prose ul { padding-left: 1.1em; font-family: var(--font-serif); }
.prose li + li { margin-top: 0.4em; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose > p.lead { font-size: var(--fs-lead); line-height: 1.38; color: inherit; text-wrap: balance; }
.prose > p:not(.lead) { max-width: 40rem; }
.prose > .lead + p { margin-top: clamp(24px, 2.6vw, 40px); }
.prose > :is(h2, .h2) + p { margin-top: clamp(20px, 2.2vw, 32px); }
figcaption, .stat__label, .case-card__tags, .index-list__meta { text-wrap: pretty; }

/* ---------- Links & buttons ---------- */
.link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-decoration-thickness 0.2s var(--ease), color 0.2s;
}
.link:hover { text-decoration-thickness: 2px; }
.link--ink { color: inherit; }
.link--arrow { text-decoration: none; display: inline-flex; align-items: center; gap: 0.45em; font-family: var(--font-sans); font-weight: 500; }
.link--arrow::after { content: "→"; transition: transform 0.35s var(--ease-out); }
.link--arrow:hover::after { transform: translateX(5px); }
.link--arrow:hover { text-decoration: none; }
.link--arrow span { background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; transition: background-size 0.35s var(--ease-out); }
.link--arrow:hover span { background-size: 0 1px; background-position: 100% 100%; }

.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bg);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { --btn-bg: var(--accent); --btn-fg: var(--accent-ink); }
.btn:active { transform: scale(0.98); }
.btn__arrow { display: inline-block; transition: transform 0.35s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--sm { min-height: 40px; padding: 0.6em 1.15em; font-size: 0.9375rem; }
.btn--lg { min-height: 64px; padding: 1em 2em; font-size: 1.125rem; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--light { --btn-bg: var(--paper); --btn-fg: var(--ink); }
.btn--light:hover { --btn-bg: var(--accent); --btn-fg: var(--accent-ink); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.chip--demo { border-style: dashed; border-color: var(--line-strong); }
.chip--demo::before { content: ""; width: 7px; height: 7px; border-radius: 1.5px; background: var(--accent); }

/* Honesty label for concept demos — dashed box echoes the logo's empty module */
.demo-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 62ch;
  padding: 14px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--ink-2);
}
.demo-note::before { content: ""; flex: none; width: 9px; height: 9px; margin-top: 0.42em; border-radius: 2px; background: var(--accent); }
.demo-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.2em; }
a.chip { transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s; }
a.chip:hover { border-color: var(--line-strong); }

/* ---------- Layout ---------- */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}
.container--wide { width: min(100% - 2 * var(--gutter), 1840px); margin-inline: auto; }
.bleed { width: 100%; }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}

/* Editorial split: label column + content column */
.split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 28px;
}
.split > * { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .split__label { grid-column: 1 / span 3; }
  .split__body { grid-column: 4 / -1; }
  .split__body--narrow { grid-column: 4 / span 7; }
  .split__body--mid { grid-column: 4 / span 8; }
  .split__label--sticky { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
}
.split__label { padding-top: 0.35em; }

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(56px, 6.5vw, 112px); }
.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }
.section--ruled > .container { border-top: 1px solid var(--line); padding-top: clamp(40px, 4.5vw, 72px); }
.hairline { border: 0; border-top: 1px solid var(--line); }

.stack > * + * { margin-top: var(--stack, 24px); }
.stack-sm { --stack: 12px; }
.stack-lg { --stack: 40px; }
.stack-xl { --stack: clamp(48px, 6vw, 96px); }

.theme-dark {
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.9);
  --muted: #a3a3a8;
  --ink-2: #d9d9dc;
  background: var(--ink);
  color: var(--paper);
}
.theme-dark .btn { --btn-bg: var(--paper); --btn-fg: var(--ink); }
.theme-dark .btn:hover { --btn-bg: var(--accent); --btn-fg: var(--accent-ink); }
.theme-dark .btn--ghost { background: transparent; color: var(--paper); border-color: var(--line-strong); }
.theme-dark .btn--ghost:hover { background: var(--paper); color: var(--ink); }
.theme-dark .prose p { color: var(--ink-2); }
.theme-dark .link { color: #9aa2ff; }
.theme-soft { background: var(--paper-2); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  padding: 10px 16px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 500; transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- Brand module grid (icon motif) ---------- */
.modgrid {
  --size: 96px;
  --gap: 8%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--size) * 0.08);
  width: var(--size);
  aspect-ratio: 1;
  color: inherit;
}
.modgrid i {
  display: block;
  aspect-ratio: 1;
  border-radius: 10.7%;
  background: currentColor;
}
.modgrid i:nth-child(6) { grid-column: 1; }
.js .modgrid--animate i { animation: mod-in 0.9s var(--ease-out) backwards; }
.modgrid--animate i:nth-child(1) { animation-delay: 0.05s; }
.modgrid--animate i:nth-child(2) { animation-delay: 0.12s; }
.modgrid--animate i:nth-child(3) { animation-delay: 0.19s; }
.modgrid--animate i:nth-child(4) { animation-delay: 0.26s; }
.modgrid--animate i:nth-child(5) { animation-delay: 0.33s; }
.modgrid--animate i:nth-child(6) { animation-delay: 0.40s; }
.modgrid--animate i:nth-child(7) { animation-delay: 0.47s; }
.modgrid--animate i:nth-child(8) { animation-delay: 0.54s; }
@keyframes mod-in {
  from { opacity: 0; transform: scale(0.4) rotate(-12deg); }
  to { opacity: 1; transform: none; }
}
.modgrid--hover i { transition: transform 0.5s var(--ease-out), background-color 0.3s; }
.modgrid--hover:hover i:nth-child(odd) { transform: translateY(-14%); }
.modgrid--hover:hover i:nth-child(even) { transform: translateY(14%); }
.modgrid--hover:hover i:nth-child(5) { background: var(--accent); }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; z-index: 120;
  height: 3px;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  color: var(--ink);
  transition: transform 0.45s var(--ease-out), background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  z-index: -1;
}
.site-header.is-scrolled::before { opacity: 1; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
body.menu-open .site-header { transform: none; }

/* Pages with a dark/colour hero start with a light header */
.header-on-dark .site-header:not(.is-scrolled) { color: var(--paper); }
.header-on-dark .site-header:not(.is-scrolled) .btn { --btn-bg: var(--paper); --btn-fg: var(--ink); }
.header-on-dark .site-header:not(.is-scrolled) .btn:hover { --btn-bg: var(--accent); --btn-fg: var(--accent-ink); }

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  --h: 27px;
  position: relative;
  display: block;
  height: var(--h);
  width: calc(var(--h) * 5.7757);
  overflow: hidden;
  color: inherit;
  transition: width 0.55s var(--ease-out);
  flex: none;
}
.logo svg { height: 100%; width: auto; max-width: none; }
.logo .logo__word { transition: opacity 0.35s var(--ease); }
.site-header.is-scrolled .logo { width: calc(var(--h) * 0.86); }
.site-header.is-scrolled .logo .logo__word { opacity: 0; }
.site-header.is-scrolled .logo:hover,
.site-header.is-scrolled .logo:focus-visible { width: calc(var(--h) * 5.7757); }
.site-header.is-scrolled .logo:hover .logo__word,
.site-header.is-scrolled .logo:focus-visible .logo__word { opacity: 1; }
@media (max-width: 899px) { .logo { --h: 23px; } }

.site-nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }
.site-nav__list { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); list-style: none; }
.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  padding-block: 6px;
}
.site-nav__link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform 0.4s var(--ease-out);
}
.site-nav__link:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.site-nav__link[aria-current="page"]::before {
  content: "";
  width: 7px; height: 7px; border-radius: 1.5px;
  background: var(--accent);
}

.menu-toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  margin-right: -10px;
  border-radius: 50%;
}
.menu-toggle span {
  position: absolute; left: 12px; right: 12px;
  height: 1.5px; background: currentColor;
  transition: transform 0.45s var(--ease-out), opacity 0.2s;
}
.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 25px; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 899px) {
  .site-nav__list, .site-nav .btn { display: none; }
  .menu-toggle { display: block; }
}

/* ---------- Mobile menu ---------- */
.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  background: var(--ink);
  color: var(--paper);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.7s var(--ease-out), visibility 0s linear 0.7s;
  overflow-y: auto;
}
.menu-open .menu-panel {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path 0.7s var(--ease-out), visibility 0s;
}
.menu-open .site-header { color: var(--paper); }
.menu-open .site-header::before { opacity: 0; }
.menu-open .site-header.is-scrolled { border-bottom-color: transparent; }
.menu-panel__list { list-style: none; display: grid; gap: 4px; }
.menu-panel__link {
  display: flex; align-items: baseline; gap: 14px;
  font-size: clamp(2.4rem, 10vw, 3.6rem);
  font-weight: 600; letter-spacing: -0.04em; line-height: 1.08;
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s var(--ease-out), transform 0.7s var(--ease-out), color 0.2s;
}
.menu-panel__link small { font-size: var(--fs-micro); font-weight: 500; letter-spacing: 0.04em; color: #8a8a90; transform: translateY(-1.6em); }
.menu-panel__link[aria-current="page"] { color: #9aa2ff; }
.menu-open .menu-panel__link { opacity: 1; transform: none; }
.menu-open .menu-panel__list li:nth-child(1) .menu-panel__link { transition-delay: 0.12s; }
.menu-open .menu-panel__list li:nth-child(2) .menu-panel__link { transition-delay: 0.17s; }
.menu-open .menu-panel__list li:nth-child(3) .menu-panel__link { transition-delay: 0.22s; }
.menu-open .menu-panel__list li:nth-child(4) .menu-panel__link { transition-delay: 0.27s; }
.menu-open .menu-panel__list li:nth-child(5) .menu-panel__link { transition-delay: 0.32s; }
.menu-panel__foot {
  margin-top: auto;
  padding-top: 40px;
  display: grid; gap: 20px;
  font-size: var(--fs-small);
  color: #b5b5ba;
}
.menu-panel__foot a { color: var(--paper); }
body.menu-open { overflow: hidden; }
@media (min-width: 900px) { .menu-panel { display: none; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.9);
  --muted: #9d9da3;
  padding-top: clamp(72px, 9vw, 152px);
  overflow: hidden;
}
.site-footer a { transition: color 0.2s; }
.site-footer a:hover { color: #9aa2ff; }
.footer-cta { display: grid; gap: 28px; padding-bottom: clamp(64px, 8vw, 128px); }
.footer-cta__title { font-size: var(--fs-h1); line-height: 1.02; letter-spacing: -0.04em; max-width: 14ch; }
.footer-cta__side { display: grid; gap: 24px; justify-items: start; }
.footer-cta__mail {
  justify-self: start;
  font-family: var(--font-serif);
  font-size: var(--fs-lead);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
@media (min-width: 900px) {
  .footer-cta { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; }
  .footer-cta__title { grid-column: 1 / span 8; }
  .footer-cta__side { grid-column: 9 / -1; justify-self: end; display: grid; gap: 20px; justify-items: end; }
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px var(--col-gap);
  padding-block: 48px;
  border-top: 1px solid var(--line);
}
.footer-col--news, .footer-col--wide { grid-column: 1 / -1; }
body[data-page="iletisim"] .footer-cta { display: none; }
body[data-page="iletisim"] .site-footer { padding-top: clamp(48px, 6vw, 96px); }
body[data-page="iletisim"] .footer-cols { border-top: 0; }
.footer-legal a[aria-current="page"] { color: var(--paper); }
@media (min-width: 900px) { .footer-cols { grid-template-columns: repeat(12, minmax(0, 1fr)); } .footer-col, .footer-col--news, .footer-col--wide { grid-column: span 4; } }
.footer-col h2 { font-size: var(--fs-label); font-weight: 500; color: var(--muted); letter-spacing: 0; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: grid; gap: 8px; font-size: var(--fs-small); }
.footer-col address { font-style: normal; font-family: var(--font-serif); font-size: 1rem; line-height: 1.5; }
.footer-mark {
  display: block;
  width: 100%;
  padding-top: clamp(24px, 3vw, 48px);
  color: var(--paper);
}
.footer-mark svg { width: 100%; height: auto; }
.footer-legal {
  display: flex; flex-wrap: wrap; gap: 12px 28px;
  justify-content: space-between;
  padding-block: 24px 32px;
  font-size: var(--fs-micro);
  color: var(--muted);
}
.footer-legal ul { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; }

/* ---------- Page hero (generic inner pages) ---------- */
.page-hero {
  padding-top: calc(var(--header-h) + clamp(56px, 9vw, 152px));
  padding-bottom: clamp(48px, 6vw, 96px);
}
.page-hero__title { font-size: var(--fs-display); line-height: 0.98; letter-spacing: -0.042em; max-width: 16ch; }
.page-hero__lead { margin-top: clamp(24px, 3vw, 40px); max-width: 44ch; }

/* ---------- Case card ---------- */
.case-card { display: block; color: inherit; }
.case-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  background: var(--case);
  isolation: isolate;
}
.case-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}
.case-card:hover .case-card__media img { transform: scale(1.035); }
.case-card__meta { display: grid; gap: 6px; padding-top: 18px; }
.case-card__client {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--fs-h4); font-weight: 600; letter-spacing: -0.015em; line-height: 1.25;
}
.case-card__client::before {
  content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--case-dot, var(--case)); flex: none;
}
.case-card__desc { font-family: var(--font-serif); color: var(--muted); font-size: 1.0625rem; line-height: 1.45; max-width: 46ch; }
.case-card:hover .case-card__desc { color: var(--ink-2); }
.case-card__tags { font-size: var(--fs-micro); color: var(--muted); font-weight: 500; letter-spacing: 0.02em; margin-top: 4px; }
.case-card--tall .case-card__media { aspect-ratio: 4 / 5; }
.case-card--wide .case-card__media { aspect-ratio: 16 / 10; }
@media (min-width: 760px) { .case-card--wide .case-card__media { aspect-ratio: 16 / 9; } }
.case-card__media img { object-position: var(--focus, 50% 50%); }

.case-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(48px, 6vw, 96px) var(--col-gap);
}
@media (min-width: 760px) {
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-grid > .case-card--wide { grid-column: 1 / -1; }
  .case-grid--offset > :nth-child(even of .case-card:not(.case-card--wide, .is-filtered-out)) { margin-top: clamp(0px, 8vw, 140px); }
}

/* ---------- Cursor label ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 150;
  width: 104px; height: 104px;
  margin: -52px 0 0 -52px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.875rem; font-weight: 600;
  pointer-events: none;
  transform: translate3d(var(--x, -200px), var(--y, -200px), 0) scale(0);
  transition: transform 0.35s var(--ease-out);
  will-change: transform;
}
.cursor.is-active { transform: translate3d(var(--x), var(--y), 0) scale(1); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Index list (big rows) ---------- */
.index-list { list-style: none; border-bottom: 1px solid var(--line); }
.index-list > li { border-top: 1px solid var(--line); }
.index-list__link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: clamp(16px, 2vw, 32px);
  padding-block: clamp(18px, 2.2vw, 30px);
  transition: color 0.25s var(--ease);
}
.index-list__num { font-size: var(--fs-label); font-weight: 500; color: var(--muted); min-width: 2.2em; font-variant-numeric: tabular-nums; }
.index-list__title {
  font-size: var(--fs-h2); font-weight: 600; letter-spacing: -0.03em; line-height: 1.06;
  transition: transform 0.5s var(--ease-out);
}
.index-list__meta { display: block; margin-top: 8px; font-family: var(--font-serif); font-size: 1.0625rem; font-weight: 400; letter-spacing: 0; color: var(--muted); max-width: 64ch; line-height: 1.45; }
.index-list__arrow { font-size: var(--fs-h3); transition: transform 0.5s var(--ease-out), opacity 0.3s; opacity: 0.35; }
a.index-list__link:hover { color: var(--accent); }
a.index-list__link:hover .index-list__title { transform: translateX(clamp(6px, 1vw, 16px)); }
a.index-list__link:hover .index-list__arrow { transform: translateX(6px); opacity: 1; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 56px) var(--col-gap);
  container-type: inline-size;
}
@media (min-width: 600px) { .stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } .stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat { border-top: 1px solid var(--line); padding-top: 20px; display: grid; gap: 10px; align-content: start; }
.stat__value {
  font-size: min(clamp(2.5rem, 1.6rem + 3.2vw, 5rem), 13.5cqi);
  font-weight: 600; letter-spacing: -0.045em; line-height: 0.95;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (min-width: 900px) {
  .stats .stat__value { font-size: min(clamp(2.5rem, 1.6rem + 3.2vw, 5rem), 6.2cqi); }
  .stats--3 .stat__value { font-size: min(clamp(2.5rem, 1.6rem + 3.2vw, 5rem), 8.4cqi); }
}
.stat__value small { font-size: 0.42em; letter-spacing: -0.01em; margin-left: 0.12em; font-weight: 600; }
.stat__label { font-family: var(--font-serif); color: var(--muted); font-size: 1.0625rem; line-height: 1.4; max-width: 26ch; }

/* ---------- Quote ---------- */
.quote { display: grid; gap: 28px; }
.quote__text {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 1.15rem + 1.75vw, 3rem);
  line-height: 1.18;
  letter-spacing: -0.015em;
  font-weight: 400;
  text-wrap: balance;
}
.quote__text { position: relative; }
.quote__text::before { content: "“"; position: absolute; left: 0; transform: translateX(-100%); }
.quote__text::after { content: "”"; }
.quote__cite { font-style: normal; display: grid; gap: 2px; font-size: var(--fs-small); }
.quote__cite strong { font-weight: 600; }
.quote__cite span { color: var(--muted); }

/* ---------- Feature list (numbered) ---------- */
.features { display: grid; gap: clamp(32px, 4vw, 48px) var(--col-gap); grid-template-columns: 1fr; list-style: none; counter-reset: feat; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .features--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.feature { border-top: 1px solid var(--line); padding-top: 20px; display: grid; gap: 10px; align-content: start; counter-increment: feat; }
.feature::before { content: counter(feat, decimal-leading-zero); font-size: var(--fs-label); font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.feature h3 { font-size: var(--fs-h4); }
.feature p { color: var(--muted); font-size: 1.0625rem; line-height: 1.5; }

/* ---------- Steps (process) ---------- */
.steps { display: grid; grid-template-columns: 1fr; gap: 0 var(--col-gap); list-style: none; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.step { border-top: 1px solid var(--line-strong); padding: 20px 0 40px; display: grid; gap: 12px; grid-template-rows: auto auto 1fr auto; align-content: start; }
.step__num { font-size: var(--fs-label); font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.step h3 { font-size: var(--fs-h3); }
.step p { color: var(--muted); font-size: 1.0625rem; line-height: 1.5; }
.step__time { font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }

/* ---------- Solution-area list ---------- */
.client-list { display: grid; grid-template-columns: 1fr; gap: clamp(40px, 5vw, 72px) var(--col-gap); list-style: none; }
@media (min-width: 640px) { .client-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .client-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.client { display: grid; gap: 12px; align-content: start; }
.client h3 { font-size: var(--fs-h3); }
.client p { color: var(--ink-2); font-size: 1.0625rem; line-height: 1.5; max-width: 34ch; }
.client .link { margin-top: 8px; justify-self: start; font-family: var(--font-sans); font-size: var(--fs-small); }

/* ---------- Logo wall (text wordmarks) ---------- */
.logo-wall {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  list-style: none;
}
@media (min-width: 700px) { .logo-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .logo-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.logo-wall > li {
  display: grid; place-items: center;
  min-height: clamp(100px, 11vw, 168px);
  padding: 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.45rem);
  font-weight: 600; letter-spacing: -0.03em;
  text-align: center;
  transition: background-color 0.3s var(--ease), color 0.3s;
}
.logo-wall > li:hover { background: var(--paper-2); }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; display: flex; user-select: none; --marquee-dur: 48s; }
.marquee__track {
  display: flex; flex: none; align-items: center;
  gap: clamp(40px, 5vw, 88px);
  padding-right: clamp(40px, 5vw, 88px);
  animation: marquee var(--marquee-dur) linear infinite;
  list-style: none;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { font-size: var(--fs-h2); font-weight: 600; letter-spacing: -0.035em; white-space: nowrap; display: inline-flex; align-items: center; gap: clamp(40px, 5vw, 88px); }
.marquee__item::after { content: ""; width: 0.32em; height: 0.32em; border-radius: 0.06em; background: currentColor; opacity: 0.25; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.9rem; font-weight: 500; line-height: 1.2;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.filter-btn:hover { border-color: var(--line-strong); }
.filter-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter-btn sup { font-size: 0.7em; margin-left: 3px; color: var(--muted); }
.filter-btn[aria-pressed="true"] sup { color: #b5b5ba; }
.is-filtered-out { display: none !important; }

/* ---------- Accordion ---------- */
.acc { border-bottom: 1px solid var(--line); }
.acc__item { border-top: 1px solid var(--line); }
.acc__item summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding-block: 24px;
  font-size: var(--fs-h4); font-weight: 600; letter-spacing: -0.015em;
}
.acc__item summary::-webkit-details-marker { display: none; }
.acc__item summary::after {
  content: "+"; font-weight: 400; font-size: 1.6em; line-height: 1;
  transition: transform 0.35s var(--ease-out);
}
.acc__item[open] summary::after { transform: rotate(45deg); }
.acc__body { padding-bottom: 28px; max-width: 64ch; }
.acc__body p { color: var(--ink-2); }

/* ---------- Forms ---------- */
.form { display: grid; gap: clamp(28px, 3vw, 40px); }
.form__row { display: grid; gap: clamp(28px, 3vw, 40px) var(--col-gap); }
@media (min-width: 700px) { .form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { display: grid; gap: 8px; align-content: start; }
.field__label { font-size: var(--fs-label); font-weight: 500; }
.field__label .opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  font-family: var(--font-serif);
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);
  line-height: 1.4;
  transition: border-color 0.2s;
  appearance: none;
}
.field textarea { min-height: 140px; resize: vertical; }
.field select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230b0b0c' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 4px center; padding-right: 28px; cursor: pointer; }
.field input::placeholder, .field textarea::placeholder { color: #a5a5aa; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 0 var(--accent); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-bottom-color: var(--danger); }
.field__error { font-family: var(--font-sans); font-size: var(--fs-micro); line-height: 1.5; color: var(--danger); font-weight: 500; min-height: 1.5em; }
.field select { padding-right: 36px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.choices legend .opt { margin-left: 6px; color: var(--muted); font-weight: 400; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; border: 0; }
.choices legend { margin-bottom: 14px; font-size: var(--fs-label); font-weight: 500; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9375rem; font-weight: 500;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.choice:hover span { border-color: var(--line-strong); }
.choice input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-small); line-height: 1.5; color: var(--ink-2); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.form-success {
  display: grid; gap: 16px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--paper-2);
}

/* ==========================================================================
   Case study page
   ========================================================================== */
.case-hero {
  padding-top: calc(var(--header-h) + clamp(48px, 8vw, 136px));
  padding-bottom: clamp(40px, 5vw, 80px);
}
.case-hero__client { --mark: var(--case-dot, var(--case)); }
.case-hero__title { font-size: var(--fs-h1); line-height: 1.02; letter-spacing: -0.04em; max-width: 18ch; }
.case-hero__intro { margin-top: clamp(24px, 3vw, 40px); max-width: 44ch; color: var(--ink-2); }

.case-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px var(--col-gap);
  margin-top: clamp(40px, 5vw, 72px);
}
@media (min-width: 900px) { .case-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.case-meta > div { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 6px; align-content: start; }
.case-meta dt { font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.case-meta dd { font-size: var(--fs-small); font-weight: 500; line-height: 1.45; }

.case-cover {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--case);
  aspect-ratio: 16 / 9;
}
.case-cover img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 699px) { .case-cover { aspect-ratio: 16 / 10; } }

.case-figure { display: grid; gap: 14px; }
.case-figure__media { overflow: hidden; border-radius: var(--radius); background: var(--case-soft); }
.case-figure__media img { width: 100%; height: auto; }
.case-figure figcaption { font-size: var(--fs-label); color: var(--muted); max-width: 60ch; }
.case-pair { display: grid; gap: clamp(40px, 11vw, 56px) var(--col-gap); grid-template-columns: 1fr; }
@media (min-width: 760px) { .case-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }

.case-band { background: var(--case); color: var(--case-ink); }
.case-band { --line: color-mix(in srgb, var(--case-ink) 22%, transparent); --muted: color-mix(in srgb, var(--case-ink) 88%, transparent); }
.case-band .stat__label { color: var(--case-ink); }
.case-soft { background: var(--case-soft); }

.case-stack { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }

.case-next { display: block; color: inherit; }
.case-next__inner { display: grid; gap: 28px; align-items: end; }
@media (min-width: 900px) { .case-next__inner { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); } .case-next__text { grid-column: 1 / span 6; } .case-next__media { grid-column: 7 / -1; } }
.case-next__title { font-size: var(--fs-display); letter-spacing: -0.045em; line-height: 0.96; transition: color 0.3s var(--ease); }
.case-next:hover .case-next__title { color: var(--accent); }
.case-next__media { overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 10; background: var(--case-next, var(--paper-2)); }
.case-next__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); }
.case-next:hover .case-next__media img { transform: scale(1.04); }

/* ==========================================================================
   Motion: reveal on scroll (only when JS is running)
   ========================================================================== */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="scale"] { transform: scale(0.97); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease-out); transition-delay: calc(var(--wi, 0) * 45ms + 0.1s); }
.js [data-split].is-in .w > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .js [data-split] .w > span { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
}

/* Static mode for screenshots / QA: append ?shot to the URL */
.shot *, .shot *::before, .shot *::after { animation: none !important; transition: none !important; }
.shot [data-reveal], .shot [data-split] .w > span { opacity: 1 !important; transform: none !important; }
.shot .modgrid i { opacity: 1; transform: none; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0 !important; }
.mt-s { margin-top: 16px; }
.mt-m { margin-top: clamp(24px, 3vw, 40px); }
.mt-l { margin-top: clamp(40px, 5vw, 72px); }
.mt-xl { margin-top: clamp(64px, 8vw, 128px); }
.max-20 { max-width: 20ch; }
.max-30 { max-width: 30ch; }
.max-40 { max-width: 40ch; }
.max-60 { max-width: 60ch; }
.text-right { text-align: right; }
.row-between { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; }
