/*
  Benystudio | Paper & Signal (DESIGN.md). One stylesheet for every page.
  Written with logical properties (inline-start / inline-end) so the Arabic, right-to-left version
  only has to set dir="rtl": --dir flips horizontal motion and arrow icons are mirrored below.
*/

/* ================= Tokens ================= */
:root {
  /* Blocksy Customizer > Colors: color1 Signal, color2 Signal text, color3 Muted, color4 Ink,
     color5 Line, color6 Surface, color7 Canvas. The hex values are the defaults. */
  --canvas: var(--theme-palette-color-7, #F4F4F2);
  --surface: var(--theme-palette-color-6, #FBFBFA);
  --ink: var(--theme-palette-color-4, #111112);
  --muted: var(--theme-palette-color-3, #5C5C60);
  --line: var(--theme-palette-color-5, #DCDCD8);
  --signal: var(--theme-palette-color-1, #E5381E);
  --signal-text: var(--theme-palette-color-2, #C42B12);

  --font: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;

  --max: 1440px;
  --pad: clamp(16px, 4vw, 48px);
  --gutter: 24px;
  --section: clamp(88px, 11vw, 168px);
  --nav-h: 68px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --dir: 1;
  --start: left;
  color-scheme: light;
}
[dir="rtl"] { --dir: -1; --start: right; }
[dir="rtl"] :is(.ph-arrow-right, .ph-arrow-left, .ph-arrow-up-right, .ph-arrow-counter-clockwise, .ph-paper-plane-tilt) { scale: -1 1; }

/* ================= Base ================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.55; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a, button, label, input, textarea { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--signal); color: #fff; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.section { padding-block: var(--section); }
.section--flush { padding-top: 0; }
.rule { border-top: 1px solid var(--line); }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; line-height: 1.4; }
.muted { color: var(--muted); }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: var(--pad); top: -60px; z-index: 100; background: var(--ink); color: var(--canvas); padding: 12px 16px; }
.skip:focus { top: 12px; }
/* WordPress: Blocksy prints its own skip link; ours is used instead. Core's screen-reader-text class. */
.skip-link.screen-reader-text { display: none; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.h2 { font-size: clamp(36px, 4.6vw, 72px); font-weight: 500; letter-spacing: -.04em; line-height: 1; text-wrap: balance; }
.h3 { font-size: clamp(26px, 2.8vw, 40px); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.lede { font-size: clamp(17px, 1.35vw, 20px); line-height: 1.5; max-width: 46ch; color: var(--muted); text-wrap: pretty; }
.tag { display: inline-flex; align-items: center; gap: 8px; }
.tag::before { content: ""; width: 7px; height: 7px; background: var(--muted); flex: none; }
.tag--client::before { background: var(--signal); }

/* ================= Buttons & links ================= */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px;
  background: var(--ink); color: var(--canvas); font-weight: 500; font-size: 16px; white-space: nowrap;
  overflow: hidden; isolation: isolate; transition: transform .2s var(--ease);
}
.btn::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--signal);
  transform: scaleX(0); transform-origin: var(--start); transition: transform .45s var(--ease); z-index: -1;
}
.btn:hover::after { transform: scaleX(1); }
.btn:active { transform: translateY(1px); }
.btn .ph { font-size: 18px; transition: transform .35s var(--ease); }
.btn:hover .ph { transform: translateX(calc(3px * var(--dir))); }
.btn--sm { height: 42px; padding: 0 18px; font-size: 15px; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.link {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 500; width: fit-content;
  background: linear-gradient(currentColor, currentColor) var(--start) bottom / 100% 1px no-repeat;
  padding-bottom: 3px; transition: background-size .3s var(--ease);
}
.link:hover { background-size: 100% 2px; }
.link .ph { transition: transform .35s var(--ease); }
.link:hover .ph { transform: translateX(calc(3px * var(--dir))); }

/* ================= Nav ================= */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s ease, background-color .4s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
/* Logged-in admin bar (WordPress) */
.admin-bar .nav { top: 32px; }
.admin-bar .drawer { inset-block-start: calc(var(--nav-h) + 32px); }
@media (max-width: 782px) { .admin-bar .nav { top: 46px; } .admin-bar .drawer { inset-block-start: calc(var(--nav-h) + 46px); } }
@media (max-width: 600px) { .admin-bar .nav { top: 0; } }
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 32px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; letter-spacing: -.03em; }
.wordmark .mark { width: 14px; height: 14px; background: var(--signal); flex: none; }
.wordmark .tld { color: var(--muted); font-weight: 400; }
.nav-links { display: flex; gap: 28px; margin-inline-start: auto; font-size: 15px; }
.nav-links a { position: relative; padding-block: 6px; color: var(--muted); transition: color .2s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::before { content: ""; position: absolute; inset-inline-start: -12px; top: 50%; width: 6px; height: 6px; margin-top: -3px; background: var(--signal); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: flex; align-items: center; gap: 2px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; }
.lang-switch a { padding: 8px 7px; color: var(--muted); transition: color .2s ease; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="true"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.lang-switch--drawer { margin-top: 24px; font-size: 15px; }
.lang-switch--footer { gap: 4px 16px; flex-wrap: wrap; }
.lang-switch--footer a { padding: 4px 0; }
.lang-switch--footer a[lang="ar"] { font-family: "IBM Plex Sans Arabic", var(--font); font-size: 14px; }
.lang-switch--drawer a { padding: 10px 14px 10px 0; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); font-size: 18px; transition: border-color .2s ease; }
.icon-btn:hover { border-color: var(--ink); }
.menu-btn { display: none; }

.drawer {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 49; background: var(--canvas);
  padding: 32px var(--pad); display: flex; flex-direction: column; gap: 4px; overflow-y: auto; overscroll-behavior: contain;
  visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .3s ease, transform .3s var(--ease), visibility 0s .3s;
}
.drawer.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .3s ease, transform .3s var(--ease); }
.drawer a.d-link { font-size: 40px; font-weight: 500; letter-spacing: -.035em; padding-block: 6px; border-bottom: 1px solid var(--line); }
.drawer a.d-link[aria-current="page"] { color: var(--muted); }
.drawer .btn { margin-top: 28px; align-self: flex-start; }

/* ================= Device shot: desktop screenshot with the phone view laid over a corner ================= */
.shot { position: relative; }
.shot-desktop { position: relative; overflow: hidden; background: var(--line); }
.shot-desktop img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.shot-phone {
  position: absolute; inset-inline-end: 4%; bottom: -6%; width: 17%; min-width: 64px;
  background: var(--line); border: 1px solid var(--ink); box-shadow: 0 0 0 6px var(--canvas); overflow: hidden;
}
.shot-phone img { width: 100%; height: auto; }

/* Stage: the site's own photo as a backdrop, with its screenshots on top (homepage only) */
.shot.shot--stage { overflow: hidden; background: var(--line); }
.shot--stage .stage-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot.shot--stage .shot-desktop { position: absolute; inset-inline-start: 7%; top: 50%; width: 70%; height: auto; aspect-ratio: 16 / 10; transform: translateY(-50%); border: 1px solid rgb(17 17 18 / .35); }
.shot.shot--stage .shot-phone { inset-inline-end: 7%; top: 50%; bottom: auto; width: 17%; transform: translateY(-36%); border-color: rgb(17 17 18 / .6); box-shadow: none; }
.project-frame--stage .stage-bg { position: absolute; inset-inline-start: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; }
.project-frame--stage .stage-phone { position: absolute; left: 50%; top: 50%; width: 44%; height: auto; transform: translate(-50%, -50%); border: 1px solid rgb(17 17 18 / .6); transition: transform .9s var(--ease); }
.project:hover .project-frame--stage .stage-phone { transform: translate(-50%, -51.5%); }
.project:hover .project-frame--stage .stage-bg { transform: scale(1.035); }

/* ================= Hero (home) ================= */
.hero { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(64px, 8vw, 120px); }
.hero h1 {
  font-size: clamp(44px, 7vw, 112px); font-weight: 500; letter-spacing: -.045em; line-height: .95;
  max-width: 17.5ch; grid-column: 1 / -1;
}
.hero h1 .accent { color: var(--signal); }
.hero-row { margin-top: clamp(32px, 4vw, 56px); row-gap: 40px; align-items: end; }
.hero-copy { grid-column: 1 / span 4; display: flex; flex-direction: column; gap: 28px; align-self: start; }
.hero-copy .lede { color: var(--ink); opacity: .78; }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.hero-media { grid-column: 6 / -1; }
.hero-frame { position: relative; aspect-ratio: 16 / 10; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1s ease, visibility 0s 1s; }
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity 1s ease; }
.hero-slide .shot, .hero-slide .shot-desktop { height: 100%; }
.hero-slide .shot-desktop img { transform: scale(1.04); transition: transform 6s linear; }
.hero-slide.is-active .shot-desktop img { transform: scale(1); }
.hero-slide .shot-phone { bottom: 6%; width: 15%; }
.hero-caption { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; }
.hero-caption a:hover [data-hero-name] { text-decoration: underline; text-underline-offset: 3px; }
.hero-caption [data-hero-name] { color: var(--ink); }
.hero-progress { display: flex; gap: 6px; align-items: center; }
.hero-progress button { width: 22px; height: 18px; position: relative; }
.hero-progress button::before { content: ""; position: absolute; inset-inline: 0; top: 8px; height: 2px; background: var(--line); transition: background-color .3s ease; }
.hero-progress button[aria-current="true"]::before { background: var(--ink); }
.hero-progress .hero-pause { width: 28px; height: 28px; display: grid; place-items: center; margin-inline-start: 6px; font-size: 14px; color: var(--muted); transition: color .2s ease; }
.hero-progress .hero-pause::before { content: none; }
.hero-progress .hero-pause:hover { color: var(--ink); }

/* Desktop: the hero fills the first screen (capped on very tall monitors) and the image takes the height left after the headline. */
@media (min-width: 901px) {
  .hero { display: flex; flex-direction: column; min-height: min(calc(100svh - var(--nav-h)), 960px); padding-bottom: 32px; }
  .hero > .wrap { flex: 1; display: flex; flex-direction: column; }
  .hero-row { flex: 1; align-items: stretch; }
  .hero-media { display: flex; flex-direction: column; }
  .hero-frame { aspect-ratio: auto; flex: 1 1 0; min-height: 260px; }
}

/* ================= Ledger: one cell per site (home strip) ================= */
.ledger { border-block: 1px solid var(--line); padding-block: 26px; }
.ledger .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: center; }
.ledger-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; }
.ledger-cell { display: flex; flex-direction: column; gap: 4px; padding-inline-start: 16px; border-inline-start: 1px solid var(--line); transition: border-color .25s ease; }
.ledger-cell:hover, .ledger-cell:focus-visible { border-color: var(--ink); }
.ledger-cell .name { font-weight: 500; font-size: 17px; letter-spacing: -.015em; line-height: 1.2; }
.ledger-cell .meta { font-size: 13.5px; line-height: 1.35; }
.ledger-cell .score { font-size: 28px; font-weight: 500; letter-spacing: -.03em; line-height: 1; margin-top: 6px; }

/* ================= Work (home) ================= */
.work-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(48px, 6vw, 88px); }
.featured { row-gap: 64px; }
.project { display: block; }
.project:nth-child(1) { grid-column: 1 / span 7; }
.project:nth-child(2) { grid-column: 9 / -1; margin-top: clamp(80px, 12vw, 200px); }
.project-frame { position: relative; overflow: hidden; background: var(--line); }
.project:nth-child(1) .project-frame { aspect-ratio: 4 / 3; }
.project:nth-child(2) .project-frame { aspect-ratio: 4 / 5; }
.project-frame img { position: absolute; inset-inline-start: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; object-position: var(--pos, 50% 0%); transition: transform .9s var(--ease); }
.project:hover .project-frame img { transform: scale(1.035); }
.project-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; margin-top: 20px; align-items: baseline; }
.project-meta h3 { font-size: 26px; font-weight: 500; letter-spacing: -.025em; line-height: 1.15; display: inline-flex; align-items: center; gap: 10px; }
.project-meta h3 .ph { font-size: 20px; opacity: 0; transform: translate(calc(-6px * var(--dir)), 4px); transition: opacity .3s ease, transform .4s var(--ease); }
.project:hover .project-meta h3 .ph { opacity: 1; transform: none; }
.project-meta .tag { grid-column: 1 / -1; }
.project-meta p { grid-column: 1 / -1; color: var(--muted); max-width: 52ch; }
.result { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 14px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.result strong { font-size: clamp(30px, 3vw, 44px); font-weight: 500; letter-spacing: -.03em; color: var(--signal); line-height: 1; font-variant-numeric: tabular-nums; }
.result span { color: var(--muted); font-size: 15px; }

.index { margin-top: clamp(96px, 11vw, 160px); }
.index-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 3fr) 80px; gap: var(--gutter); padding-bottom: 14px; color: var(--muted); }
.index-row {
  position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 3fr) 80px; gap: var(--gutter);
  align-items: center; padding-block: 28px; border-top: 1px solid var(--line);
}
.index-list li:last-child .index-row { border-bottom: 1px solid var(--line); }
.index-row .name { font-size: clamp(26px, 2.8vw, 40px); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; display: flex; align-items: center; gap: 16px; transition: transform .45s var(--ease); }
.index-row .name::before { content: ""; width: 12px; height: 12px; background: var(--signal); flex: none; transform: scale(0); transition: transform .35s var(--ease); margin-inline-start: -28px; }
.index-row:hover .name { transform: translateX(calc(28px * var(--dir))); }
.index-row:hover .name::before { transform: scale(1); }
.index-row .yr { text-align: end; }
.index-row .thumb { display: none; }
.index-foot { margin-top: 40px; }
.preview {
  position: fixed; left: 0; top: 0; z-index: 40; width: 320px; aspect-ratio: 4 / 3; pointer-events: none; overflow: hidden;
  opacity: 0; transform: scale(.92); transition: opacity .25s ease, transform .35s var(--ease); background: var(--line);
}
.preview.is-on { opacity: 1; transform: scale(1); }
.preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .3s ease; }
.preview img.is-active { opacity: 1; }

/* ================= Services tabs (home) ================= */
.services-grid { margin-top: clamp(48px, 6vw, 80px); row-gap: 40px; }
.svc-tabs { grid-column: 1 / span 6; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.svc-tab {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: start;
  padding-block: 22px; border-bottom: 1px solid var(--line); color: var(--muted);
  font-size: clamp(26px, 2.8vw, 40px); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; transition: color .25s ease;
}
.svc-tab .from { font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; font-weight: 400; color: var(--muted); }
.svc-tab:hover, .svc-tab[aria-selected="true"] { color: var(--ink); }
.svc-tab .label { display: inline-flex; align-items: center; gap: 14px; }
.svc-tab .label::before { content: ""; width: 12px; height: 12px; background: var(--signal); transform: scale(0); transition: transform .35s var(--ease); flex: none; }
.svc-tab[aria-selected="true"] .label::before { transform: scale(1); }
.svc-panels { grid-column: 8 / -1; position: relative; }
.svc-panel { display: flex; flex-direction: column; gap: 28px; }
.svc-panel[hidden] { display: none; }
.svc-panel > p { font-size: clamp(19px, 1.6vw, 24px); line-height: 1.4; letter-spacing: -.01em; }
.svc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.svc-list li { display: flex; gap: 10px; align-items: baseline; font-size: 16px; }
.svc-list li .ph { color: var(--signal-text); font-size: 15px; transform: translateY(2px); }
.svc-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.svc-facts dt { margin-bottom: 6px; }
.svc-facts dd { margin: 0; font-size: clamp(30px, 3vw, 44px); font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.chips-static { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-static li { border: 1px solid var(--line); padding: 6px 10px; }
.svc-more { margin-top: clamp(40px, 5vw, 64px); }

/* ================= Process steps (home) ================= */
.process-grid { row-gap: 48px; }
.process-intro { grid-column: 1 / span 5; align-self: start; position: sticky; top: calc(var(--nav-h) + 48px); display: flex; flex-direction: column; gap: 24px; }
.steps { grid-column: 7 / -1; position: relative; padding-inline-start: 40px; }
.steps-line { position: absolute; inset-inline-start: 0; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.steps-line span { position: absolute; inset: 0; background: var(--signal); transform-origin: top; transform: scaleY(0); }
.step { position: relative; padding-bottom: clamp(56px, 7vw, 96px); }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; inset-inline-start: -44.5px; top: 9px; width: 10px; height: 10px; background: var(--canvas); border: 1px solid var(--ink); transition: background-color .3s ease, border-color .3s ease; }
.step.is-active::before { background: var(--signal); border-color: var(--signal); }
.step .when { margin-bottom: 10px; display: block; }
.step h3 { font-size: clamp(28px, 2.8vw, 40px); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 14px; }
.step p { color: var(--muted); max-width: 48ch; }
.step ul { margin-top: 18px; }

/* ================= Quote cards (shown only once a project has a real quote) ================= */
.quote-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: var(--gutter); margin-top: clamp(40px, 5vw, 64px); }
.quote-card { display: flex; flex-direction: column; gap: 28px; padding-top: 24px; border-top: 1px solid var(--ink); }
.quote-card blockquote { font-size: clamp(22px, 2vw, 30px); letter-spacing: -.025em; line-height: 1.2; }
.quote-card blockquote::before { content: "\201C"; color: var(--signal); }
.quote-card figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: auto; }

/* ================= About (home teaser and about page) ================= */
.about-grid { row-gap: 48px; align-items: start; }
.about-media { grid-column: 1 / span 5; position: relative; }
.about-media .frame { aspect-ratio: 4 / 5; overflow: hidden; background: var(--line); }
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-media figcaption { margin-top: 12px; }
.about-copy { grid-column: 7 / -1; display: flex; flex-direction: column; gap: 28px; padding-top: 8px; }
.about-copy .body { display: flex; flex-direction: column; gap: 18px; color: var(--muted); max-width: 56ch; }
.about-copy .body p:first-child { color: var(--ink); font-size: clamp(19px, 1.6vw, 24px); line-height: 1.4; letter-spacing: -.01em; }
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-top: 28px; border-top: 1px solid var(--line); }
.figures dd { margin: 0 0 6px; font-size: clamp(36px, 4vw, 60px); font-weight: 500; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.figures div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.link-row { display: flex; flex-wrap: wrap; gap: 16px 28px; }

/* ================= FAQ ================= */
.faq .wrap { max-width: 920px; }
.faq .h2 { margin-bottom: clamp(40px, 5vw, 64px); }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-row { position: relative; }
.faq-q { padding-block: 26px; padding-inline-end: 48px; font-size: clamp(19px, 1.6vw, 22px); font-weight: 500; letter-spacing: -.015em; }
.faq-btn { position: absolute; inset: 0; width: 100%; display: flex; justify-content: flex-end; align-items: center; }
.faq-btn .ic { position: relative; width: 16px; height: 16px; flex: none; }
.faq-btn .ic::before, .faq-btn .ic::after { content: ""; position: absolute; inset-inline: 0; top: 7.5px; height: 1.5px; background: currentColor; transition: transform .45s var(--ease); }
.faq-btn .ic::after { transform: rotate(90deg); }
.faq-btn[aria-expanded="true"] .ic::after { transform: rotate(0deg); }
.faq-btn[aria-expanded="true"] .ic::before { background: var(--signal); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.faq-a > div { overflow: hidden; }
.faq-a p { color: var(--muted); max-width: 62ch; padding-bottom: 28px; opacity: 0; transform: translateY(-6px); transition: opacity .35s ease, transform .5s var(--ease); }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-item.is-open .faq-a p { opacity: 1; transform: none; transition-delay: .08s; }

/* ================= Contact ================= */
.contact { border-top: 1px solid var(--line); }
.contact-grid { row-gap: 56px; }
.contact-intro { grid-column: 1 / span 5; display: flex; flex-direction: column; gap: 28px; align-self: start; }
.contact-intro .h2 { font-size: clamp(44px, 6vw, 96px); letter-spacing: -.045em; line-height: .95; }
.contact-intro .h2 span { color: var(--signal); }
.mail { font-size: clamp(20px, 1.8vw, 26px); font-weight: 500; letter-spacing: -.02em; }
.contact-notes { display: flex; flex-direction: column; gap: 12px; color: var(--muted); font-size: 15px; }
.contact-notes li { display: flex; gap: 10px; align-items: baseline; }
.contact-notes .ph { color: var(--ink); transform: translateY(2px); }
.next-steps { counter-reset: n; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.next-steps li { counter-increment: n; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; padding-block: 16px; border-bottom: 1px solid var(--line); }
.next-steps li::before { content: "0" counter(n); font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding-top: 4px; grid-row: span 2; }
.next-steps strong { font-weight: 500; }
.next-steps span { color: var(--muted); font-size: 15px; }

.form { grid-column: 7 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { font-size: 14px; font-weight: 500; padding: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field input, .field textarea {
  width: 100%; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 0;
  font: inherit; font-size: 16px; padding: 14px 14px; transition: border-color .2s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field .help { font-size: 13.5px; color: var(--muted); }
.field .err { font-size: 13.5px; color: var(--signal-text); display: none; align-items: center; gap: 6px; }
.field.is-invalid .err { display: flex; }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--signal-text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; height: 42px; padding: 0 16px; border: 1px solid var(--line); font-size: 15px; cursor: pointer; transition: border-color .2s ease, background-color .2s ease, color .2s ease; }
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 2px; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form-foot p { font-size: 14px; color: var(--muted); }
.form-foot p a { text-decoration: underline; text-underline-offset: 3px; }
.sent { grid-column: 7 / -1; display: none; flex-direction: column; gap: 18px; align-self: start; padding: 40px; background: var(--surface); border: 1px solid var(--line); }
.sent .ph { font-size: 32px; color: var(--signal); }
.sent h3 { font-size: 32px; font-weight: 500; letter-spacing: -.03em; }
.sent p { color: var(--muted); max-width: 46ch; }
.is-sent .form { display: none; }
.is-sent .sent { display: flex; }
.form[hidden] { display: none; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { grid-column: 1 / -1; display: flex; gap: 8px; align-items: baseline; padding: 14px 16px; border: 1px solid var(--signal-text); color: var(--signal-text); font-size: 15px; }

/* ================= CTA band (inner pages) ================= */
.cta-band { border-top: 1px solid var(--line); padding-block: clamp(72px, 9vw, 136px); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 32px; }
.cta-band .h2 { font-size: clamp(40px, 5.6vw, 88px); letter-spacing: -.045em; line-height: .95; max-width: 14ch; }
.cta-band .h2 span { color: var(--signal); }
.cta-band .side { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; max-width: 420px; }

/* ================= Page header (inner pages) ================= */
.page-head { padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(56px, 7vw, 104px); }
.crumbs { display: flex; gap: 8px; margin-bottom: clamp(24px, 3vw, 40px); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.page-head .grid { row-gap: 28px; align-items: end; }
.page-title { grid-column: 1 / span 8; font-size: clamp(52px, 8.4vw, 136px); font-weight: 500; letter-spacing: -.05em; line-height: .92; text-wrap: balance; }
.page-head .lede { grid-column: 9 / -1; }

/* ================= Work page: pinned project reel ================= */
.reel { row-gap: 0; }
.reel-steps { grid-column: 1 / span 5; }
.reel-step { min-height: min(78svh, 760px); display: flex; flex-direction: column; justify-content: center; gap: 20px; padding-block: 48px; border-top: 1px solid var(--line); }
.reel-step:first-child { border-top: 0; padding-top: 0; justify-content: flex-start; min-height: min(62svh, 620px); }
.reel-step .count { display: flex; gap: 16px; }
.reel-step h2 { font-size: clamp(40px, 4.6vw, 72px); font-weight: 500; letter-spacing: -.045em; line-height: .95; }
.reel-step p { color: var(--muted); max-width: 44ch; }
.reel-step .reel-img { display: none; }
.reel-media { grid-column: 7 / -1; position: sticky; top: var(--nav-h); height: calc(100svh - var(--nav-h)); align-self: start; display: flex; align-items: center; }
.reel-media .reel-frame { position: relative; width: 100%; aspect-ratio: 16 / 10; }
.reel-media .shot { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s .6s; }
.reel-media .shot.is-active { opacity: 1; visibility: visible; transition: opacity .6s ease; }
.reel-media .shot-desktop { height: 100%; }
.reel-media .shot-phone { bottom: 5%; width: 20%; }
/* Without JS the pinned image never changes, so every project shows its own image instead. */
html:not(.js) .reel-media { display: none; }
html:not(.js) .reel-steps { grid-column: 1 / -1; }
html:not(.js) .reel-step .reel-img { display: block; }

.reel-img { margin-top: 8px; }
.reel-img .shot-desktop { aspect-ratio: 16 / 10; }

/* Measured table (shown only when the scores are switched on) */
.measure { margin-top: clamp(40px, 5vw, 64px); width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.measure th, .measure td { text-align: start; padding: 18px 12px 18px 0; border-top: 1px solid var(--line); font-weight: 400; }
.measure thead th { border-top: 0; padding-top: 0; color: var(--muted); }
.measure td.num { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.measure td.best { color: var(--signal-text); }

/* ================= Case study ================= */
.cs-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; padding-top: 24px; border-top: 1px solid var(--line); margin-top: clamp(16px, 3vw, 40px); }
.cs-facts dt { margin-bottom: 6px; }
.cs-facts dd { font-size: 16px; font-weight: 500; }
.cs-facts dd { min-width: 0; overflow-wrap: anywhere; }
.cs-facts dd a { text-decoration: underline; text-underline-offset: 3px; }
.cs-hero .shot-desktop { aspect-ratio: 16 / 10; }
.cs-hero .shot-phone { width: 16%; bottom: -8%; }
.cs-note { display: flex; gap: 12px; align-items: baseline; margin-top: clamp(64px, 8vw, 104px); padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); max-width: 860px; }
.cs-note::before { content: ""; width: 8px; height: 8px; background: var(--muted); flex: none; transform: translateY(-1px); }
.cs-note p { font-size: 15px; color: var(--muted); }
.cs-note strong { color: var(--ink); font-weight: 500; }
.cs-block { row-gap: 24px; }
.cs-block > .h2 { grid-column: 1 / span 5; font-size: clamp(32px, 3.6vw, 56px); }
.cs-block > .body { grid-column: 7 / -1; display: flex; flex-direction: column; gap: 18px; }
.cs-block > .body p { max-width: 60ch; }
.cs-block > .body p:first-child { font-size: clamp(19px, 1.6vw, 24px); line-height: 1.4; letter-spacing: -.01em; }
.cs-block > .body p + p { color: var(--muted); }
.decisions-grid { row-gap: 48px; }
.decisions-grid > .h2 { grid-column: 1 / -1; font-size: clamp(32px, 3.6vw, 56px); }
.decisions { grid-column: 1 / span 7; counter-reset: d; }
.decision { counter-increment: d; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px 16px; padding-block: 28px; border-top: 1px solid var(--line); }
.decision:last-child { border-bottom: 1px solid var(--line); }
.decision::before { content: "0" counter(d); font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding-top: 8px; grid-row: span 2; }
.decision h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 500; letter-spacing: -.025em; line-height: 1.2; }
.decision p { color: var(--muted); max-width: 56ch; }
.decisions-phone { grid-column: 9 / span 3; position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; }
.decisions-phone .frame { overflow: hidden; border: 1px solid var(--ink); background: var(--line); }
.decisions-phone img { width: 100%; height: auto; }
.decisions-phone figcaption { margin-top: 12px; }
.next-project { display: grid; gap: 8px; padding-block: clamp(56px, 7vw, 96px) clamp(72px, 9vw, 136px); border-top: 1px solid var(--line); }
.next-project .name { font-size: clamp(40px, 8vw, 128px); font-weight: 500; letter-spacing: -.05em; line-height: .92; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 .25em; max-width: 100%; overflow-wrap: anywhere; }
.next-project .name .ph { font-size: .5em; transition: transform .45s var(--ease); }
.next-project:hover .name .ph { transform: translateX(calc(12px * var(--dir))); }
.next-project:hover .name span { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .12em; }

/* ================= Services page ================= */
.spec { margin-top: clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.spec-head, .spec-line { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 2fr) minmax(0, 2fr) 24px; gap: var(--gutter); align-items: center; text-align: start; }
.spec-head { padding-bottom: 14px; color: var(--muted); }
.spec-row { border-top: 1px solid var(--line); }
.spec-more { margin-top: 32px; }
.spec-line { position: relative; }
.spec-btn { position: absolute; inset: 0; width: 100%; }
.spec-line { padding-block: 28px; }
.spec-row .name { font-size: clamp(26px, 2.8vw, 40px); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; display: flex; align-items: center; gap: 14px; }
.spec-row .name::before { content: ""; width: 12px; height: 12px; background: var(--signal); transform: scale(0); transition: transform .35s var(--ease); flex: none; }
.spec-row.is-open .name::before, .spec-line:hover .name::before { transform: scale(1); }
.spec-row .for { color: var(--muted); font-size: 16px; line-height: 1.4; }
.spec-row .cell { font-size: 16px; font-weight: 500; }
.spec-row .ic { position: relative; width: 16px; height: 16px; justify-self: end; }
.spec-row .ic::before, .spec-row .ic::after { content: ""; position: absolute; inset-inline: 0; top: 7.5px; height: 1.5px; background: currentColor; transition: transform .45s var(--ease); }
.spec-row .ic::after { transform: rotate(90deg); }
.spec-row.is-open .ic::after { transform: rotate(0deg); }
.spec-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.spec-panel > div { overflow: hidden; }
.spec-row.is-open .spec-panel { grid-template-rows: 1fr; }
.spec-inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gutter); padding-bottom: 36px; }
.spec-inner > p { font-size: clamp(18px, 1.4vw, 21px); line-height: 1.45; letter-spacing: -.01em; padding-inline-end: 24px; }
.spec-inner .svc-list { align-content: start; }
.spec-inner .chips-static { grid-column: 2; }
.spec-label { display: none; }

.factors { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); counter-reset: f; }
.factor { counter-increment: f; display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 1px solid var(--ink); }
.factor::before { content: "0" counter(f); font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.factor h3 { font-size: 22px; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.factor p { color: var(--muted); font-size: 16px; }

/* Schedule chart: one row per stage on a week grid, drawn in on scroll */
.schedule { --weeks: 8; --label: minmax(120px, 2fr); margin-top: clamp(40px, 5vw, 64px); }
.sched-row { display: grid; grid-template-columns: var(--label) repeat(var(--weeks), minmax(0, 1fr)); align-items: center; min-height: 64px; border-top: 1px solid var(--line); }
.sched-head { min-height: 0; border-top: 0; padding-bottom: 12px; color: var(--muted); }
.sched-head span { padding-inline-start: 8px; }
.sched-row:last-child { border-bottom: 1px solid var(--line); }
.sched-row .stage { font-weight: 500; font-size: 18px; letter-spacing: -.015em; padding-inline-end: 16px; }
.sched-row .stage small { display: block; font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .02em; color: var(--muted); margin-top: 2px; }
.bar { grid-row: 1; position: relative; z-index: 1; height: 28px; background: var(--ink); transform-origin: var(--start); display: flex; align-items: center; padding-inline: 10px; overflow: hidden; }
.bar span { color: var(--canvas); white-space: nowrap; }
.bar--signal { background: var(--signal); }
.bar--after { background: repeating-linear-gradient(135deg, var(--line) 0 6px, transparent 6px 12px); border: 1px solid var(--ink); }
.bar--after span { color: var(--ink); }
.sched-cell { grid-row: 1; height: 100%; border-inline-start: 1px solid var(--line); }
.stage-notes { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.stage-notes li { display: flex; flex-direction: column; gap: 10px; }
.stage-notes h3 { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.stage-notes p { color: var(--muted); font-size: 16px; }

/* ================= About page ================= */
.principles { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gutter); counter-reset: p; }
.principle { counter-increment: p; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px 16px; padding-block: 32px; border-top: 1px solid var(--line); }
.principle::before { content: "0" counter(p); font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding-top: 8px; grid-row: span 2; }
.principle h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 500; letter-spacing: -.025em; line-height: 1.2; }
.principle p { color: var(--muted); max-width: 52ch; }
.tools-list { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; }
.tool { display: flex; flex-direction: column; gap: 14px; padding-top: 20px; border-top: 1px solid var(--line); font-weight: 500; }
.tool small { font-weight: 400; color: var(--muted); font-size: 14px; line-height: 1.4; }
.logo {
  width: 28px; height: 28px; flex: none; background: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat;
}
/* Wordmark-shaped icons sit in a thin band of their square viewBox, so they are drawn larger and cropped to the row height. */
.logo--wide { width: 50px; -webkit-mask-size: 50px 50px; mask-size: 50px 50px; }

/* ================= Prose (privacy) and 404 ================= */
.prose { max-width: 68ch; display: flex; flex-direction: column; gap: 18px; }
.prose h2 { font-size: 26px; font-weight: 500; letter-spacing: -.025em; margin-top: 28px; }
.prose p, .prose li { color: var(--muted); }
.prose ul { list-style: square; padding-inline-start: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.notfound { min-height: calc(100svh - var(--nav-h) - 120px); display: flex; align-items: center; }
.notfound .code { font-size: clamp(120px, 26vw, 360px); font-weight: 500; letter-spacing: -.07em; line-height: .8; }
.notfound .code span { color: var(--signal); }

/* ================= Footer ================= */
.footer { padding-top: clamp(64px, 8vw, 112px); padding-bottom: 32px; border-top: 1px solid var(--line); overflow: hidden; }
.footer-top { row-gap: 40px; }
.footer-col { grid-column: span 3; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.footer-col:first-child { grid-column: 1 / span 6; }
.footer-col h3 { font-family: var(--mono); font-size: 12.5px; font-weight: 400; letter-spacing: .02em; color: var(--muted); margin-bottom: 4px; }
.footer-col a { width: fit-content; }
.footer-col a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-col p { color: var(--muted); max-width: 38ch; }
.bigmark {
  display: block; margin-top: clamp(56px, 8vw, 120px); font-size: clamp(60px, 19.2vw, 280px); font-weight: 500;
  letter-spacing: -.065em; line-height: .78; white-space: nowrap; user-select: none;
}
.bigmark span { color: var(--signal); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.footer-bottom nav { display: flex; gap: 24px; }
.footer-bottom a:hover { color: var(--ink); }

/* ================= Languages ================= */
/* Arabic: IBM Plex Sans Arabic (Geist has no Arabic). Letter-spacing breaks Arabic joining, so it is removed
   everywhere except Latin brand names (translate="no"); headings get room for the taller letterforms. */
:root:lang(ar) { --font: "IBM Plex Sans Arabic", "Geist", ui-sans-serif, system-ui, sans-serif; --mono: "IBM Plex Sans Arabic", "Geist Mono", ui-monospace, monospace; }
:root:lang(ar) .wordmark [translate="no"] { letter-spacing: -.03em; }
:root:lang(ar) .lang-switch a[aria-current="true"] { text-underline-offset: 8px; }
:root:lang(ar) body { font-size: 18px; line-height: 1.7; }
:root:lang(ar) *:not([translate="no"], [translate="no"] *) { letter-spacing: 0 !important; }
:root:lang(ar) :is(h1, h2, h3, .page-title, .h2, .h3, .svc-tab, .index-row .name, .spec-row .name, .next-project .name) { line-height: 1.3; }
:root:lang(ar) .mono { font-size: 13.5px; }
:root:lang(ar) .lede { line-height: 1.7; }
:root:lang(fr) :is(.page-title, .hero h1) { hyphens: manual; }

/* ================= Reveal (only when motion is allowed and JS ran) ================= */
.js-motion [data-reveal] { opacity: 0; transform: translateY(24px); }
.js-motion .bar { transform: scaleX(0); }

/* ================= Responsive ================= */
@media (max-width: 1100px) {
  .ledger-list { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
  .nav-links { gap: 20px; }
  .hero-copy { grid-column: 1 / span 5; }
  .hero-media { grid-column: 6 / -1; }
  .index-head, .index-row { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) 64px; }
  .index-head .col-role, .index-row .role { display: none; }
  .cs-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tools-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .factors, .stage-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .spec-head, .spec-line { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr) 24px; }
  .spec-head .col-price, .spec-row .cell--price { display: none; }
}
@media (max-width: 900px) {
  .nav-links, .nav-actions .btn, .nav-actions .lang-switch { display: none; }
  .menu-btn { display: grid; }
  .nav-actions { margin-inline-start: auto; }
  .hero-copy, .hero-media { grid-column: 1 / -1; }
  .hero-row { align-items: start; }
  .project:nth-child(1), .project:nth-child(2) { grid-column: 1 / -1; margin-top: 0; }
  .project:nth-child(2) .project-frame { aspect-ratio: 4 / 3; }
  .svc-tabs, .svc-panels { grid-column: 1 / -1; }
  .process-intro { grid-column: 1 / -1; position: static; }
  .steps { grid-column: 1 / -1; }
  .about-media { grid-column: 1 / span 8; }
  .about-copy { grid-column: 1 / -1; }
  .contact-intro, .form, .sent { grid-column: 1 / -1; }
  .footer-col { grid-column: span 6; }
  .footer-col:first-child { grid-column: 1 / -1; }
  .page-title, .page-head .lede { grid-column: 1 / -1; }
  /* Work reel: no pinning, each project shows its own image */
  .reel-steps { grid-column: 1 / -1; }
  .reel-media { display: none; }
  .reel-step, .reel-step:first-child { min-height: 0; padding-block: 48px; justify-content: flex-start; }
  .reel-step:first-child { padding-top: 0; }
  .reel-step .reel-img { display: block; }
  .cs-block > .h2, .cs-block > .body { grid-column: 1 / -1; }
  .decisions { grid-column: 1 / -1; }
  .decisions-phone { grid-column: 1 / span 6; position: static; }
  .principles { grid-template-columns: minmax(0, 1fr); }
  .spec-inner { grid-template-columns: minmax(0, 1fr); }
  .spec-inner .chips-static { grid-column: 1; }
}
@media (max-width: 767px) {
  body { font-size: 16px; }
  .grid { column-gap: 16px; }
  .ledger .wrap { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ledger-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
  .work-head { flex-direction: column; align-items: start; }
  .index-head { display: none; }
  .index-row { grid-template-columns: 88px minmax(0, 1fr); gap: 4px 16px; padding-block: 18px; }
  .index-row .thumb { display: block; grid-row: 1 / span 2; width: 88px; height: 88px; align-self: center; object-fit: cover; object-position: top; background: var(--line); }
  .index-row .name { font-size: 22px; align-self: end; }
  .index-row .sector { align-self: start; grid-column: 2; }
  .index-row .name::before { display: none; }
  .index-row:hover .name { transform: none; }
  .index-row .yr { display: none; }
  .preview { display: none; }
  .svc-tabs { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; border-top: 0; padding-bottom: 4px; scrollbar-width: none;
    -webkit-mask: linear-gradient(to right, #000 85%, transparent); mask: linear-gradient(to right, #000 85%, transparent); }
  [dir="rtl"] .svc-tabs { -webkit-mask: linear-gradient(to left, #000 85%, transparent); mask: linear-gradient(to left, #000 85%, transparent); }
  .svc-tabs::-webkit-scrollbar { display: none; }
  .svc-tab { flex: none; scroll-snap-align: start; font-size: 16px; letter-spacing: 0; padding: 0 16px; height: 44px; border: 1px solid var(--line); }
  .svc-tab:last-child { margin-inline-end: 40px; }
  .svc-tab .from { display: none; }
  .svc-tab .label::before { display: none; }
  .svc-tab[aria-selected="true"] { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
  .svc-list { grid-template-columns: minmax(0, 1fr); }
  .steps { padding-inline-start: 28px; }
  .step::before { inset-inline-start: -32.5px; }
  .about-media { grid-column: 1 / -1; }
  .about-media .frame { aspect-ratio: 4 / 3; }
  .figures { gap: 12px; }
  .figures dd { font-size: clamp(26px, 7.4vw, 36px); }
  .figures dt { overflow-wrap: anywhere; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .footer-col, .footer-col:first-child { grid-column: 1 / -1; }
  .sent { padding: 28px; }
  .shot-phone { box-shadow: 0 0 0 4px var(--canvas); }
  .cs-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-hero .shot-phone { width: 24%; }
  .decisions-phone { grid-column: 1 / span 8; }
  .decision, .principle { grid-template-columns: 36px minmax(0, 1fr); }
  .tools-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .factors, .stage-notes { grid-template-columns: minmax(0, 1fr); }
  .spec-head { display: none; }
  .spec-line { grid-template-columns: minmax(0, 1fr) 24px; gap: 6px 16px; }
  .spec-row .name { grid-column: 1; }
  .spec-row .name::before { display: none; }
  .spec-row .ic { grid-column: 2; grid-row: 1; }
  .spec-row .for { grid-column: 1 / -1; }
  .spec-row .cell { grid-column: 1 / -1; font-size: 14px; font-weight: 400; color: var(--muted); }
  .spec-row .cell--price { display: block; }
  .spec-label { display: inline; }
  .schedule { --label: minmax(84px, 1.4fr); }
  .sched-row .stage { font-size: 15px; padding-inline-end: 8px; }
  .bar { height: 22px; padding-inline: 6px; }
  .bar span { display: none; }
  .measure thead { display: none; }
  .measure, .measure tbody, .measure tr, .measure td, .measure th { display: block; }
  .measure tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; padding-block: 20px; border-top: 1px solid var(--line); }
  .measure th, .measure td { border: 0; padding: 0; }
  .measure th { grid-column: 1 / -1; font-size: 20px; font-weight: 500; margin-bottom: 6px; }
  .measure td::before { content: attr(data-label); display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); }
  .cta-band .wrap { flex-direction: column; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .hero-slide .shot-desktop img { transform: none; }
}
