/* =============================================================
   ELDAR KNIGHT — Portfolio
   Design tokens per brief: white, precise, room to breathe.
   ============================================================= */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'SF Pro Display';
  src: url('../fonts/sf-pro-display-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'SF Pro Display';
  src: url('../fonts/sf-pro-display-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'SF Pro Display';
  src: url('../fonts/sf-pro-display-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* color */
  --bg:            #FFFFFF;
  --surface:       #F5F5F7;
  --surface-2:     #EDEDF0;
  --ink:           #111111;
  --ink-soft:      #2B2B30;
  --muted:         #626269;
  --line:          #DEDEE3;
  --line-strong:   #C9C9D1;
  --on-ink:        #FFFFFF;
  --danger:        #B42318;
  --success:       #0B6B4F;
  --focus:         #111111;
  --scrim:         rgba(12, 12, 14, .86);

  /* type */
  --font-display: 'SF Pro Display', 'Inter', 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-ui: 'Heebo', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  --fs-hero:    clamp(2.5rem, 7.2vw, 6.5rem);
  --fs-h2:      clamp(1.75rem, 3.6vw, 3.5rem);
  --fs-h3:      clamp(1.25rem, 2vw, 1.75rem);
  --fs-lead:    clamp(1.0625rem, 1.5vw, 1.375rem);
  --fs-body:    clamp(1rem, 1.05vw, 1.125rem);
  --fs-sm:      .9375rem;
  --fs-xs:      .8125rem;

  /* space */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --sp-9: 96px;
  --section-y: clamp(56px, 9vw, 144px);
  --gutter: clamp(20px, 4vw, 40px);
  --container: 1320px;

  /* shape */
  --r-card: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --r-pill: 999px;

  /* elevation */
  --sh-1: 0 1px 2px rgba(17,17,17,.04);
  --sh-2: 0 6px 20px rgba(17,17,17,.06), 0 1px 2px rgba(17,17,17,.04);
  --sh-3: 0 18px 48px rgba(17,17,17,.12), 0 2px 8px rgba(17,17,17,.06);

  /* motion */
  --e-out: cubic-bezier(.22,.61,.36,1);
  --e-spring: cubic-bezier(.34,1.32,.5,1);
  --t-fast: 180ms;
  --t-mid: 250ms;
  --t-slow: 520ms;

  /* layers */
  --z-base: 1; --z-sticky: 40; --z-float: 60; --z-panel: 80; --z-modal: 100;

  /* a11y adjustable */
  --a11y-scale: 1;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 108px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: calc(var(--fs-body) * var(--a11y-scale));
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video, svg { max-width: 100%; display: block; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { margin: 0; line-height: 1.12; font-weight: 700; letter-spacing: -.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--ink); color: var(--on-ink); }

/* ---------- Focus ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed; inset-inline-start: 16px; top: -100px;
  z-index: 200; background: var(--ink); color: var(--on-ink);
  padding: 12px 20px; border-radius: var(--r-pill);
  font-weight: 600; transition: top var(--t-fast) var(--e-out);
}
.skip-link:focus { top: 16px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(40px, 6vw, 96px); }

.section-head { max-width: 62ch; margin-bottom: clamp(32px, 4vw, 64px); }
.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: var(--sp-4);
  display: block;
}
.section-title { font-size: var(--fs-h2); }
.section-sub {
  margin-top: var(--sp-4);
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.6;
  max-width: 54ch;
}

.ltr { direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* =============================================================
   Header
   ============================================================= */
.header {
  position: sticky; top: 0; z-index: var(--z-panel);
  padding-block: var(--sp-4);
  transition: padding var(--t-mid) var(--e-out);
}
.header::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  opacity: 0; transition: opacity var(--t-mid) var(--e-out);
  pointer-events: none;
  border-bottom: 1px solid transparent;
}
.header.is-stuck::before { opacity: 1; border-bottom-color: var(--line); }

.header__inner {
  position: relative;
  display: flex; align-items: center; gap: var(--sp-4);
  justify-content: space-between;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700; letter-spacing: .04em;
  font-size: .9375rem;
  white-space: nowrap;
  padding: 6px;
  border-radius: var(--r-pill);
}
.brand__mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  overflow: hidden; flex: none;
}
.brand__mark img { width: 30px; height: 30px; object-fit: contain; object-position: center 2px; }
.brand__text { direction: ltr; }

/* pill nav */
.nav {
  display: none;
  align-items: center; gap: 2px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 5px;
  box-shadow: var(--sh-1);
}
.nav__link {
  display: inline-flex; align-items: center;
  min-height: 40px; padding: 0 18px;
  border-radius: var(--r-pill);
  color: var(--muted); font-weight: 500;
  font-size: var(--fs-sm);
  transition: color var(--t-fast) var(--e-out), background var(--t-fast) var(--e-out);
}
.nav__link:hover { color: var(--ink); background: rgba(255,255,255,.9); }
.nav__link[aria-current="page"] {
  color: var(--ink); background: var(--bg); box-shadow: var(--sh-1);
}
.header__actions { display: flex; align-items: center; gap: var(--sp-3); }

/* mobile menu */
.menu-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); cursor: pointer;
  font-size: var(--fs-sm); font-weight: 500;
  transition: background var(--t-fast) var(--e-out);
}
.menu-btn:hover { background: var(--surface-2); }
.menu-btn__bars { display: grid; gap: 4px; }
.menu-btn__bars i {
  display: block; width: 16px; height: 1.5px; background: var(--ink);
  transition: transform var(--t-mid) var(--e-out), opacity var(--t-fast) linear;
}
.menu-btn[aria-expanded="true"] .menu-btn__bars i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-btn__bars i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: 0; z-index: var(--z-float);
  max-width: 100%;
  overflow-x: hidden; overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  display: grid; align-content: start;
  padding: 96px var(--gutter) var(--sp-8);
  gap: var(--sp-2);
  transform: translateY(-8px); opacity: 0;
  visibility: hidden; pointer-events: none;
  transition: opacity var(--t-mid) var(--e-out), transform var(--t-mid) var(--e-out), visibility var(--t-mid);
}
.mobile-nav.is-open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }
.mobile-nav a {
  font-size: clamp(1.5rem, 7vw, 2.25rem); font-weight: 700;
  padding: var(--sp-4) 0; border-bottom: 1px solid var(--line);
  letter-spacing: -.02em;
}
.mobile-nav .btn { margin-top: var(--sp-5); justify-content: center; white-space: normal; min-width: 0; }

/* compact header on small phones */
@media (max-width: 599px) {
  .header__inner { gap: var(--sp-2); }
  .header__actions { gap: var(--sp-2); }
  .brand { font-size: .8125rem; gap: 8px; padding: 4px; }
  .brand__mark { width: 34px; height: 34px; }
  .brand__mark img { width: 27px; height: 27px; }
  .header__actions .btn { padding: 0 16px; }
  .menu-btn { padding: 0; width: 44px; justify-content: center; }
  .menu-btn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (max-width: 359px) {
  .header__actions .btn { display: none; }
}

@media (min-width: 900px) {
  .nav { display: inline-flex; }
  .menu-btn { display: none; }
  .mobile-nav { display: none; }
}

/* =============================================================
   Buttons
   ============================================================= */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--on-ink);
  --btn-bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  min-height: 52px; padding: 0 28px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-pill);
  font-weight: 600; font-size: var(--fs-sm);
  cursor: pointer; white-space: nowrap;
  transition: transform var(--t-fast) var(--e-out),
              background-color var(--t-fast) var(--e-out),
              border-color var(--t-fast) var(--e-out),
              color var(--t-fast) var(--e-out),
              box-shadow var(--t-fast) var(--e-out);
  text-align: center;
}
.btn:hover { --btn-bg: #000; transform: translateY(-2px); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(0) scale(.985); }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-strong); }
.btn--ghost:hover { --btn-bg: var(--surface); --btn-bd: var(--ink); }

.btn--soft { --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-bd: var(--line); }
.btn--soft:hover { --btn-bg: var(--surface-2); --btn-bd: var(--line-strong); }

.btn--sm { min-height: 44px; padding: 0 20px; font-size: var(--fs-xs); }
.btn--lg { min-height: 60px; padding: 0 36px; font-size: var(--fs-body); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.btn__icon { width: 18px; height: 18px; flex: none; }

/* text link */
.link-u {
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
  transition: border-color var(--t-fast) var(--e-out), color var(--t-fast) var(--e-out);
}
.link-u:hover { border-color: var(--ink); }

/* =============================================================
   Hero
   ============================================================= */
.hero {
  padding-top: clamp(40px, 7vw, 88px);
  padding-bottom: clamp(48px, 8vw, 120px);
  text-align: center;
}
.hero__kicker {
  color: var(--muted); font-size: var(--fs-sm);
  letter-spacing: .01em; margin-bottom: var(--sp-5);
  display: flex; align-items: baseline; justify-content: center;
  gap: 6px; flex-wrap: wrap;
  min-height: 1.5em;
}
.hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: .98;
  direction: ltr; unicode-bidi: isolate;
  margin-inline: auto;
  max-width: 16ch;
  text-wrap: balance;
}
.hero__lead {
  margin: clamp(20px, 3vw, 32px) auto 0;
  max-width: 46ch;
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  line-height: 1.55;
  text-wrap: balance;
}
.hero__sub {
  margin: var(--sp-3) auto 0;
  max-width: 50ch; color: var(--muted);
  font-size: var(--fs-sm);
}
.hero__cta {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  justify-content: center;
  margin-top: clamp(28px, 4vw, 44px);
}
@media (max-width: 480px) {
  .hero__cta .btn { width: 100%; }
}

.hero__strip {
  margin-top: clamp(40px, 6vw, 80px);
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: var(--sp-2) var(--sp-5);
  color: var(--muted); font-size: var(--fs-xs);
  font-family: var(--font-display);
  letter-spacing: .12em; text-transform: uppercase;
}
.hero__strip li { display: inline-flex; align-items: center; gap: var(--sp-5); }
.hero__strip li:not(:last-child)::after {
  content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: var(--line-strong);
}

/* =============================================================
   About
   ============================================================= */
.about__grid {
  display: grid; gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
@media (min-width: 900px) {
  .about__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); }
  .about__portrait { order: 2; }
  .about__copy { order: 1; }
}
.about__portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-card);
  background:
    radial-gradient(120% 90% at 50% 8%, #FFFFFF 0%, #F2F2F5 52%, #E8E8ED 100%);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid; place-items: center;
  box-shadow: var(--sh-2);
}
.about__portrait img {
  width: 76%; height: auto;
  filter: drop-shadow(0 22px 40px rgba(17,17,17,.14));
  transform: translateY(2%);
}
.about__badge {
  position: absolute; inset-block-end: 18px; inset-inline-start: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 8px 14px; font-size: var(--fs-xs); font-weight: 500;
  color: var(--ink);
}
.about__badge i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); flex: none;
}
.about__title { font-size: var(--fs-h2); margin-top: var(--sp-3); }
.about__body { margin-top: clamp(20px, 2.5vw, 28px); display: grid; gap: var(--sp-4); max-width: 56ch; }
.about__body p { color: var(--ink-soft); font-size: var(--fs-body); line-height: 1.75; }
.about__body p.is-muted { color: var(--muted); }

/* =============================================================
   Work grid
   ============================================================= */
.work__head {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: var(--sp-5);
  margin-bottom: clamp(32px, 4vw, 64px);
}
.work__head .section-head { margin-bottom: 0; }

.about__grid > *, .services__grid > *, .footer__top > * { min-width: 0; }

.work-grid {
  column-count: 1;
  column-gap: clamp(20px, 2.4vw, 32px);
}
.work-grid > * {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: clamp(28px, 3vw, 44px);
}
@media (min-width: 720px)  { .work-grid { column-count: 2; } }
@media (min-width: 1080px) { .work-grid { column-count: 3; } }
@media (min-width: 1440px) { .work-grid--3 { column-count: 4; } }

.work-card {
  position: relative;
  display: block;
  border-radius: var(--r-card);
  background: transparent;
  text-align: start;
}
.work-card__media {
  position: relative;
  width: 100%;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
}
.work-card__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transition: transform var(--t-slow) var(--e-out), filter var(--t-mid) var(--e-out);
}
.work-card__btn {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background: transparent; border: 0; padding: 0;
  cursor: pointer; border-radius: var(--r-card);
}
.work-card__btn:focus-visible { outline-offset: -4px; }

.work-card__play {
  position: absolute; inset-block-end: 14px; inset-inline-end: 14px;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(17,17,17,.08);
  display: grid; place-items: center;
  box-shadow: var(--sh-2);
  transition: transform var(--t-mid) var(--e-spring), background var(--t-fast) var(--e-out);
  pointer-events: none;
}
.work-card__play svg { width: 18px; height: 18px; margin-inline-start: 2px; }

.work-card__dur {
  position: absolute; inset-block-start: 14px; inset-inline-start: 14px;
  background: rgba(17,17,17,.72);
  color: #fff; border-radius: var(--r-pill);
  padding: 4px 10px; font-size: .75rem; font-weight: 500;
  font-variant-numeric: tabular-nums; direction: ltr;
  backdrop-filter: blur(6px);
  pointer-events: none;
  opacity: 0; transform: translateY(-4px);
  transition: opacity var(--t-fast) var(--e-out), transform var(--t-fast) var(--e-out);
}

.work-card:hover .work-card__media,
.work-card:focus-within .work-card__media {
  transform: translateY(-4px);
  box-shadow: var(--sh-3);
  border-color: var(--line-strong);
}
.work-card:hover .work-card__media img { transform: scale(1.03); }
.work-card:hover .work-card__play { transform: scale(1.08); background: #fff; }
.work-card:hover .work-card__dur,
.work-card:focus-within .work-card__dur { opacity: 1; transform: none; }

.work-card__meta {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--sp-4); padding: var(--sp-4) var(--sp-1) 0;
}
.work-card__name { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -.02em; }
.work-card__type { color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.work-card__desc {
  padding-inline: var(--sp-1); margin-top: 8px;
  color: var(--muted); font-size: var(--fs-sm); line-height: 1.7;
  max-width: 48ch;
}
/* long project copy: show the opening lines, reveal the rest in the player */
.work-card__desc {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =============================================================
   Lightbox
   ============================================================= */
.lightbox {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: grid; place-items: center;
  padding: clamp(16px, 4vw, 48px);
  background: var(--scrim);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--t-mid) var(--e-out), visibility var(--t-mid);
}
.lightbox.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.lightbox__panel {
  position: relative;
  max-width: min(100%, 1180px);
  width: 100%;
  display: grid; justify-items: center; gap: var(--sp-4);
  transform: scale(.96) translateY(10px);
  transition: transform var(--t-mid) var(--e-spring);
}
.lightbox.is-open .lightbox__panel { transform: none; }
.lightbox__stage {
  position: relative;
  border-radius: clamp(14px, 2vw, 22px);
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  max-height: min(78vh, 900px);
}
.lightbox__stage video {
  display: block;
  max-height: min(78vh, 900px);
  max-width: 100%;
  width: auto; height: auto;
  background: #000;
}
.lightbox__caption {
  color: #fff; text-align: center; max-width: 60ch;
}
.lightbox__caption strong { display: block; font-size: var(--fs-h3); letter-spacing: -.02em; }
.lightbox__caption span { color: rgba(255,255,255,.72); font-size: var(--fs-sm); }
.lightbox__desc {
  display: block; margin-top: 10px;
  font-size: var(--fs-sm); line-height: 1.6;
  color: rgba(255,255,255,.62);
  max-width: 68ch; margin-inline: auto;
}
@media (max-height: 760px) { .lightbox__desc { display: none; } }
.lightbox__close {
  position: absolute; top: clamp(12px, 2vw, 24px); inset-inline-end: clamp(12px, 2vw, 24px);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  color: #fff; display: grid; place-items: center; cursor: pointer;
  transition: background var(--t-fast) var(--e-out), transform var(--t-fast) var(--e-out);
}
.lightbox__close:hover { background: rgba(255,255,255,.26); transform: rotate(90deg); }
.lightbox__close:focus-visible { outline-color: #fff; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  color: #fff; display: grid; place-items: center; cursor: pointer;
  transition: background var(--t-fast) var(--e-out);
}
.lightbox__nav:hover { background: rgba(255,255,255,.28); }
.lightbox__nav:focus-visible { outline-color: #fff; }
.lightbox__nav--prev { inset-inline-start: clamp(8px, 2vw, 28px); }
.lightbox__nav--next { inset-inline-end: clamp(8px, 2vw, 28px); }
@media (max-width: 720px) {
  .lightbox__nav { top: auto; bottom: -4px; transform: none; width: 44px; height: 44px; }
}
body.is-locked { overflow: hidden; }

/* =============================================================
   Services
   ============================================================= */
.services__grid {
  display: grid; gap: 0;
  grid-template-columns: 1fr;
}
@media (min-width: 820px) { .services__grid { grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 5vw, 80px); } }

.service {
  display: grid; grid-template-columns: auto 1fr; gap: var(--sp-4);
  padding-block: clamp(20px, 2.4vw, 28px);
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.service__check {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line);
  display: grid; place-items: center; flex: none;
  margin-top: 2px;
  transition: background var(--t-fast) var(--e-out), border-color var(--t-fast) var(--e-out);
}
.service__check svg { width: 13px; height: 13px; }
.service:hover .service__check { background: var(--ink); border-color: var(--ink); color: #fff; }
.service h3 { font-size: var(--fs-h3); font-weight: 700; }
.service p { color: var(--muted); font-size: var(--fs-sm); margin-top: 6px; line-height: 1.6; }

.services__note {
  margin-top: clamp(28px, 4vw, 44px);
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--sp-5);
}
.services__note p { color: var(--muted); font-size: var(--fs-sm); max-width: 46ch; }

/* =============================================================
   CTA band
   ============================================================= */
.cta {
  position: relative; overflow: hidden;
  border-radius: clamp(24px, 3vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(40px, 7vw, 96px) clamp(24px, 5vw, 80px);
  text-align: center;
}
.cta__bg {
  position: absolute; inset: 0;
  background-image: var(--cta-bg, none);
  background-size: cover; background-position: center;
  opacity: .9; pointer-events: none;
}
.cta__bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,.2));
}
.cta__inner { position: relative; }
.cta__title {
  font-size: var(--fs-h2);
  max-width: 18ch; margin-inline: auto;
  text-wrap: balance;
}
.cta__text {
  margin: var(--sp-5) auto 0; max-width: 46ch;
  color: var(--ink-soft); font-size: var(--fs-lead); line-height: 1.6;
}
.cta__actions {
  margin-top: clamp(28px, 4vw, 40px);
  display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center;
}
@media (max-width: 480px) { .cta__actions .btn { width: 100%; } }

/* =============================================================
   Contact page
   ============================================================= */
.contact__grid {
  display: grid; gap: clamp(32px, 5vw, 72px);
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
}
.contact__grid > *, .form, .form__row, .field, .fieldset, .urgency { min-width: 0; }
@media (min-width: 980px) {
  .contact__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); }
}
.contact-list .c-value { overflow-wrap: anywhere; }

.form { display: grid; gap: clamp(18px, 2vw, 24px); }
.form__row { display: grid; gap: clamp(18px, 2vw, 24px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

.field { display: grid; gap: 8px; }
.field__label {
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink);
}
.field__label .req { color: var(--danger); margin-inline-start: 2px; }
.field__hint { font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }
.field__error {
  font-size: var(--fs-xs); color: var(--danger); font-weight: 500;
  display: none; align-items: center; gap: 6px;
}
.field__error svg { width: 14px; height: 14px; flex: none; }
.field.has-error .field__error { display: flex; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(180,35,24,.10);
}

.input, .select, .textarea {
  width: 100%; min-width: 0; max-width: 100%;
  min-height: 56px;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-body);
  color: var(--ink);
  transition: border-color var(--t-fast) var(--e-out), background var(--t-fast) var(--e-out), box-shadow var(--t-fast) var(--e-out);
  appearance: none;
}
.textarea {
  border-radius: var(--r-md);
  min-height: 160px; resize: vertical; line-height: 1.6;
  font-family: inherit;
}
.input::placeholder, .textarea::placeholder { color: #8C8C95; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .select:focus, .textarea:focus {
  background: var(--bg);
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17,17,17,.08);
  outline: none;
}
.input[dir="ltr"], .select[dir="ltr"] { text-align: start; }

.select-wrap { position: relative; }
.select-wrap svg {
  position: absolute; inset-inline-start: 20px; top: 50%;
  transform: translateY(-50%); width: 14px; height: 14px;
  pointer-events: none; color: var(--muted);
}
.select { padding-inline-start: 46px; cursor: pointer; }

/* checkbox / switch */
.check {
  display: flex; align-items: flex-start; gap: 12px;
  cursor: pointer; padding: 4px 0;
  min-height: 44px; align-items: center;
}
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  width: 22px; height: 22px; flex: none;
  border-radius: 7px; border: 1.5px solid var(--line-strong);
  background: var(--bg);
  display: grid; place-items: center;
  transition: background var(--t-fast) var(--e-out), border-color var(--t-fast) var(--e-out);
}
.check__box svg { width: 12px; height: 12px; color: #fff; opacity: 0; transform: scale(.6); transition: opacity var(--t-fast) var(--e-out), transform var(--t-fast) var(--e-spring); }
.check input:checked + .check__box { background: var(--ink); border-color: var(--ink); }
.check input:checked + .check__box svg { opacity: 1; transform: none; }
.check input:focus-visible + .check__box { outline: 3px solid var(--focus); outline-offset: 3px; }
.check__text { font-size: var(--fs-sm); line-height: 1.5; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip__label {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line);
  font-size: var(--fs-sm); cursor: pointer;
  transition: background var(--t-fast) var(--e-out), border-color var(--t-fast) var(--e-out), color var(--t-fast) var(--e-out);
}
.chip__label svg { width: 13px; height: 13px; opacity: 0; transition: opacity var(--t-fast) var(--e-out); }
.chip__label:hover { border-color: var(--line-strong); }
.chip input:checked + .chip__label { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:checked + .chip__label svg { opacity: 1; }
.chip input:focus-visible + .chip__label { outline: 3px solid var(--focus); outline-offset: 3px; }

.urgency {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5);
  display: grid; gap: 6px;
}
.urgency .field__hint { margin-inline-start: 34px; }

.form__foot { display: grid; gap: var(--sp-4); }
.form__status {
  display: none; align-items: flex-start; gap: 10px;
  border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5);
  font-size: var(--fs-sm); line-height: 1.55;
}
.form__status svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.form__status.is-visible { display: flex; }
.form__status.is-success { background: #EAF6F1; color: var(--success); border: 1px solid #BFE3D6; }
.form__status.is-error { background: #FDECEA; color: var(--danger); border: 1px solid #F5C7C2; }
.form__status a { text-decoration: underline; font-weight: 600; }

.btn.is-loading { pointer-events: none; }
.btn.is-loading .btn__label { opacity: .6; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
  display: none;
}
.btn.is-loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* contact aside */
.contact-aside { display: grid; gap: var(--sp-5); position: sticky; top: 120px; }
@media (max-width: 979px) { .contact-aside { position: static; } }

.contact-visual {
  position: relative; aspect-ratio: 4 / 3;
  border-radius: var(--r-card); overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid; place-items: center;
}
.contact-visual img { width: 100%; height: 100%; object-fit: cover; }
.contact-visual__memoji { width: 48% !important; height: auto !important; object-fit: contain !important; filter: drop-shadow(0 18px 34px rgba(17,17,17,.14)); }

.contact-card {
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: clamp(24px, 3vw, 32px); background: var(--bg);
  display: grid; gap: var(--sp-4);
}
.contact-card h2 { font-size: var(--fs-h3); }
.contact-card p { color: var(--muted); font-size: var(--fs-sm); }
.contact-list { display: grid; gap: var(--sp-2); }
.contact-list a {
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: 52px; padding: 0 var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: background var(--t-fast) var(--e-out), border-color var(--t-fast) var(--e-out);
}
.contact-list a:hover { background: var(--surface); border-color: var(--line); }
.contact-list svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.contact-list .c-label { font-size: var(--fs-xs); color: var(--muted); display: block; }
.contact-list .c-value { font-weight: 600; font-size: var(--fs-sm); direction: ltr; unicode-bidi: isolate; }

/* =============================================================
   Footer
   ============================================================= */
.footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 120px);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
/* the EK texture closes the page as its own band, never behind the links */
.footer__mark {
  position: relative;
  width: 100%;
  margin-top: clamp(24px, 4vw, 48px);
  line-height: 0;
}
.footer__mark img {
  width: 100%;
  height: clamp(150px, 22vw, 320px);
  object-fit: cover;
  object-position: center 42%;
  opacity: .95;
  pointer-events: none;
  user-select: none;
}
.footer__mark::after {
  content: ''; position: absolute; inset-inline: 0; top: 0;
  height: 40%;
  background: linear-gradient(to bottom, var(--bg), rgba(255,255,255,0));
  pointer-events: none;
}
.footer__inner { position: relative; padding-block: clamp(48px, 7vw, 88px) clamp(28px, 4vw, 48px); }
.footer__copy { direction: ltr; unicode-bidi: isolate; }
.footer__top {
  display: grid; gap: clamp(28px, 4vw, 56px);
}
@media (min-width: 820px) { .footer__top { grid-template-columns: 1.3fr 1fr 1fr; } }

.footer__brand { display: grid; gap: var(--sp-4); }
.footer__logo {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.125rem; letter-spacing: .06em; direction: ltr;
}
.footer__tag { color: var(--muted); font-size: var(--fs-sm); max-width: 34ch; }
.footer h2, .footer h3 {
  font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: var(--sp-4);
  font-family: var(--font-display);
}
.footer__links { display: grid; gap: var(--sp-2); }
.footer__links a {
  display: inline-block; padding: 6px 0; font-size: var(--fs-sm);
  color: var(--ink-soft);
  transition: color var(--t-fast) var(--e-out);
}
.footer__links a:hover { color: var(--ink); }
.footer__links a[dir="ltr"] { direction: ltr; unicode-bidi: isolate; }

.footer__bottom {
  margin-top: clamp(36px, 5vw, 64px);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  align-items: center; justify-content: space-between;
  color: var(--muted); font-size: var(--fs-xs);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
.footer__legal a { display: inline-flex; align-items: center; min-height: 44px; }
.footer__bottom p { display: inline-flex; align-items: center; min-height: 44px; }
.footer__legal a:hover { color: var(--ink); }
.social { display: flex; gap: var(--sp-2); }
.social a {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,.7);
  display: grid; place-items: center;
  transition: background var(--t-fast) var(--e-out), border-color var(--t-fast) var(--e-out), transform var(--t-fast) var(--e-out);
}
.social a:hover { background: var(--ink); border-color: var(--ink); color: #fff; transform: translateY(-2px); }
.social svg { width: 18px; height: 18px; }

/* =============================================================
   Legal / prose pages
   ============================================================= */
.prose {
  max-width: 74ch;
  margin-inline: auto;
}
.prose h1 { font-size: var(--fs-h2); margin-bottom: var(--sp-4); }
.prose h2 {
  font-size: var(--fs-h3); margin-top: clamp(32px, 4vw, 48px); margin-bottom: var(--sp-3);
  padding-top: var(--sp-5); border-top: 1px solid var(--line);
}
.prose h3 { font-size: 1.0625rem; margin-top: var(--sp-5); margin-bottom: var(--sp-2); }
.prose p, .prose li { color: var(--ink-soft); line-height: 1.8; font-size: var(--fs-body); }
.prose p + p { margin-top: var(--sp-4); }
.prose ul { margin-top: var(--sp-3); display: grid; gap: var(--sp-2); }
.prose ul li { position: relative; padding-inline-start: 22px; }
.prose ul li::before {
  content: ''; position: absolute; inset-inline-start: 6px; top: 13px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong);
}
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose__meta { color: var(--muted); font-size: var(--fs-sm); margin-bottom: var(--sp-7); }
.prose__box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--sp-5); margin-top: var(--sp-5);
}
.prose__box p { font-size: var(--fs-sm); }

/* page head */
.page-head { padding-top: clamp(32px, 5vw, 72px); padding-bottom: clamp(24px, 3vw, 40px); }
.page-head h1 { font-size: var(--fs-h2); }
.page-head p { margin-top: var(--sp-4); color: var(--muted); font-size: var(--fs-lead); max-width: 56ch; }

/* breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: var(--fs-xs); color: var(--muted); margin-bottom: var(--sp-5); }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.crumbs [aria-hidden="true"] { color: var(--line-strong); }
.crumbs a { padding-block: 6px; }

/* 404 */
.notfound { display: grid; place-items: center; text-align: center; min-height: 58vh; gap: var(--sp-5); padding-block: var(--section-y); }
.notfound__code { font-family: var(--font-display); font-size: clamp(4rem, 16vw, 10rem); font-weight: 700; letter-spacing: -.05em; line-height: 1; }

/* =============================================================
   Accessibility widget
   ============================================================= */
.a11y-fab {
  position: fixed; bottom: 20px; left: 20px;
  z-index: var(--z-sticky);
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--ink); color: #fff;
  border: 2px solid var(--bg);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--sh-3);
  transition: transform var(--t-fast) var(--e-spring), background var(--t-fast) var(--e-out);
}
.a11y-fab:hover { transform: scale(1.06); }
.a11y-fab svg { width: 26px; height: 26px; }

.a11y-panel {
  position: fixed; bottom: 88px; left: 20px;
  z-index: var(--z-panel);
  width: min(340px, calc(100vw - 40px));
  max-height: min(76vh, 640px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sh-3);
  padding: var(--sp-5);
  opacity: 0; transform: translateY(12px) scale(.97);
  visibility: hidden; pointer-events: none;
  transition: opacity var(--t-mid) var(--e-out), transform var(--t-mid) var(--e-spring), visibility var(--t-mid);
}
.a11y-panel.is-open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }
.a11y-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-4); border-bottom: 1px solid var(--line);
}
.a11y-panel__head h2 { font-size: 1.0625rem; }
.a11y-close {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; cursor: pointer;
  transition: background var(--t-fast) var(--e-out);
}
.a11y-close:hover { background: var(--surface-2); }
.a11y-close svg { width: 14px; height: 14px; }

.a11y-group { margin-bottom: var(--sp-4); }
.a11y-group > h3 {
  font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: var(--sp-3);
}
.a11y-steps { display: flex; align-items: center; gap: var(--sp-2); }
.a11y-steps button {
  width: 44px; height: 44px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; display: grid; place-items: center; font-weight: 700;
  transition: background var(--t-fast) var(--e-out);
}
.a11y-steps button:hover { background: var(--surface-2); }
.a11y-steps output {
  flex: 1; text-align: center; font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums; font-weight: 600;
}
.a11y-toggles { display: grid; gap: var(--sp-2); }
.a11y-toggle {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); width: 100%;
  min-height: 48px; padding: 0 var(--sp-4);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg); cursor: pointer; text-align: start;
  font-size: var(--fs-sm);
  transition: background var(--t-fast) var(--e-out), border-color var(--t-fast) var(--e-out);
}
.a11y-toggle:hover { background: var(--surface); }
.a11y-toggle[aria-pressed="true"] { border-color: var(--ink); background: var(--surface); font-weight: 600; }
.a11y-toggle > span:first-child::after { content: ''; font-size: var(--fs-xs); color: var(--muted); font-weight: 500; }
.a11y-toggle[aria-pressed="true"] > span:first-child::after { content: ' · פעיל'; }
.a11y-toggle__sw {
  width: 40px; height: 24px; border-radius: var(--r-pill);
  background: var(--line-strong); flex: none; position: relative;
  transition: background var(--t-fast) var(--e-out);
}
.a11y-toggle__sw::after {
  content: ''; position: absolute; top: 3px; inset-inline-start: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform var(--t-fast) var(--e-out);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.a11y-toggle[aria-pressed="true"] .a11y-toggle__sw { background: var(--ink); }
.a11y-toggle[aria-pressed="true"] .a11y-toggle__sw::after { transform: translateX(-16px); }


.a11y-panel__foot { display: grid; gap: var(--sp-3); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.a11y-panel__foot .btn { width: 100%; }
.a11y-panel__foot a { font-size: var(--fs-xs); color: var(--muted); text-decoration: underline; text-align: center; }

/* --- a11y modes --- */
html.a11y-contrast {
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F0F0F0;
  --ink: #000000; --ink-soft: #000000; --muted: #3A3A3A;
  --line: #000000; --line-strong: #000000;
}
html.a11y-contrast .work-card__media,
html.a11y-contrast .input,
html.a11y-contrast .select,
html.a11y-contrast .textarea,
html.a11y-contrast .nav,
html.a11y-contrast .footer,
html.a11y-contrast .cta { border-width: 2px; }
html.a11y-contrast .footer__mark,
html.a11y-contrast .cta__bg { display: none; }
html.a11y-contrast .header::before { background: #fff; }
html.a11y-contrast .a11y-toggle__sw { background: #FFFFFF; border: 2px solid #000; }
html.a11y-contrast .a11y-toggle__sw::after { background: #000; top: 2px; inset-inline-start: 2px; }
html.a11y-contrast .a11y-toggle[aria-pressed="true"] .a11y-toggle__sw { background: #000; }
html.a11y-contrast .a11y-toggle[aria-pressed="true"] .a11y-toggle__sw::after { background: #fff; }
html.a11y-contrast .a11y-toggle[aria-pressed="true"] { outline: 2px solid #000; outline-offset: 2px; }
html.a11y-contrast .check__box, html.a11y-contrast .chip__label { border-width: 2px; }

html.a11y-invert { filter: invert(1) hue-rotate(180deg); background: #000; }
html.a11y-invert img, html.a11y-invert video { filter: invert(1) hue-rotate(180deg); }

html.a11y-links a:not(.btn):not(.brand):not(.social a) {
  text-decoration: underline !important;
  text-underline-offset: 3px;
  font-weight: 600;
}
html.a11y-links .nav__link, html.a11y-links .footer__links a { text-decoration: underline !important; }

html.a11y-readable, html.a11y-readable body,
html.a11y-readable .hero__title, html.a11y-readable .brand, html.a11y-readable .eyebrow {
  font-family: Arial, 'Heebo', sans-serif !important;
  letter-spacing: normal !important;
}
html.a11y-readable body { line-height: 1.9; }

html.a11y-bigcursor, html.a11y-bigcursor * { cursor: url('../img/cursor-pointer@2x.png') 26 4, auto !important; }

html.a11y-nomotion *, html.a11y-nomotion *::before, html.a11y-nomotion *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}
html.a11y-nomotion .reveal { opacity: 1 !important; transform: none !important; }

html.a11y-spacing body { letter-spacing: .04em; word-spacing: .12em; line-height: 1.95; }

html.a11y-headings h1, html.a11y-headings h2,
html.a11y-headings h3, html.a11y-headings h4 {
  font-weight: 800 !important;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}
html.a11y-headings .eyebrow { font-weight: 700 !important; color: var(--ink) !important; }

html.a11y-grayscale { filter: grayscale(1); }
html.a11y-grayscale.a11y-invert { filter: grayscale(1) invert(1) hue-rotate(180deg); }

/* =============================================================
   Custom cursor
   ============================================================= */
@media (hover: hover) and (pointer: fine) {
  html.has-cursor, html.has-cursor body { cursor: url('../img/cursor-pointer.png') 13 2, auto; }
  html.has-cursor a, html.has-cursor button, html.has-cursor [role="button"],
  html.has-cursor label, html.has-cursor summary, html.has-cursor select {
    cursor: url('../img/cursor-pointer.png') 13 2, pointer;
  }
  html.has-cursor input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
  html.has-cursor textarea { cursor: text; }
}

/* =============================================================
   Reveal animation
   ============================================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  /* never clip a reveal target to zero height — IntersectionObserver would never fire */
  transition: opacity var(--t-slow) var(--e-out), transform var(--t-slow) var(--e-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

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


/* =============================================================
   Motion layer
   ============================================================= */

/* masked line reveal — the hero headline rises from behind its own baseline */
.mask-line {
  display: block;
  overflow: hidden;
  padding-bottom: .06em;
  margin-bottom: -.06em;
}
.js .mask-line > span {
  display: block;
  transform: translateY(105%);
  transition: transform 900ms cubic-bezier(.16,.84,.34,1);
  transition-delay: var(--line-delay, 0ms);
  will-change: transform;
}
[data-mask-lines].is-in .mask-line > span,
.reveal.is-in .mask-line > span { transform: none; }

/* crop marks around a heading, drawn from one pseudo-element */
.has-marks { position: relative; display: inline-block; }
.has-marks::before {
  content: '';
  position: absolute;
  inset: -.34em -.5em;
  pointer-events: none;
  opacity: 1;
  transform: none;
  transition: opacity 620ms var(--e-out) 260ms, transform 620ms var(--e-out) 260ms;
  --m: var(--line-strong);
  --l: 15px;
  background:
    linear-gradient(var(--m), var(--m)) 0 0 / 1px var(--l) no-repeat,
    linear-gradient(var(--m), var(--m)) 0 0 / var(--l) 1px no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 0 / 1px var(--l) no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 0 / var(--l) 1px no-repeat,
    linear-gradient(var(--m), var(--m)) 0 100% / 1px var(--l) no-repeat,
    linear-gradient(var(--m), var(--m)) 0 100% / var(--l) 1px no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 100% / 1px var(--l) no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 100% / var(--l) 1px no-repeat;
}
.js .has-marks::before { opacity: 0; transform: scale(1.045); }
.js .has-marks.is-in::before, .js .page-head .has-marks::before { opacity: 1; transform: none; }

/* rotating word in the hero kicker */
.js .rotator {
  position: relative;
  display: inline-block;
  vertical-align: bottom;
  height: 1.5em;
  width: var(--rot-w, 8ch);
  overflow: hidden;
  transition: width 520ms cubic-bezier(.16,.84,.34,1);
}
.js .rotator__item {
  position: absolute;
  inset-inline-start: 0; top: 0;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 500;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 560ms cubic-bezier(.16,.84,.34,1), opacity 300ms linear;
}
.rotator__item.is-in  { transform: none; opacity: 1; }
.rotator__item.is-out { transform: translateY(-100%); opacity: 0; }

/* card motion */
.work-card__media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(200deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 42%);
  opacity: 0;
  transition: opacity var(--t-mid) var(--e-out);
  pointer-events: none;
}
.work-card:hover .work-card__media::after,
.work-card:focus-within .work-card__media::after { opacity: 1; }
.work-card__name { transition: opacity var(--t-fast) var(--e-out); }

/* CTA arrow slides on hover */
.btn .btn__icon { transition: transform var(--t-mid) var(--e-spring); }
.btn:hover .btn__icon { transform: translateX(4px); }

/* motion off: honour the system setting and the accessibility switch */
@media (prefers-reduced-motion: reduce) {
  .mask-line > span { transform: none !important; }
  .has-marks::before { opacity: 1 !important; transform: none !important; }
  .rotator { width: auto !important; height: auto; overflow: visible; }
  .rotator__item { position: static; transform: none !important; opacity: 1 !important; }
  .rotator__item:not(.is-in) { display: none; }
}
html.a11y-nomotion .mask-line > span { transform: none !important; }
html.a11y-nomotion .has-marks::before { opacity: 1 !important; transform: none !important; }
html.a11y-nomotion .rotator { width: auto !important; height: auto; overflow: visible; }
html.a11y-nomotion .rotator__item { position: static; transform: none !important; opacity: 1 !important; }
html.a11y-nomotion .rotator__item:not(.is-in) { display: none; }


/* pixel dissolve — project cards resolve out of blocks as they scroll in,
   the same dissolve language as the EK texture in the footer */
.work-card.reveal { opacity: 1; transform: none; transition: none; }

.js .work-card__media {
  -webkit-mask-image: url('../img/dissolve-mask.png');
          mask-image: url('../img/dissolve-mask.png');
  /* fixed px keeps every block a crisp 14px instead of letting the browser smooth it */
  -webkit-mask-size: 336px 2100px;
          mask-size: 336px 2100px;
  -webkit-mask-repeat: repeat-x;
          mask-repeat: repeat-x;
  -webkit-mask-position: 50% 0%;
          mask-position: 50% 0%;
  transition:
    transform var(--t-mid) var(--e-out),
    box-shadow var(--t-mid) var(--e-out),
    border-color var(--t-mid) var(--e-out),
    -webkit-mask-position 2000ms cubic-bezier(.25,.8,.3,1) var(--reveal-delay, 0ms),
            mask-position 2000ms cubic-bezier(.25,.8,.3,1) var(--reveal-delay, 0ms);
}
.js .work-card.is-in .work-card__media {
  -webkit-mask-position: 50% 100%;
          mask-position: 50% 100%;
}
/* the meta text keeps the plain fade so the copy never flickers */
.js .work-card__meta, .js .work-card__desc {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 700ms var(--e-out), transform 700ms var(--e-out);
  transition-delay: calc(var(--reveal-delay, 0ms) + 620ms);
}
.work-card.is-in .work-card__meta,
.work-card.is-in .work-card__desc { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .work-card__media { -webkit-mask-image: none !important; mask-image: none !important; }
  .work-card__meta, .work-card__desc { opacity: 1 !important; transform: none !important; }
}
html.a11y-nomotion .work-card__media { -webkit-mask-image: none !important; mask-image: none !important; }
html.a11y-nomotion .work-card__meta,
html.a11y-nomotion .work-card__desc { opacity: 1 !important; transform: none !important; }


/* =============================================================
   Scroll-linked motion
   ============================================================= */

/* progress line across the top */
.scroll-progress {
  position: fixed; inset-inline: 0; top: 0;
  height: 3px; z-index: 120;
  pointer-events: none;
  background: transparent;
}
.scroll-progress span {
  display: block; height: 100%;
  background: var(--ink);
  transform: scaleX(var(--p, 0));
  transform-origin: right center;   /* RTL: the line grows from the start edge */
  will-change: transform;
}
[dir="ltr"] .scroll-progress span { transform-origin: left center; }

/* poster drifts inside its frame as the card passes */
.work-card__media img {
  transform: translate3d(0, var(--par, 0px), 0) scale(var(--zoom, 1.06));
  will-change: transform;
}
.work-card:hover .work-card__media img { --zoom: 1.10; }

/* the nav pill follows the section you are reading */
.nav__link.is-active {
  color: var(--ink); background: var(--bg); box-shadow: var(--sh-1);
}
.nav__link[aria-current="page"].is-dimmed {
  background: transparent; box-shadow: none; color: var(--muted);
}

/* service rows draw their divider in */
.service { border-bottom: 0; position: relative; }
.service::after {
  content: ''; position: absolute; inset-inline: 0; bottom: 0;
  height: 1px; background: var(--line);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 900ms cubic-bezier(.16,.84,.34,1) var(--reveal-delay, 0ms);
}
.service.is-in::after, html:not(.js) .service::after { transform: scaleX(1); }

/* drifting discipline band */
.marquee-band {
  padding-block: clamp(28px, 4vw, 56px);
  border-block: 1px solid var(--line);
  overflow: hidden;
}
.marquee { overflow: hidden; direction: ltr; }   /* the band is English; keep it flowing LTR so the loop seam is invisible */
.marquee__track {
  display: flex; width: max-content;
  transform: translate3d(var(--mx, 0px), 0, 0);
  will-change: transform;
}
.marquee__group {
  display: flex; align-items: center; flex: none;
  gap: clamp(20px, 3vw, 44px);
  padding-inline-end: clamp(20px, 3vw, 44px);
}
.marquee__group em {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(1.5rem, 4.2vw, 3rem);
  letter-spacing: -.02em;
  color: var(--ink);
  white-space: nowrap;
  direction: ltr;
}
.marquee__group i {
  width: clamp(7px, 1vw, 11px); height: clamp(7px, 1vw, 11px);
  border-radius: 50%; background: var(--line-strong); flex: none;
}

@media (prefers-reduced-motion: reduce) {
  .work-card__media img { transform: none !important; }
  .marquee__track { transform: none !important; }
  .marquee { overflow-x: auto; }
  .service::after { transform: scaleX(1) !important; }
  .scroll-progress { display: none; }
}
html.a11y-nomotion .work-card__media img { transform: none !important; }
html.a11y-nomotion .marquee__track { transform: none !important; }
html.a11y-nomotion .service::after { transform: scaleX(1) !important; }
html.a11y-nomotion .scroll-progress { display: none; }

/* =============================================================
   Print
   ============================================================= */
@media print {
  .header, .scroll-progress, .marquee-band, .a11y-fab, .a11y-panel, .lightbox, .menu-btn, .mobile-nav { display: none !important; }
  body { color: #000; }
  .work-card__media { break-inside: avoid; }
}
