/* ===================================================
   SERVOKA — Persian-first dark identity
   Direction: RTL. Persian is the primary language;
   Latin appears only as small technical metadata.
=================================================== */

:root {
  /* Dark surface ladder — depth comes from tonal steps, not shadows */
  --bg:        #0B0C0C;
  --s1:        #111313;
  --s2:        #171919;
  --s3:        #1E2020;

  /* Text */
  --text:      #F1EDE7;
  --text-2:    #B8B1A8;
  --muted:     #837D75;

  /* Lines */
  --line:      #292B2A;
  --line-2:    #363837;

  /* Warm identity accent — matte copper.
     --copper is for marks/lines/borders (4.3:1, below text threshold).
     --copper-lt is the text-safe variant (5.7:1 on --bg). */
  --copper:    #B86A4C;
  --copper-lt: #CF8265;
  --copper-dp: #8D4A35;

  /* Cool counterpoint — used sparingly.
     --teal for marks, --teal-lt when it must carry text. */
  --teal:      #587979;
  --teal-lt:   #789695;
  --teal-dp:   #3E5A5A;

  --warm:      #D3C4B1;

  /* Type */
  --fa: 'Estedad', 'Vazirmatn', Tahoma, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Metrics */
  --header-h: 84px;
  --container: 1360px;
  --pad: clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(.16,.8,.24,1);
  --ease-img: cubic-bezier(.16,1,.3,1); /* expo-out: long tail, no overshoot */
}

/* ---------------- Reset ---------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--fa);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* ss02 = square Arabic dots. Round nuqta bloom and smear in light-on-dark
     at display size; square dots hold a crisp edge on a near-black ground. */
  font-feature-settings: "ss02" 1;
}
/* An unloaded image must never flash white on a near-black page */
img { max-width: 100%; display: block; background: var(--s2); }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }

section[id] { scroll-margin-top: calc(var(--header-h) + 24px); }

::selection { background: var(--copper-dp); color: var(--text); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--copper-lt);
  outline-offset: 3px;
}

/* Latin technical metadata — always LTR, mono, small, tracked */
.lat {
  font-family: var(--mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------- Type scale ----------------
   Persian needs more line-height than Latin and must never be
   letter-spaced. Display sizes are deliberately restrained outside
   the Hero and the closing Contact moment. */
.d1 {
  font-size: clamp(2.1rem, 2.35vw + 0.95rem, 3.5rem);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0;
  text-wrap: balance;
}
.d2 {
  font-size: clamp(1.9rem, 1.75vw + 1.15rem, 2.7rem);
  line-height: 1.38;
  font-weight: 600;
  text-wrap: balance;
}
.h3 {
  font-size: clamp(1.25rem, 0.6vw + 1.02rem, 1.5rem);
  line-height: 1.5;
  font-weight: 600;
}
.body-lg {
  font-size: clamp(1.02rem, 0.4vw + 0.94rem, 1.18rem);
  line-height: 2.05;
  color: var(--text-2);
}
.body {
  font-size: 1rem;
  line-height: 2;
  color: var(--text-2);
}
.cap {
  font-size: 0.88rem;
  line-height: 1.9;
  color: var(--muted);
}

/* ---------------- Grain ---------------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  /* Grain also dithers away the 8-bit banding that only near-black pages reveal */
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------- Image treatment ----------------
   Photographs are graded with cheap overlay layers rather than
   CSS filters, which are expensive on mobile. Every photo sits
   under a dark wash so it belongs on a near-black ground. */
.ph { position: relative; overflow: hidden; background: var(--s2); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* dark wash */
.ph::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(11,12,12,.22), rgba(11,12,12,.42));
  pointer-events: none;
}
/* Grades are deliberately light. Pushed further the photographs turn
   sepia/cyan and read dated rather than matte-premium. */
.ph--warm::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: var(--copper-dp);
  mix-blend-mode: soft-light;
  opacity: .26;
  pointer-events: none;
}
.ph--cool::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: var(--teal-dp);
  mix-blend-mode: soft-light;
  opacity: .28;
  pointer-events: none;
}
.ph--deep::after {
  background: linear-gradient(to bottom, rgba(11,12,12,.34), rgba(11,12,12,.60));
}
.ph--light::after {
  background: linear-gradient(to bottom, rgba(11,12,12,.06), rgba(11,12,12,.24));
}

/* A bright UI screenshot must stay authentic but not glare on a dark page.
   The product is NEVER recoloured — no invert, hue-rotate or forced dark
   theme. Instead the environment does the work: a value ladder from the page
   ground up to the ivory UI, plus a thin scrim of the page's own colour,
   which is a near hue-preserving exposure cut. The scrim lifts on hover /
   focus so the screenshot can always be inspected at full fidelity. */
.shot-wrap { position: relative; }
/* ambient bloom — a lit ivory panel in a dark room bounces warm light */
.shot-wrap::before {
  content: '';
  position: absolute;
  inset: -9%;
  z-index: 0;
  background: radial-gradient(ellipse at center, rgba(241,237,231,.14), transparent 68%);
  pointer-events: none;
}
.shot {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: #EDEAE3;
  padding: 0;
  border: 1px solid rgba(241,237,231,.10);
  outline: 1px solid var(--s3);
  outline-offset: -1px;
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; background: #EDEAE3; }
.shot::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(11,12,12,.12);
  pointer-events: none;
  transition: opacity .45s var(--ease);
}
.shot-wrap:hover .shot::after,
.shot-wrap:focus-within .shot::after { opacity: 0; }

/* ---------------- Marks ---------------- */
.mark {
  display: inline-block;
  width: 26px; height: 6px;
  background: var(--copper);
  flex-shrink: 0;
}
.mark--sm { width: 18px; height: 4px; }
.mark--teal { background: var(--teal); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.eyebrow .lbl {
  font-family: var(--mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper-lt);
}

/* ---------------- Header ---------------- */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--pad);
  background: linear-gradient(to bottom, rgba(11,12,12,.92), rgba(11,12,12,0));
  transition: background .35s var(--ease), border-color .35s var(--ease);
  border-block-end: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(11,12,12,.92);
  backdrop-filter: blur(8px);
  border-block-end-color: var(--line);
}

.logo {
  font-family: var(--mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--text);
}
.logo .reg { font-size: .55em; vertical-align: super; letter-spacing: 0; }

.menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}
.menu-trigger .bars {
  display: inline-flex; flex-direction: column; gap: 4px; width: 20px;
}
.menu-trigger .bars i {
  display: block; height: 1.5px; background: var(--copper);
  transition: transform .3s var(--ease);
}
.menu-trigger .bars i:last-child { width: 62%; }
.menu-trigger:hover .bars i:last-child { width: 100%; }

/* ---------------- Menu overlay ---------------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--s1);
  visibility: hidden;
  opacity: 0;
  transition: opacity .5s var(--ease), visibility 0s linear .5s;
  display: grid;
  grid-template-rows: var(--header-h) 1fr auto;
  padding-inline: var(--pad);
}
.menu-overlay.is-open {
  visibility: visible; opacity: 1;
  transition: opacity .5s var(--ease);
}
.menu-bar {
  display: flex; align-items: center; justify-content: space-between;
}
.menu-close {
  font-size: 0.95rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
}
.menu-close .x { color: var(--copper); font-size: 1.2rem; line-height: 1; }

.menu-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding-block: clamp(24px, 6vh, 72px);
}
.menu-nav { display: flex; flex-direction: column; gap: clamp(4px, 1.2vh, 14px); }
.menu-nav a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  font-size: clamp(2rem, 2.2vw + 0.7rem, 2.6rem);
  font-weight: 600;
  line-height: 1.42;
  width: fit-content;
  color: var(--text-2);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s var(--ease), transform .55s var(--ease), color .25s var(--ease);
}
.menu-overlay.is-open .menu-nav a { opacity: 1; transform: none; }
.menu-nav a:hover, .menu-nav a:focus-visible { color: var(--text); }
.menu-nav a .n {
  font-family: var(--mono); direction: ltr; unicode-bidi: isolate;
  font-size: 0.7rem; letter-spacing: .14em; color: var(--copper);
  transition: color .25s var(--ease);
}
.menu-nav a:nth-child(1) { transition-delay: .06s; }
.menu-nav a:nth-child(2) { transition-delay: .12s; }
.menu-nav a:nth-child(3) { transition-delay: .18s; }
.menu-nav a:nth-child(4) { transition-delay: .24s; }
.menu-nav a:nth-child(5) { transition-delay: .30s; }

.menu-figure {
  position: relative;
  aspect-ratio: 4 / 5;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .8s var(--ease-img) .18s, transform .9s var(--ease-img) .18s;
}
.menu-overlay.is-open .menu-figure { opacity: 1; transform: none; }

.menu-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-block: 26px;
  border-block-start: 1px solid var(--line);
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: stretch;
  padding: calc(var(--header-h) + 22px) 0 clamp(28px, 4vh, 52px);
  overflow-x: clip;
}
.hero-grid {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.86fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(24px, 3.4vw, 64px);
}

/* Image fills the hero column and bleeds off the inline-end viewport edge */
.hero-figure {
  position: relative;
  grid-row: 1;
  margin-inline-end: calc(var(--pad) * -1);
  min-height: 0;
}
.hero-figure .ph { position: absolute; inset: 0; }
.hero-figure .tag {
  position: absolute;
  inset-block-end: 20px;
  inset-inline-start: 20px;
  z-index: 3;
  display: flex; align-items: center; gap: 10px;
}

.hero-copy {
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  margin-block-end: 30px;
  padding-block-end: 18px;
  border-block-end: 1px solid var(--line);
}
.hero-meta span { font-size: 0.9rem; color: var(--muted); }
.hero-title { margin-block-end: 24px; }
.hero-title .l2 { color: var(--text-2); font-weight: 300; }
.hero-sub { max-width: 46ch; }

.hero-foot {
  grid-row: 2;
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  padding-block-start: 18px;
  border-block-start: 1px solid var(--line);
}
.scroll-cue {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.95rem; font-weight: 500;
}
.scroll-cue .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--copper);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.28} }

/* ---------------- Section shell ---------------- */
.sec {
  padding-block: clamp(72px, 7.2vw, 104px);
  padding-inline: var(--pad);
  /* The screenshot bloom (.shot-wrap::before) spreads past its box by design.
     clip contains it at the section edge without creating a scroll container
     the way overflow:hidden would, and leaves the y-axis visible. */
  overflow-x: clip;
}
.sec-inner { max-width: var(--container); margin-inline: auto; }
.sec--s1 { background: var(--s1); }
.sec--s2 { background: var(--s2); }
.bordered { border-block-start: 1px solid var(--line); }

.sec-head { margin-block-end: clamp(38px, 3.8vw, 52px); }
.sec-head .d2 { max-width: 20ch; }

/* ---------------- Work / NAVA ---------------- */
.work { position: relative; }
.work-top {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  margin-block-end: 40px;
}
.work-title { margin-block-end: 10px; }
.work-tags { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.work-tags li { font-size: 0.92rem; color: var(--muted); }
.work-tags li + li { padding-inline-start: 18px; position: relative; }
.work-tags li + li::before {
  content: ''; position: absolute; inset-inline-start: 0; inset-block-start: 50%;
  width: 4px; height: 4px; border-radius: 50%; background: var(--line-2);
  transform: translateY(-50%);
}

.work-visual {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(12px, 1.6vw, 22px);
  align-items: start;
}
.work-main { grid-column: 1 / 9; }
.work-main .shot { aspect-ratio: 16 / 10; }
.work-side { grid-column: 9 / 13; display: grid; gap: clamp(12px, 1.6vw, 22px); }
.work-phone .shot { aspect-ratio: 620 / 1000; }
.work-detail .ph { aspect-ratio: 4 / 3; }

.work-ctas {
  display: flex; flex-wrap: wrap; gap: 14px 34px;
  margin-block-start: 30px;
  padding-block-start: 22px;
  border-block-start: 1px solid var(--line);
}

/* ---------------- Projects shell ---------------- */
.work-lead { margin-block-end: clamp(28px, 2.8vw, 40px); }
.work-lead .eyebrow { margin-bottom: 0; }
.proj + .proj {
  margin-block-start: clamp(62px, 6.2vw, 92px);
  padding-block-start: clamp(54px, 5.4vw, 80px);
  border-block-start: 1px solid var(--line);
}

/* ---------------- SAYEH — editorial spread ----------------
   Deliberately not NAVA's device composition: the plate breaks the
   container margin and the three frames step down instead of stacking
   into a side column. */
.proj-head { margin-block-end: clamp(24px, 2.6vw, 36px); }
.proj-head-row {
  display: grid;
  grid-template-columns: minmax(0, .34fr) minmax(0, 1fr);
  gap: clamp(10px, 3vw, 56px);
  align-items: baseline;
}
.proj-title { margin-block-end: 0; }
.proj-lead { max-width: 48ch; }

.proj-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-block-start: 16px; }
.proj-meta li { font-size: 0.92rem; color: var(--muted); }
.proj-meta li + li { padding-inline-start: 18px; position: relative; }
.proj-meta li + li::before {
  content: ''; position: absolute; inset-inline-start: 0; inset-block-start: 50%;
  width: 4px; height: 4px; border-radius: 50%; background: var(--line-2);
  transform: translateY(-50%);
}

/* Concept disclosure — teal marker separates it from copper project accents */
.proj-note {
  display: flex; align-items: flex-start; gap: 12px;
  margin-block-start: 15px; padding-block-start: 14px;
  border-block-start: 1px solid var(--line);
  max-width: 64ch;
  font-size: 0.9rem; line-height: 1.95; color: var(--muted);
}
.proj-note .mk {
  width: 14px; height: 4px; background: var(--teal);
  margin-block-start: .82em; flex-shrink: 0;
}

/* The plate breaks the container margin; the strip stays contained so the
   Persian captions keep a margin instead of touching the viewport edge. */
.proj-plate { margin-inline: calc(var(--pad) * -1); }
.proj-plate .shot { aspect-ratio: 1600 / 782; }

.proj-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 22px);
  margin-block-start: clamp(16px, 1.8vw, 26px);
  align-items: start;
}
/* the second frame steps down, following the RTL reading direction */
.proj-strip > figure:nth-child(2) { margin-block-start: clamp(14px, 1.8vw, 28px); }
/* screenshots keep their own ratio here — no crop */
.proj-strip .shot img { height: auto; }
.proj-strip figcaption {
  margin-block-start: 14px;
  font-size: 0.88rem; line-height: 1.85; color: var(--text-2);
}

.proj-ctas {
  display: flex; flex-wrap: wrap; gap: 14px 34px;
  margin-block-start: clamp(28px, 3vw, 40px);
  padding-block-start: 22px;
  border-block-start: 1px solid var(--line);
}

/* ---------------- Link with arrow ---------------- */
.arrow-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 1rem; font-weight: 500;
  padding-block-end: 4px;
  border-block-end: 1px solid var(--line-2);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.arrow-link .ar { color: var(--copper); transition: transform .25s var(--ease); }
.arrow-link:hover { border-block-end-color: var(--copper); }
.arrow-link:hover .ar { transform: translate(-3px, -3px); }

/* ---------------- Services ---------------- */
.svc { display: grid; gap: 0; }
.svc-row {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(20px, 3.5vw, 64px);
  align-items: center;
  padding-block: clamp(22px, 1.8vw, 28px);
  border-block-start: 1px solid var(--line);
}
.svc-row:last-child { border-block-end: 1px solid var(--line); }
.svc-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.svc-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,148px); gap: clamp(18px, 3vw, 44px); align-items: center; }
.svc-body p { max-width: 48ch; }
/* Deliberately unequal crops so the rows don't read as a catalogue:
   1 = wide material fragment, 2 = tight square detail, 3 = vertical crop. */
.svc-fig .ph { aspect-ratio: 1 / 1; }
.svc-row:nth-child(1) .svc-body { grid-template-columns: minmax(0,1fr) minmax(0,168px); }
.svc-row:nth-child(1) .svc-fig .ph { aspect-ratio: 4 / 3; }
.svc-row:nth-child(2) .svc-body { grid-template-columns: minmax(0,1fr) minmax(0,108px); }
.svc-row:nth-child(2) .svc-fig .ph { aspect-ratio: 1 / 1; }
.svc-row:nth-child(3) .svc-body { grid-template-columns: minmax(0,1fr) minmax(0,124px); }
.svc-row:nth-child(3) .svc-fig .ph { aspect-ratio: 3 / 4; }

/* ---------------- Studio ---------------- */
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
.studio-fig { position: relative; }
.studio-fig .ph { aspect-ratio: 1 / 1.02; }
.studio-fig .ph.b {
  position: absolute;
  inset-block-end: -34px;
  inset-inline-start: -34px;
  width: 46%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line-2);
}
.studio-copy .d2 { margin-block-end: 22px; max-width: 16ch; }
.studio-copy .body-lg { max-width: 44ch; }

/* ---------------- Process ---------------- */
.proc { display: grid; }
.proc-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 0.30fr) minmax(0, 1fr) minmax(0, 116px);
  gap: clamp(16px, 2.6vw, 44px);
  align-items: center;
  padding-block: clamp(22px, 2vw, 28px);
  border-block-start: 1px solid var(--line);
  transition: background .3s var(--ease);
}
.proc-row:last-child { border-block-end: 1px solid var(--line); }
.proc-row:hover { background: var(--s2); }
.proc-n {
  font-size: 1.15rem;
  color: var(--copper);
  font-weight: 500;
}
.proc-t { font-size: clamp(1.15rem, 0.5vw + 1rem, 1.35rem); line-height: 1.5; font-weight: 600; }
.proc-d { color: var(--text-2); font-size: 0.98rem; line-height: 1.95; max-width: 52ch; }
.proc-fig .ph { aspect-ratio: 3 / 2; }

/* ---------------- Contact ---------------- */
.contact { position: relative; overflow: hidden; }
.contact-inner { position: relative; z-index: 2; max-width: var(--container); margin-inline: auto; }
.contact-bg {
  position: absolute; inset: 0; z-index: 1;
}
.contact-bg .ph { position: absolute; inset: 0; }
.contact-bg::after {
  content: ''; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to bottom, rgba(11,12,12,.78), rgba(11,12,12,.90));
}
.contact-title {
  /* Contact is deliberately the largest type after the Hero, but no longer
     viewport-dominating. Own clamp so it does not follow .d1 downward. */
  font-size: clamp(2.1rem, 2.7vw + 1rem, 4rem);
  line-height: 1.3;
  margin-block-end: 30px;
  max-width: 18ch;
}
.contact-cta {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: clamp(1.05rem, 0.7vw + 0.9rem, 1.3rem);
  font-weight: 500;
  padding: 16px 30px;
  border: 1px solid var(--copper);
  color: var(--text);
  transition: background .28s var(--ease), color .28s var(--ease);
}
.contact-cta .ar { transition: transform .25s var(--ease); }
.contact-cta:hover { background: var(--copper); color: #0B0C0C; }
.contact-cta:hover .ar { transform: translate(-3px, -3px); }

/* Contact panel — a finished UI shell. It does not claim delivery. */
.cpanel {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(11,12,12,.86);
  backdrop-filter: blur(6px);
  visibility: hidden; opacity: 0;
  transition: opacity .35s var(--ease), visibility 0s linear .35s;
  display: grid; place-items: center;
  padding: var(--pad);
}
.cpanel.is-open { visibility: visible; opacity: 1; transition: opacity .35s var(--ease); }
.cpanel-box {
  width: min(560px, 100%);
  max-height: 88svh;
  overflow-y: auto;
  background: var(--s1);
  border: 1px solid var(--line-2);
  padding: clamp(24px, 3.4vw, 42px);
  transform: translateY(14px);
  transition: transform .4s var(--ease);
}
.cpanel.is-open .cpanel-box { transform: none; }
.cpanel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-block-end: 8px; }
.cpanel h2 { font-size: 1.5rem; font-weight: 600; }
.cpanel .note {
  margin-block: 18px 24px;
  padding: 14px 16px;
  border-inline-start: 2px solid var(--teal);
  background: var(--s2);
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.9;
}
.field { margin-block-end: 16px; }
.field label { display: block; font-size: 0.86rem; color: var(--text-2); margin-block-end: 7px; }
.field input, .field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  transition: border-color .2s var(--ease);
}
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--copper); outline: none; }
.cpanel-actions { display: flex; align-items: center; gap: 16px; margin-block-start: 22px; flex-wrap: wrap; }
.btn {
  padding: 13px 26px;
  border: 1px solid var(--copper);
  background: var(--copper);
  color: #0B0C0C;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity .2s var(--ease);
}
.btn:hover { opacity: .88; }
/* Honeypot: positioned off-screen rather than display:none so automated
   fillers still see and complete it. Never focusable, never announced. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.cpanel-status {
  margin-block-start: 18px;
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--copper-lt);
  display: none;
}
.cpanel-status.show { display: block; }
.cpanel-status.is-ok { color: var(--teal-lt); }
.cpanel-status.is-err { color: var(--copper-lt); }

/* Field-level validation messages reuse the existing caption scale. */
.field-err {
  display: none;
  margin-block-start: 6px;
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--copper-lt);
}
.field.has-err .field-err { display: block; }
.field.has-err input,
.field.has-err textarea { border-color: var(--copper); }

/* Submitting state — no new animation, just a disabled affordance. */
.btn[disabled] { opacity: .55; cursor: default; }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--s1);
  border-block-start: 1px solid var(--line);
  padding-block: clamp(44px, 5vw, 68px) 28px;
  padding-inline: var(--pad);
}
.footer-inner { max-width: var(--container); margin-inline: auto; }
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
  padding-block-end: 34px;
  border-block-end: 1px solid var(--line);
}
.footer-brand .logo { font-size: 1.05rem; }
.footer-brand p { margin-block-start: 16px; max-width: 32ch; }
.footer-col h3 {
  font-family: var(--mono); direction: ltr; unicode-bidi: isolate;
  font-size: 0.66rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--copper-lt); margin-block-end: 16px;
}
.footer-col li + li { margin-block-start: 11px; }
.footer-col a { font-size: 0.97rem; color: var(--text-2); transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--text); }
.footer-bot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  padding-block-start: 24px;
}

/* ---------------- Reveal ---------------- */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* Cinematic image reveal: a curtain wipes back, the photo settles from a
   slight scale. The observed element itself is never clipped to zero
   height, which would stop IntersectionObserver from firing. */
.rvi { position: relative; }
.rvi > .ph, .rvi > .shot { overflow: hidden; }
.rvi img { transform: scale(1.08); transition: transform 1.5s var(--ease-img); }
.rvi.in img { transform: none; }
.rvi .veil {
  position: absolute; inset: 0; z-index: 5;
  background: var(--bg);
  transform-origin: right center;
  transition: transform 1.1s var(--ease-img);
}
.rvi.in .veil { transform: scaleX(0); }

.lines > span { display: block; overflow: hidden; }
.lines i {
  display: block; font-style: normal;
  transform: translateY(106%);
  transition: transform 1s var(--ease-img);
}
.lines.in i { transform: none; }
.lines.in span:nth-child(2) i { transition-delay: .08s; }
.lines.in span:nth-child(3) i { transition-delay: .16s; }

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv, .rvi img, .rvi .veil, .lines i, .menu-nav a, .menu-figure,
  .cpanel-box, .arrow-link .ar, .contact-cta .ar {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .rvi .veil { transform: scaleX(0) !important; }
  .scroll-cue .dot { animation: none !important; }
}

/* ===================================================
   Tablet
=================================================== */
@media (max-width: 1024px) {
  .proj-head-row { grid-template-columns: 1fr; gap: 10px; }
  .proj-strip > figure:nth-child(2) { margin-block-start: 0; }
  .work-main { grid-column: 1 / 8; }
  .work-side { grid-column: 8 / 13; }
  .menu-body { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); }
  .proc-row { grid-template-columns: 52px minmax(0, 0.34fr) minmax(0, 1fr) minmax(0, 104px); }
}

/* ===================================================
   Mobile — recomposed, not scaled
=================================================== */
@media (max-width: 780px) {
  :root { --header-h: 64px; }

  .hero {
    min-height: auto;
    padding: calc(var(--header-h) + 20px) 0 34px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .hero-grid { grid-template-rows: auto auto auto; }
  /* Image leads on mobile, then the Persian statement */
  .hero-figure {
    grid-row: 1;
    margin-inline: calc(var(--pad) * -1);
    aspect-ratio: 5 / 4;
    min-height: 0;
  }
  .hero-figure .tag { display: none; }
  .hero-copy { grid-row: 2; display: block; }
  .hero-foot { grid-row: 3; }
  .hero-meta { margin-block-end: 22px; }
  .hero-foot { margin-block-start: 26px; }

  .sec { padding-block: 58px; }

  .proj + .proj { margin-block-start: 40px; padding-block-start: 34px; }
  .proj-head-row { gap: 8px; }
  .proj-meta { margin-block-start: 14px; }
  .proj-note { margin-block-start: 14px; padding-block-start: 12px; }
  /* 16/9 rather than 4/3: the plate is a whole-page screenshot, and a
     squarer box would crop away one of its two columns */
  .proj-plate .shot { aspect-ratio: 16 / 9; }
  /* one frame per row keeps the Persian captions legible */
  .proj-strip { grid-template-columns: 1fr; gap: 18px; margin-block-start: 12px; }
  .proj-strip figcaption { margin-block-start: 10px; }
  .proj-ctas { margin-block-start: 22px; }
  .work-top { margin-block-end: 26px; }
  .work-visual { grid-template-columns: 1fr; gap: 12px; }
  .work-main, .work-side { grid-column: 1; }
  .work-side {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .work-main .shot { aspect-ratio: 4 / 3; }
  .work-phone .shot { aspect-ratio: 9 / 16; }
  .work-detail .ph { aspect-ratio: 9 / 16; }
  .work-ctas { margin-block-start: 26px; padding-block-start: 20px; gap: 12px 24px; }

  .svc-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-block: 24px;
  }
  .svc-body { grid-template-columns: 1fr; gap: 16px; }
  .svc-body p { max-width: none; }
  .svc-row:nth-child(1) .svc-fig { max-width: 190px; }
  .svc-row:nth-child(2) .svc-fig { max-width: 120px; }
  .svc-row:nth-child(3) .svc-fig { max-width: 132px; }
  .svc-row .svc-body { grid-template-columns: 1fr !important; }

  .studio-grid { grid-template-columns: 1fr; gap: 30px; }
  .studio-fig .ph { aspect-ratio: 4 / 3; }
  .studio-fig .ph.b { inset-block-end: -20px; inset-inline-start: -14px; width: 40%; }
  .studio-copy .d2, .studio-copy .body-lg { max-width: none; }

  .proc-row {
    grid-template-columns: 34px 1fr;
    gap: 6px 14px;
    padding-block: 20px;
  }
  .proc-t { grid-column: 2; }
  .proc-d { grid-column: 2; max-width: none; }
  .proc-fig { display: none; }

  .contact-title { max-width: none; }
  .contact-cta { width: 100%; justify-content: center; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { max-width: none; }

  .menu-body { grid-template-columns: 1fr; align-content: center; }
  .menu-figure { display: none; }
  .menu-nav a { font-size: clamp(1.7rem, 8.5vw, 2.4rem); }

  /* Touch targets: text links render ~18-22px tall; expand the hit area
     without changing the typography. */
  .logo, .menu-trigger, .menu-close, .scroll-cue, .arrow-link,
  .footer-col a, .menu-nav a { position: relative; }
  .logo::after, .menu-trigger::after, .menu-close::after,
  .scroll-cue::after, .arrow-link::after, .footer-col a::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    inset-block-start: 50%;
    height: 44px;
    transform: translateY(-50%);
  }
  .footer-col li + li { margin-block-start: 16px; }
  .work-ctas .arrow-link { width: 100%; }
}

/* ---------------------------------------------------
   Utilities replacing former inline style attributes,
   so the CSP needs no 'unsafe-inline' for styles.
   Values are identical to what they replace.
--------------------------------------------------- */
.ph-fill { position: absolute; inset: 0; }
.contact-lead { margin-block-end: 14px; }
.lbl-teal { color: var(--teal-lt); }
.cs-admin-intro { margin-block-start: 14px; }

/* ---------------------------------------------------
   404
--------------------------------------------------- */
.nf {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
  padding: calc(var(--header-h) + 32px) var(--pad) 48px;
  overflow-x: clip;
}
.nf-fig { position: relative; aspect-ratio: 4 / 5; }
.nf-fig .ph { position: absolute; inset: 0; }
.nf-code {
  font-family: var(--mono); direction: ltr; unicode-bidi: isolate;
  font-size: .7rem; letter-spacing: .2em; color: var(--copper-lt);
}
.nf h1 {
  font-size: clamp(1.9rem, 3vw + .9rem, 3.2rem);
  line-height: 1.4; font-weight: 600;
  margin-block: 18px 16px;
}
.nf-lead { max-width: 40ch; }
.nf-back { margin-block-start: 30px; }
@media (max-width: 780px) {
  .nf {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-block: calc(var(--header-h) + 26px) 44px;
  }
  .nf-fig { order: -1; aspect-ratio: 5 / 4; margin-inline: calc(var(--pad) * -1); }
}
