/* tokens.css */
/* ibrahim.im design tokens (docs/BRAND.md). New tints only here (R2). */
@font-face { font-family: 'Playfair Display'; font-weight: 400 700; font-display: swap; src: url('../assets/fonts/playfair-latin-var.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400 700; font-display: swap; src: url('../assets/fonts/inter-latin-var.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 400 700; font-display: swap; src: url('../assets/fonts/spacegrotesk-latin-var.woff2') format('woff2'); }

:root {
  /* brand */
  --blue: #2563eb;
  --blue-300: #60a5fa;
  --blue-700: #1d4ed8;
  --blue-char: #1e7bff;
  --grad: linear-gradient(135deg, #60a5fa 0%, #2563eb 50%, #1d4ed8 100%);
  --grad-h: linear-gradient(90deg, #60a5fa 0%, #2563eb 55%, #1d4ed8 100%);
  --tint: rgba(37, 99, 235, .1);
  --tint-2: rgba(37, 99, 235, .05);
  /* neutrals */
  --ink: #0f1f3d;          /* deep navy for dark bands and strong text */
  --navy: #002159;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --bg-3: #f1f5fb;
  /* type */
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --ui: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --fs-hero: clamp(3.6rem, 10.5vw, 9rem);
  --fs-h1: clamp(2.6rem, 6vw, 4.8rem);
  --fs-h2: clamp(2.2rem, 4.6vw, 3.8rem);
  --fs-h3: clamp(1.35rem, 2vw, 1.75rem);
  --fs-lede: clamp(1.05rem, 1.4vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: .875rem;
  /* space + shape */
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --section: clamp(4.5rem, 10vw, 8rem);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --shadow-soft: 0 4px 6px -1px rgba(0,0,0,.05), 0 2px 4px -1px rgba(0,0,0,.03);
  --shadow: 0 10px 15px -3px rgba(0,0,0,.07), 0 4px 6px -2px rgba(0,0,0,.04);
  --shadow-lg: 0 25px 50px -12px rgba(0,0,0,.15);
  --shadow-blue: 0 18px 40px -16px rgba(37,99,235,.55);
  /* motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  --header-h: 80px;
}

/* base.css */
/* Base, layout primitives and shared components (header, buttons, eyebrow, footer). */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
html, body { overflow-x: clip; }
body { font: 400 var(--fs-body)/1.7 var(--sans); color: var(--slate-500); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 999; background: var(--blue); color: #fff; padding: .6rem 1rem; border-radius: var(--r-sm); text-decoration: none; font-weight: 600; }
.skip:focus { top: 1rem; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section); }
.band-2 { background: var(--bg-2); }
.band-dark { background: var(--ink); color: #c7d2e6; }
.band-dark h2, .band-dark h3 { color: #fff; }

/* type */
h1, h2, h3 { color: var(--slate-700); font-weight: 700; letter-spacing: -.02em; }
.h-serif { font-family: var(--serif); }
.h2 { font-family: var(--serif); font-size: var(--fs-h2); line-height: 1.08; }
.h3 { font-family: var(--serif); font-size: var(--fs-h3); line-height: 1.25; font-weight: 600; }
.lede { font-size: var(--fs-lede); line-height: 1.6; color: var(--slate-500); max-width: 38rem; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; padding-bottom: .06em; }
/* split headlines: gradient text can't paint through transformed children, so each word carries it */
.grad.is-split { background: none; -webkit-text-fill-color: currentColor; color: inherit; }
.grad.is-split .w { background: var(--grad); background-size: var(--gw, 300%) 100%; background-position: var(--gx, 0) 0; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; padding-bottom: .06em; }
strong { color: var(--slate-700); font-weight: 600; }

/* eyebrow with side lines (old-site pattern, R2) */
.eyebrow { display: flex; align-items: center; gap: 1.1rem; font: 600 .82rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--blue); margin-bottom: 1.25rem; }
.eyebrow::before, .eyebrow::after { content: ''; width: 48px; height: 1px; background: currentColor; opacity: .35; }
.eyebrow.left::before { display: none; }
.center { text-align: center; }
.center .eyebrow { justify-content: center; }
.center .lede { margin-inline: auto; }
.head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.head .lede { margin-top: 1rem; }

/* buttons */
.btn { --bg: var(--grad); display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 52px; padding: .95rem 1.9rem; border: 0; border-radius: var(--r-pill); background: var(--bg); color: #fff; font: 600 1.02rem/1 var(--sans); text-decoration: none; box-shadow: var(--shadow-blue); transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 24px 44px -16px rgba(37,99,235,.65); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn.light { --bg: #fff; color: var(--blue); box-shadow: var(--shadow); }
.btn.ghost { --bg: transparent; color: var(--slate-700); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--blue); color: var(--blue); }
.link { display: inline-flex; align-items: center; gap: .5rem; color: var(--slate-500); font-weight: 600; text-decoration: none; transition: color .25s, gap .25s; }
.link:hover { color: var(--blue); gap: .75rem; }
.link svg { width: 16px; height: 16px; }
.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* shared components (home + work) */
.h1 { font-family: var(--serif); font-size: var(--fs-h1); line-height: 1.04; letter-spacing: -.03em; }
.grad-light { background: linear-gradient(135deg, #93c5fd, #60a5fa 50%, #3b82f6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta-card { position: relative; width: 100%; max-width: 920px; margin-top: 1rem; padding: clamp(2.75rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem); border-radius: var(--r-lg); background: var(--grad); color: rgba(255,255,255,.92); text-align: center; box-shadow: 0 30px 60px -25px rgba(37,99,235,.7); }
.cta-card h2, .cta-card h3 { font: 600 clamp(1.9rem, 3.6vw, 2.8rem)/1.15 var(--serif); color: #fff; margin-bottom: .8rem; }
.cta-card .doodle > svg { color: #fff; }
.cta-card p { max-width: 42ch; margin: 0 auto 1.8rem; font-size: 1.08rem; }
.cta-char { --w: clamp(130px, 14vw, 190px); left: clamp(-1rem, -2vw, 0rem); top: 0; translate: 0 -78%; }
.card-proof { margin: 1.6rem 0 0 !important; font: 600 .8rem/1.4 var(--ui) !important; letter-spacing: .12em; text-transform: uppercase; color: #dbeafe; }
.mini-logos { display: flex; justify-content: center; gap: 1.6rem; margin-top: 1.8rem; align-items: center; }
.mini-logos img { height: 22px; width: auto; filter: brightness(0) invert(1); opacity: .75; }


/* header */
.hdr { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h); display: flex; align-items: center; transition: background .35s, box-shadow .35s, transform .4s var(--ease-io); }
.hdr.is-scrolled { background: rgba(255,255,255,.9); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); box-shadow: 0 1px 0 var(--line); }
.hdr .wrap { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.hdr .logo img, .hdr .logo .logo-svg { display: block; width: 116px; height: auto; overflow: visible; }
/* logo intro (once per visit, set in head.html): letters rise from the baseline, the i's dot drops, ".im" lands (core.js) */
.logo-svg .L { transform-box: fill-box; transform-origin: 50% 100%; }
.logo-intro .hdr .logo-svg .L { opacity: 0; }
.nav { display: flex; gap: 2.2rem; }
.nav a { font: 500 .92rem/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--navy); text-decoration: none; position: relative; padding-block: .5rem; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--grad-h); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.nav a:hover::after, .nav a[aria-current=page]::after { transform: scaleX(1); }
.hdr .btn { min-height: 44px; padding: .7rem 1.3rem; font-size: .92rem; }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: none; color: var(--navy); align-items: center; justify-content: center; }
.menu-btn svg { width: 26px; height: 26px; }

/* floating CTA (phones): visible after the hero, hidden while the contact form is on screen (R16) */
.float-cta { position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 90; display: none; align-items: center; gap: .5rem; padding: .95rem 1.6rem; border-radius: var(--r-pill); background: var(--grad); color: #fff; font: 600 1rem/1 var(--sans); text-decoration: none; box-shadow: 0 16px 34px -12px rgba(37,99,235,.7); translate: -50% 140%; transition: translate .45s var(--ease-out); }
.float-cta svg { width: 18px; height: 18px; }
.float-cta.is-shown { translate: -50% 0; }

/* footer */
.ftr { position: relative; padding: clamp(4rem, 8vw, 6rem) 0 2rem; border-top: 1px solid var(--line); background: radial-gradient(ellipse 50% 70% at 0% 0%, rgba(96,165,250,.12), transparent 70%), var(--bg); overflow: hidden; }
.ftr-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 3rem; }
.ftr .logo img { width: 120px; margin-bottom: 1.25rem; }
.ftr p { max-width: 32ch; font-size: .95rem; }
.ftr h2 { font: 600 .85rem/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--slate-700); margin-bottom: 1.25rem; }
.ftr ul { list-style: none; display: grid; gap: .8rem; }
.ftr ul a { text-decoration: none; display: inline-flex; gap: .55rem; align-items: center; transition: color .2s; }
.ftr ul a:hover { color: var(--blue); }
.ftr-bottom { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; }

@media (max-width: 900px) {
  .nav { position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; gap: 0; padding: .5rem var(--gutter) 1.5rem; background: #fff; box-shadow: 0 24px 30px -24px rgba(15,31,61,.25); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s, visibility .25s; }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 1rem 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .menu-btn { display: inline-flex; }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
  .ftr-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .cta-char { --w: 110px; translate: 0 -70%; left: .5rem; }
}
@media (max-width: 760px) {
  .float-cta { display: inline-flex; }
  body { padding-bottom: 5.5rem; } /* the floating CTA never hides the end of the page */
}
@media (max-width: 560px) {
  :root { --header-h: 68px; }
  .hdr .btn { display: none; }
  .ftr-grid { grid-template-columns: 1fr; }
}

/* QA 2026-10-12: small blue text meets 4.5:1, location tags never below 12px */
.eyebrow { color: #1d4ed8; }
.loc { font-size: max(12px, .72rem); }
small { font-size: max(12px, 80%); }
@media (max-width: 767px) { .story-proof, .close-proof, .contact-proof { font-size: 1rem; } }
.ftr .ftr-cta { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--blue); }

/* decor.css */
/* Decor library (docs/DECOR-LIBRARY.md). Pages reuse these; no one-off ornaments (R11).
   Ambient decor stays slow and low-opacity; everything static under reduced motion (core.js skips the loops). */

/* 1. Starburst: converging rays from the old hero. <svg class="burst"><use href="#d-burst"/></svg> */
.burst { position: absolute; width: var(--s, 900px); height: var(--s, 900px); color: var(--blue); opacity: var(--o, .14); pointer-events: none; }
.burst line { stroke: currentColor; stroke-width: 1.2; vector-effect: non-scaling-stroke; }

/* 2. Watercolour blob (old About motif). <div class="blob" style="--s:520px"></div> */
.blob { position: absolute; width: var(--s, 520px); aspect-ratio: 592 / 451; background: none center / contain no-repeat; opacity: var(--o, .16); pointer-events: none; }

/* 3. Grid paper / blueprint (old Process motif). <div class="gridpaper"></div> */
.gridpaper { position: absolute; inset: 0; pointer-events: none; opacity: var(--o, .7);
  background-image: linear-gradient(rgba(37,99,235,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(37,99,235,.07) 1px, transparent 1px), linear-gradient(rgba(37,99,235,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(37,99,235,.035) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 35%, transparent 80%); mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 35%, transparent 80%); }

/* 4. Sparkle: blue 4-point star from the characters. <svg class="sparkle" style="--s:22px"><use href="#d-sparkle"/></svg> */
.sparkle { position: absolute; width: var(--s, 20px); height: var(--s, 20px); color: var(--blue-char); pointer-events: none; transform-origin: center; }
.sparkle.inline { position: relative; display: inline-block; vertical-align: super; margin-left: .1em; }

/* 5. Doodles: hand-drawn underline / circle / arrow, drawn on reveal. */
.doodle { position: relative; display: inline-block; white-space: nowrap; }
.doodle > svg { position: absolute; pointer-events: none; overflow: visible; color: var(--blue-300); fill: none; stroke: currentColor; }
.doodle > svg path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.doodle.under > svg { left: -2%; right: -2%; width: 104%; bottom: -.12em; height: .32em; }
.doodle.circle > svg { inset: -18% -9%; width: 118%; height: 136%; }
.doodle-arrow { position: absolute; width: var(--s, 120px); color: var(--slate-500); pointer-events: none; }
.doodle-arrow path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* 6. Tilted gradient card behind media (old portrait motif). Wrap: <div class="tiltcard">media</div> */
.tiltcard { position: relative; isolation: isolate; }
.tiltcard::before { content: ''; position: absolute; inset: 4% -5% -6% 7%; z-index: -1; border-radius: var(--r-lg); background: var(--grad); transform: rotate(var(--tilt, 3deg)); box-shadow: var(--shadow-blue); }

/* 7. Ghost word: the giant pale "Hi," behind a headline. <span class="ghost" aria-hidden="true">Hi,</span> */
.ghost-word { position: absolute; font: 600 clamp(8rem, 22vw, 16rem)/.8 var(--serif); color: #eef3fb; pointer-events: none; user-select: none; z-index: 0; }

/* 8. Character: hand-drawn Ibrahim. <img class="char" data-char src="assets/char/telescope.webp" alt=""> */
.char { position: absolute; width: var(--w, 220px); height: auto; pointer-events: none; z-index: 2; filter: drop-shadow(0 18px 24px rgba(15,31,61,.08)); }
.char.static { position: relative; }

/* 9. Dotted path (flight paths, connections). */
.dotpath { position: absolute; pointer-events: none; color: var(--blue-300); }
.dotpath path { fill: none; stroke: currentColor; stroke-width: 2; stroke-dasharray: 2 9; stroke-linecap: round; }

/* 10. Device frames for project videos. */
.laptop { position: relative; width: 100%; }
.laptop .screen { position: relative; border: clamp(6px, .8vw, 10px) solid #141b2d; border-bottom-width: clamp(10px, 1.4vw, 18px); border-radius: clamp(10px, 1.2vw, 16px) clamp(10px, 1.2vw, 16px) 6px 6px; overflow: hidden; aspect-ratio: 16 / 10; background: #0f172a; }
.laptop .screen video, .laptop .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.laptop .base { height: clamp(8px, 1vw, 14px); margin: 0 -7%; border-radius: 0 0 14px 14px; background: linear-gradient(#e5e9f0, #b9c1cf); box-shadow: 0 18px 30px -12px rgba(15,31,61,.35); }
.laptop .base::before { content: ''; display: block; width: 16%; height: 40%; margin: 0 auto; border-radius: 0 0 8px 8px; background: #a7b0bf; }
.phone { position: relative; width: var(--w, 24%); aspect-ratio: 390 / 844; border: clamp(4px, .55vw, 7px) solid #141b2d; border-radius: clamp(16px, 2vw, 26px); overflow: hidden; background: #0f172a; box-shadow: 0 24px 40px -16px rgba(15,31,61,.45); }
.phone video, .phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.devices { position: relative; }
.devices .phone { position: absolute; right: -4%; bottom: -8%; }

/* 11. Location pill with a flag (old project cards). */
.loc { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .7rem; border-radius: var(--r-pill); background: var(--tint); color: var(--blue); font: 600 .75rem/1 var(--sans); white-space: nowrap; }
.loc .flag { width: 1.3em; height: .87em; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }

/* 12. Soft glow orb for dark bands. */
.orb { position: absolute; width: var(--s, 40vw); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(96,165,250,.35), transparent 65%); pointer-events: none; }

@media (max-width: 760px) {
  .char.hide-sm, .doodle-arrow.hide-sm, .burst.hide-sm { display: none; }
}

/* decorative blob: loads after the page is up (class set by the build's script loader) */
.is-loaded .blob { background-image: url('../assets/img/bg-blob.webp'); }

/* work.css */
/* Work page (docs/pages/work.md). */
.work-hero { position: relative; overflow: hidden; padding: calc(var(--header-h) + clamp(2.5rem, 7vh, 5rem)) 0 clamp(2rem, 5vw, 3.5rem); }
.work-hero-grid { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end; }
.work-hero .lede { margin-top: 1rem; }
.work-char { --w: clamp(220px, 24vw, 320px); position: relative; filter: drop-shadow(0 24px 30px rgba(37,99,235,.12)); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.chip-btn { min-height: 48px; padding: .7rem 1.4rem; font-size: .95rem !important; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: #fff; color: var(--slate-700); font: 600 .9rem/1 var(--sans); transition: background .25s, color .25s, border-color .25s; }
.chip-btn:hover { border-color: var(--blue); color: var(--blue); }
.chip-btn[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

/* tiles: asymmetric 2-up, devices cropped by the tile edge (Seán Halpin / Ramotion) */
.tiles-sec { padding-bottom: clamp(2rem, 5vw, 3rem); }
.tiles { list-style: none; display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1.25rem, 2.5vw, 2rem); }
.tile { grid-column: span var(--span, 6); display: flex; flex-direction: column; }
.tile.is-hidden { display: none; }
.tile-media { position: relative; overflow: hidden; border-radius: 28px; background: radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.75), transparent 60%), var(--tint, #eaf1ff); aspect-ratio: 4 / 3.1; padding: 4.2rem 9% 0; }
.tile.wide .tile-media { aspect-ratio: 16 / 10.2; padding-inline: 11%; }
.tile-tag { position: absolute; top: 1.2rem; left: 1.4rem; right: 1.4rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; font: 600 .75rem/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--slate-700); }
.tile-tag .loc { background: rgba(255,255,255,.75); text-transform: none; letter-spacing: 0; }
.tile-media .devices { transition: transform .6s var(--ease-out); transform-origin: 50% 100%; }
.tile-media .laptop .screen { border-bottom-width: 0; border-radius: 12px 12px 0 0; aspect-ratio: 16 / 9.6; }
.tile-media .laptop .base { display: none; }
.tile-media .phone { --w: 22%; position: absolute; right: -6%; bottom: -14%; }
.tile:hover .tile-media .devices { transform: translateY(-6px) rotate(-.6deg); }
.tile-body { padding: 1.2rem .3rem 0; }
.tile-body .h3 { font-size: clamp(1.35rem, 2vw, 1.65rem); margin-bottom: .35rem; }
.tile-body p { max-width: 52ch; }
.tile-actions { display: flex; gap: 1.6rem; margin-top: .9rem; flex-wrap: wrap; }
.tile-actions .link { border: 0; background: none; padding: .4rem 0; min-height: 44px; color: var(--blue); }

/* CTA card as the last tile */
.tile-cta .cta-card { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 28px; }
.tile-cta .cta-card h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
.tile-cta .cta-char { --w: 120px; left: auto; right: 1.2rem; top: 0; translate: 0 -72%; }
.cta-proof { margin: 1.5rem 0 0 !important; font: 600 .78rem/1 var(--ui) !important; letter-spacing: .14em; text-transform: uppercase; color: #dbeafe; }

/* archive table + cursor preview */
.table-wrap { overflow-x: auto; }
.archive { width: 100%; border-collapse: collapse; font-size: 1rem; }
.archive thead th { text-align: left; font: 600 .75rem/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--slate-500); padding: 0 1rem 1rem 0; border-bottom: 1.5px solid var(--slate-700); }
.archive tbody th, .archive td { padding: 1.35rem 1rem 1.35rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.archive tbody th { font: 600 clamp(1.2rem, 2vw, 1.55rem)/1.2 var(--serif); color: var(--slate-700); transition: color .25s, padding-left .35s var(--ease-out); }
.archive tbody tr { transition: background .25s; }
.archive tbody tr:hover { background: rgba(37,99,235,.04); }
.archive tbody tr:hover th { color: var(--blue); padding-left: .6rem; }
.archive td:last-child { text-align: right; width: 3rem; }
.row-thumb { display: none; }
.preview { position: fixed; left: 0; top: 0; z-index: 50; width: 320px; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; pointer-events: none; opacity: 0; scale: .85; box-shadow: var(--shadow-lg); border: 5px solid #fff; background: var(--bg-3); transition: opacity .25s, scale .35s var(--ease-out); }
.preview.is-on { opacity: 1; scale: 1; }
.preview video { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* client wall */
.wall { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2.4rem 2rem; align-items: center; max-width: 1040px; margin: 0 auto; }
.wall li { display: grid; place-items: center; height: 56px; }
.wall img { max-height: 46px; max-width: 150px; width: auto; height: auto; object-fit: contain; filter: grayscale(1); opacity: .65; transition: filter .3s, opacity .3s, transform .3s; }
.wall li:hover img { filter: none; opacity: 1; transform: scale(1.06); }

/* closing navy band */
.close-band { position: relative; overflow: hidden; background: var(--ink); color: #b9c6dc; padding: clamp(4.5rem, 9vw, 7rem) 0; }
.close-grid { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; }
.close-band .h2 { color: #fff; margin-bottom: 1rem; }
.close-band p { font-size: 1.1rem; max-width: 40ch; margin-bottom: 2rem; }
.close-proof { margin: 1.6rem 0 0 !important; font: 500 .85rem/1.6 var(--ui) !important; color: #8ea3c4; }
.close-art { position: relative; height: 280px; }
.close-art .dotpath { inset: 0; width: 100%; height: 100%; color: #60a5fa; }
.close-char { --w: 190px; left: 0; bottom: -10px; filter: drop-shadow(0 0 0 #fff) brightness(1.02); background: radial-gradient(circle at 50% 55%, rgba(255,255,255,.95) 0 45%, transparent 46%); border-radius: 50%; padding: 12px; }

/* case dialog */
.case { border: 0; padding: 0; margin: auto; width: min(960px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); border-radius: 26px; background: #fff; box-shadow: var(--shadow-lg); overflow: hidden; }
.case::backdrop { background: rgba(15,31,61,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.case[open] { animation: caseIn .45s var(--ease-out); }
@keyframes caseIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.case-inner { position: relative; max-height: calc(100dvh - 2rem); overflow-y: auto; padding: clamp(1.5rem, 4vw, 3rem); }
.case-close { position: absolute; top: 1rem; right: 1rem; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--bg-2); color: var(--slate-700); display: grid; place-items: center; }
.case-close:hover { background: var(--tint); color: var(--blue); }
.case-close svg { width: 20px; height: 20px; }
.case-media { max-width: 560px; margin: 0 auto 2rem; }
.case .h2 { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 1.6rem; }
.case-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.case-cols h3 { font: 600 .82rem/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin-bottom: .7rem; }
.case-cols p { font-size: .97rem; }
.case-actions { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
body.has-dialog { overflow: hidden; }

@media (max-width: 900px) {
  .tile, .tile.wide, .tile-cta { grid-column: 1 / -1; }
  .tile-cta { margin-top: 3rem; }
  .close-grid, .work-hero-grid { grid-template-columns: 1fr; }
  .case-cols { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .tile-media, .tile.wide .tile-media { aspect-ratio: 4 / 3.1; padding: 3.4rem 5% 0; border-radius: 22px; }
  .tile-media .phone { display: none; } /* one larger laptop view reads better at 390 px */
  .archive thead { display: none; }
  .archive, .archive tbody, .archive tr { display: block; }
  .archive tr { display: grid; grid-template-columns: 88px 1fr auto; gap: .2rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
  .archive tbody th, .archive td { border: 0; padding: 0; }
  .archive tbody th { grid-column: 2; display: contents; }
  .row-thumb { display: block; grid-row: 1 / span 2; grid-column: 1; width: 88px; height: 56px; object-fit: cover; object-position: top; border-radius: 8px; }
  .archive td:nth-of-type(1) { grid-column: 2; font-size: .9rem; }
  .archive td:nth-of-type(2) { grid-column: 2; }
  .archive td:last-child { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .preview { display: none; }
}
@media (prefers-reduced-motion: reduce) { .case[open] { animation: none; } .tile:hover .tile-media .devices { transform: none; } }

/* QA 2026-10-12: archive location text contrast */
.archive .loc { color: #1d4ed8; }
@media (max-width: 767px) { .close-proof { font-size: 1rem !important; } }

