/* Mashhad Studio public site. Palette: darkroom black, brass, ivory. */
:root {
  --ink: #0E0D0B;
  --ink-2: #151311;
  --ink-3: #1E1B17;
  --line: #2E2A25;
  --brass: #C8A46A;
  --brass-hi: #D6B67F;
  --ivory: #F2EDE4;
  --soft: #CFC8BC;
  --muted: #9A9388;
  --rec: #D1453B;
  --display: "Noto Kufi Arabic", "Segoe UI", Tahoma, sans-serif;
  --body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --latin: "Cormorant Garamond", Georgia, serif;
  --gutter: clamp(20px, 5.5vw, 80px);
  --section: clamp(72px, 10vw, 140px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font: 400 17px/1.75 var(--body);
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brass); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.latin { font-family: var(--latin); }
.accent { color: var(--brass); }
.dim { color: #8C857A; }
.skip {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 50;
  padding: 10px 16px; background: var(--brass); color: var(--ink); border-radius: 999px;
}
.skip:focus { top: 16px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  font: 500 16px/1 var(--body); white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--brass); color: var(--ink); border: 1px solid var(--brass); }
.btn-primary:hover { background: var(--brass-hi); color: var(--ink); }
.btn-outline { border: 1px solid rgba(242, 237, 228, .45); color: var(--ivory); }
.btn-outline:hover { border-color: var(--brass); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn-lg { min-height: 60px; font-size: 17px; }
.btn.center { align-self: center; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ----------------------------------------------------------------- header */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 96px; padding: 0 var(--gutter);
  border-bottom: 1px solid rgba(242, 237, 228, .12);
}
.brand { display: flex; flex-direction: column; gap: 4px; line-height: 1; }
.brand-ar { font: 600 26px/1 var(--display); }
.brand-ar.big { font-size: clamp(34px, 4vw, 44px); }
.brand-en { font: 400 12px/1 var(--latin); letter-spacing: .42em; }
.site-nav { display: flex; gap: clamp(20px, 3vw, 44px); font-size: 16px; }
.site-nav a[aria-current="page"] { color: var(--brass); }
.header-end { display: flex; align-items: center; gap: 24px; }
.rec { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--soft); }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); animation: rec 2s steps(1) infinite; }
.rec-label { font: 400 13px var(--latin); letter-spacing: .2em; }
.clock { font-family: var(--latin); font-size: 17px; letter-spacing: .06em; }
@keyframes rec { 50% { opacity: .25; } }

/* ------------------------------------------------------------------- hero */
.hero { display: flex; flex-direction: column; gap: clamp(40px, 6vw, 72px); padding: clamp(32px, 5vw, 56px) 0 48px; }
.viewfinder {
  position: relative; margin: 0 var(--gutter);
  padding: clamp(28px, 4vw, 48px) clamp(20px, 4vw, 56px);
  display: flex; flex-direction: column; gap: 28px;
}
.corner { position: absolute; width: 28px; height: 28px; border: 0 solid var(--brass); }
.corner.tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.corner.tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.corner.br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.corner.bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.vf-top, .vf-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.vf-bottom { align-items: flex-end; }
.eyebrow { font-size: 16px; color: var(--brass); }
.slate { font-size: 14px; letter-spacing: .32em; color: var(--muted); }
.tagline { font-size: 15px; letter-spacing: .4em; color: var(--soft); }
.hero h1 { font: 600 clamp(44px, 7.4vw, 96px)/1.3 var(--display); }

.filmstrip { overflow: hidden; }
.filmstrip-track { display: flex; gap: 20px; width: max-content; animation: drift 80s linear infinite; }
.filmstrip:hover .filmstrip-track { animation-play-state: paused; }
.frame { width: clamp(150px, 16vw, 224px); aspect-ratio: 4 / 5; flex-shrink: 0; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ---------------------------------------------------------------- pictures */
.pic { position: relative; display: block; overflow: hidden; background: var(--ink-3); border-radius: 2px; }
.pic .lqip, .pic picture, .pic picture img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.pic .lqip { filter: blur(14px); transform: scale(1.1); }

/* ---------------------------------------------------------------- clients */
.clients {
  display: flex; align-items: center; gap: 40px; min-height: 112px; padding-inline-start: var(--gutter);
  border-block: 1px solid #2A2621; overflow: hidden;
}
.clients-label { flex-shrink: 0; font-size: 14px; color: var(--muted); }
.marquee { overflow: hidden; flex: 1; }
.marquee-track {
  display: flex; gap: 56px; width: max-content; white-space: nowrap;
  font: 400 24px var(--display); color: var(--soft); animation: drift 40s linear infinite;
}
.marquee-track .sep { color: var(--brass); }

/* --------------------------------------------------------------- sections */
.section-label { font: 500 18px/1.4 var(--display); color: var(--brass); }

.statement {
  display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 48px;
  padding: var(--section) var(--gutter);
}
.statement p { font: 400 clamp(26px, 3.2vw, 44px)/1.8 var(--display); max-width: 30ch; }

.pillars { display: flex; flex-direction: column; padding: 0 var(--gutter) var(--section); }
.pillars .section-label { padding-bottom: 32px; }
.pillar {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); grid-template-areas: "name desc" "en desc";
  align-items: center; column-gap: 40px; row-gap: 4px; padding: 40px 0; border-top: 1px solid var(--line);
}
.pillar:last-child { border-bottom: 1px solid var(--line); }
.pillar-name { grid-area: name; font: 600 clamp(40px, 5.6vw, 66px)/1.2 var(--display); transition: color .25s ease; }
.pillar-en { grid-area: en; font-size: 14px; letter-spacing: .4em; color: var(--brass); }
.pillar-desc { grid-area: desc; color: var(--soft); }
.pillar:hover { color: var(--ivory); }
.pillar:hover .pillar-name { color: var(--brass); }

/* ------------------------------------------------------------------ works */
.works { display: flex; flex-direction: column; gap: 40px; padding: var(--section) var(--gutter); background: var(--ink-2); }
.works-head { display: flex; justify-content: space-between; align-items: flex-end; }
.works-head h2 { font: 600 clamp(40px, 5vw, 64px)/1.2 var(--display); }
.count { font-size: 22px; color: var(--brass); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px;
  border: 1px solid #3A352F; border-radius: 999px; font-size: 15px;
}
.pill[aria-current="true"] { background: var(--brass); border-color: var(--brass); color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; }
.card { display: flex; flex-direction: column; gap: 14px; }
.card-media { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; background: var(--ink-3); }
.card-media .pic { width: 100%; height: 100%; }
.card-media video { width: 100%; height: 100%; object-fit: cover; }
.card-media .pic picture img { transition: transform .8s ease; }
.card:hover .pic picture img { transform: scale(1.04); }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-meta h3 { font: 500 19px/1.5 var(--display); }
.card-cat { flex-shrink: 0; font-size: 14px; color: var(--muted); }
.card-caption { font-size: 15px; line-height: 1.8; color: var(--soft); }
.empty { padding: 24px; border: 1px dashed var(--line); border-radius: 4px; color: var(--soft); }

/* ---------------------------------------------------------------- process */
.process { display: flex; flex-direction: column; gap: 48px; padding: var(--section) var(--gutter); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.steps.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.steps li { display: flex; flex-direction: column; gap: 12px; padding-top: 26px; border-top: 1px solid var(--line); }
.steps li:first-child { border-top-color: var(--brass); }
.step-n { font-size: 20px; color: var(--muted); }
.steps h3 { font: 500 clamp(22px, 2.2vw, 30px)/1.4 var(--display); }
.steps p { font-size: 16px; color: var(--soft); }

/* -------------------------------------------------------------------- CTA */
.cta {
  display: flex; justify-content: space-between; align-items: center; gap: 48px; flex-wrap: wrap;
  margin: 0 var(--gutter); padding: clamp(48px, 7vw, 96px) clamp(24px, 6vw, 80px);
  background: var(--ink-3); border: 1px solid var(--line); border-radius: 4px;
}
.cta h2 { font: 600 clamp(32px, 4.2vw, 58px)/1.4 var(--display); }
.cta p { margin-top: 16px; color: var(--soft); }
.cta-actions { display: flex; flex-direction: column; gap: 14px; min-width: min(360px, 100%); }

/* ------------------------------------------------------------- split hero */
.split-hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px);
  align-items: center; padding: clamp(40px, 6vw, 80px) var(--gutter);
}
.split-text { display: flex; flex-direction: column; gap: 28px; }
.split-text .eyebrow { font-size: 14px; letter-spacing: .4em; }
.split-text h1 { font: 600 clamp(48px, 7vw, 96px)/1.25 var(--display); }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.9; color: var(--soft); max-width: 36em; }
.split-media { aspect-ratio: 4 / 5; max-height: 640px; width: 100%; }

.reel { display: flex; flex-direction: column; gap: 28px; padding: var(--section) var(--gutter) 0; }
.reel h2 { font: 500 clamp(28px, 3vw, 44px)/1.3 var(--display); }
.reel video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 2px; }

.services { display: flex; flex-direction: column; gap: 40px; padding: var(--section) var(--gutter); }
.service-grid { display: grid; border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
.service-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.service-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.service-grid li {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; min-height: 240px;
  padding: clamp(28px, 3vw, 44px); border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background-color .3s ease;
}
.service-grid li:hover { background: var(--ink-3); }
.service-grid h3 { font: 500 clamp(24px, 2.2vw, 32px)/1.35 var(--display); }
.service-grid p { color: var(--soft); }

.formats {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 64px; align-items: center;
  padding: var(--section) var(--gutter); background: var(--ink-2);
}
.formats h2 { font: 600 clamp(36px, 4vw, 48px)/1.35 var(--display); margin-bottom: 18px; }
.ratio-list { display: flex; align-items: flex-end; justify-content: center; gap: clamp(16px, 3vw, 40px); flex-wrap: wrap; }
.ratio-list li { display: flex; flex-direction: column; align-items: center; gap: 14px; font-size: 15px; color: var(--soft); }
.ratio { display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; font-size: 28px; color: var(--ivory); }
.r-9-16 { width: 136px; aspect-ratio: 9 / 16; border-color: var(--brass); color: var(--brass); }
.r-1-1 { width: 170px; aspect-ratio: 1; }
.r-16-9 { width: 250px; aspect-ratio: 16 / 9; }

.case { display: flex; flex-direction: column; gap: 32px; padding: var(--section) var(--gutter); background: var(--ink-2); }
.case h2 { font: 600 clamp(36px, 4.4vw, 56px)/1.3 var(--display); }
.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.case-grid div { padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.case-grid h3 { font: 500 22px var(--display); }
.case-grid p { color: var(--soft); }
.case-gallery { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 20px; }
.case-gallery .pic { aspect-ratio: 4 / 5; height: 100%; }
.case-gallery li:first-child .pic { aspect-ratio: auto; }

.notfound { padding: var(--section) 0; }
.notfound h1 { font: 600 clamp(36px, 5vw, 64px)/1.3 var(--display); }

/* ----------------------------------------------------------------- footer */
.site-footer { display: flex; flex-direction: column; gap: 56px; padding: var(--section) var(--gutter) 48px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer-brand, .footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-brand p { color: var(--muted); font-size: 15px; }
.footer-label { font-size: 13px; color: var(--muted); }
.footer-col .latin { font-size: 18px; text-align: right; }
.clock.big { font-size: 34px; line-height: 1; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 26px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted);
}

.wa-float {
  position: fixed; left: max(20px, env(safe-area-inset-left)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 22px;
  background: var(--brass); color: var(--ink); border-radius: 999px; font-weight: 500;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
}
.wa-float:hover { background: var(--brass-hi); color: var(--ink); }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1024px) {
  .rec { display: none; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .statement { grid-template-columns: 1fr; gap: 20px; }
  .pillar { grid-template-columns: 1fr; grid-template-areas: "name" "en" "desc"; row-gap: 10px; }
  .split-hero, .formats { grid-template-columns: 1fr; }
  .split-media { max-height: 520px; }
  .steps, .steps.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .site-header { flex-wrap: wrap; min-height: 0; padding-block: 18px; row-gap: 14px; }
  .site-nav { order: 3; width: 100%; justify-content: space-between; }
  .header-end .btn { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .card-meta { flex-direction: column; gap: 2px; }
  .steps, .steps.cols-3, .steps.cols-5, .case-grid, .service-grid.cols-2, .service-grid.cols-3 { grid-template-columns: 1fr; }
  .service-grid li { min-height: 0; }
  .case-gallery { grid-template-columns: 1fr 1fr; }
  .case-gallery li:first-child { grid-column: 1 / -1; }
  .case-gallery li:first-child .pic { aspect-ratio: 4 / 3; }
  .footer-grid { grid-template-columns: 1fr; }
  .tagline { display: none; }
  .wa-float span { display: none; }
  .wa-float { padding: 0; width: 56px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
