/* v3 — design-benchmark pass. Centered declarative hero, self-drawing
   arch as hero-to-content transition, service strip, people trust strip.
   Extends v1 night-works tokens; no palette overrides. */

.hero-v3{align-items:center}
.hero-v3 .wrap{text-align:center}
.hero-v3 .eyebrow{justify-content:center}
.hero-v3 h1{max-width:none;margin-inline:auto}
.hero-v3 .hero-ctas{justify-content:center}

/* self-drawing arch — signature transition between hero and content */
.arch-band{background:var(--asphalt);overflow:hidden;padding-block:14px 0}
.arch{position:relative}
.arch svg{width:100%;height:auto;max-height:110px;display:block;margin-inline:auto}
.arch .draw{stroke-dasharray:2400;stroke-dashoffset:2400;animation:arch-draw 2.6s ease-out .2s forwards}
.arch .draw2{stroke-dasharray:1600;stroke-dashoffset:1600;animation:arch-draw 2.2s ease-out .9s forwards}
@keyframes arch-draw{to{stroke-dashoffset:0}}
@media(prefers-reduced-motion:reduce){.arch .draw,.arch .draw2{animation:none;stroke-dashoffset:0}}

/* service strip */
.svc-strip{border-block:1px solid var(--line-soft);background:color-mix(in srgb,var(--concrete) 45%,transparent)}
.svc-strip-inner{display:flex;justify-content:center;gap:52px;padding-block:24px;flex-wrap:wrap}
.svc-item{display:flex;align-items:center;gap:12px;font-weight:700;font-size:1rem}
.svc-item svg{width:30px;height:30px;stroke:var(--amber);flex-shrink:0}

/* people / trust strip — illustrated glyph avatars (role icon in a tinted
   ring), not photographs: see people_strip() above for why. */
.person-card{padding:30px 24px;text-align:center}
.person-card .avatar{width:64px;height:64px;margin:0 auto 16px;display:block}
.person-card h3{font-size:1rem;font-weight:700}
.person-card .role{font-size:.8rem;color:var(--amber);font-weight:500;margin-top:3px}
.person-card .quote{font-size:.88rem;color:var(--rebar);font-weight:300;margin-top:14px}

/* hero background video + scroll parallax (JS-driven translateY, assets/v3.js).
   v1's photo-hero overlay (up to 82% opaque) + saturate(.9) was designed for a
   graded still photo; stacked on video it read dark/flat ("non-energic" —
   2026-09-01 feedback). v3 pulls the full-bleed overlay back so the video's
   own brightness/motion carries the hero, boosts its vibrance, and moves
   legibility onto a small frosted panel behind the text instead of a dark
   wash over the whole frame. */
.hero-v3 .bg{inset:-8% 0;will-change:transform;filter:none}
.hero-v3 .bg video{width:100%;height:100%;object-fit:cover;display:block;
  filter:saturate(1.35) contrast(1.1) brightness(1.12)}
.hero-v3::after{
  background:linear-gradient(180deg,rgba(18,21,28,.4) 0%,rgba(18,21,28,.12) 35%,rgba(18,21,28,.55) 100%)}
.hero-v3 .wrap{background:color-mix(in srgb,var(--asphalt) 58%,transparent);
  backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  border-radius:22px;padding:44px clamp(24px,5vw,64px);max-width:840px;margin-inline:auto}
.hero-v3 h1,.hero-v3 .deck{text-shadow:0 2px 16px rgba(0,0,0,.35)}

/* project-gallery section: parallax backdrop layer, independent of card hover
   states so the two effects never fight over the same element's transform.
   2026-09-01: grid was too faint + cards too static to read as "energic" —
   stronger grid, a drifting amber glow, warmer hover feedback, slight image
   pop. Still zero-dependency (CSS only). */
.gallery-pfx{position:relative;overflow:hidden}
.gallery-pfx .pfx-bg{position:absolute;inset:-12% -6%;z-index:0;pointer-events:none;
  will-change:transform;opacity:.85;
  background-image:repeating-linear-gradient(115deg,
      color-mix(in srgb,var(--amber) 22%,transparent) 0 2px, transparent 2px 68px),
    repeating-linear-gradient(25deg,
      color-mix(in srgb,var(--amber) 10%,transparent) 0 1px, transparent 1px 84px)}
.gallery-pfx .pfx-glow{position:absolute;z-index:0;pointer-events:none;
  width:52vw;height:52vw;max-width:640px;max-height:640px;top:-14%;inset-inline-end:-14%;
  background:radial-gradient(circle,color-mix(in srgb,var(--amber) 30%,transparent) 0%,transparent 68%);
  filter:blur(6px);opacity:.55}
.gallery-pfx .wrap{position:relative;z-index:1}
.gallery-pfx .card-img img{filter:saturate(1.12) contrast(1.04)}
.gallery-pfx .card:hover{box-shadow:0 20px 44px -14px color-mix(in srgb,var(--amber) 40%,transparent);
  border-color:var(--amber)}

/* 3D tilt-on-hover (desktop pointer only — see assets/v3.js), subtle depth,
   no WebGL/3D-engine dependency */
.svc-item{transition:transform .15s ease-out}
.gallery-pfx .card{transition:transform .15s ease-out,border-color .2s}

@media(prefers-reduced-motion:reduce){
  .hero-v3 .bg,.gallery-pfx .pfx-bg,.svc-item,.gallery-pfx .card{transition:none}
}

/* nav services-dropdown (compact single column, v3 only) —
   2026-09-02: a full 2-column mega-menu with a video panel (Atomicdust's
   pattern) was scaled down since rahgar's 3 disciplines don't fill it;
   this is CSS-only (:hover/:focus-within), no JS, no extra dependency. */
/* .nav-item wraps the "خدمات" link so its dropdown can anchor to it; without
   display:flex the inner <a> stays inline (only direct flex children of
   .nav-links get auto-blockified), so it rendered off-baseline from its
   plain-<a> siblings — 2026-09-02 QA (issue #2, item 1). */
.nav-item{position:relative;display:flex;align-items:center}
.nav-drop{position:absolute;top:100%;inset-inline-start:0;min-width:290px;margin-top:6px;
  background:var(--concrete);border:1px solid var(--line-soft);border-radius:12px;padding:8px;
  box-shadow:0 24px 48px -16px rgba(0,0,0,.55);
  opacity:0;visibility:hidden;transform:translateY(-6px);
  transition:opacity .16s ease,transform .16s ease,visibility .16s;z-index:60}
.nav-item:hover .nav-drop,.nav-item:focus-within .nav-drop{opacity:1;visibility:visible;transform:translateY(0)}
.nav-drop-item{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:8px;
  color:inherit;text-decoration:none}
.nav-drop-item:hover{background:color-mix(in srgb,var(--amber) 14%,transparent)}
.nav-drop-item svg{width:26px;height:26px;stroke:var(--amber);flex-shrink:0}
.nav-drop-item b{display:block;font-size:.92rem;font-weight:700}
.nav-drop-item small{display:block;color:var(--rebar);font-weight:300;font-size:.78rem;margin-top:2px}

/* letter-by-letter nav hover (v3 only; issue #2 item 5, Atomicdust Tier 1).
   assets/v3.js splits each top-level label into inline .ch spans with a
   per-letter --i. On hover the colour + amber glow ripple through the word
   from its first letter (= the RIGHT edge under dir="rtl", so the ripple
   reads in writing direction). Spans are inline, never inline-block:
   Persian letters must keep joining across the span boundaries. Leave is
   instant (no delay) so the word snaps back instead of draining slowly.
   Class is .chars, NOT .split — site.css already owns .split (a 2-col grid
   utility) and the first cut of this collided with it, exploding the nav. */
.nav-links a.chars{transition:none}
.nav-links a.chars .ch{transition:color .16s ease,text-shadow .16s ease;transition-delay:0s}
.nav-links a.chars:hover .ch,.nav-links a.chars:focus-visible .ch{color:var(--chalk);
  text-shadow:0 0 10px color-mix(in srgb,var(--amber) 60%,transparent);
  transition-delay:calc(var(--i) * 32ms)}
@media(prefers-reduced-motion:reduce){
  .nav-links a.chars .ch{transition:none}
}

/* ---- inner pages (issue #8: v3 is a complete page set, not homepage-only) ----
   Page hero = the homepage hero's language on a real project PHOTO instead of
   video: same .hero-v3 frosted panel, same parallax hook (assets/v3.js reads
   .hero-v3 .bg), same self-drawing arch below. Shorter than the home hero. */
.page-hero-v3{min-height:min(60vh,600px);align-items:center;padding-block:36px}
.page-hero-v3 .bg img{width:100%;height:100%;object-fit:cover;display:block;
  filter:saturate(1.2) contrast(1.05)}
.page-hero-v3 h1{font-size:clamp(2rem,4.6vw,3.1rem)}
.page-hero-v3 .wrap{padding:36px clamp(22px,4vw,52px);max-width:780px}
.page-hero-v3 .deck{margin-inline:auto}
@media(max-width:720px){.page-hero-v3{min-height:52vh}}

/* services: one full-width row per discipline — photo | icon + copy + chips.
   Rows alternate media side so the page reads as a zig-zag, not a list. */
.svc-rows{display:grid;gap:26px}
.svc-row{display:grid;grid-template-columns:1.05fr 1fr;padding:0}
.svc-row:nth-child(even) .svc-row-media{order:1}
.svc-row-media{min-height:300px;overflow:hidden}
.svc-row-media img{width:100%;height:100%;object-fit:cover;display:block;
  filter:saturate(1.12) contrast(1.04);transition:transform .6s ease}
.svc-row:hover .svc-row-media img{transform:scale(1.03)}
.svc-row-media.is-glyph{display:flex;align-items:center;justify-content:center;
  background:radial-gradient(circle at 50% 60%,color-mix(in srgb,var(--amber) 16%,transparent),transparent 70%)}
.svc-row-body{padding:38px clamp(22px,3.5vw,44px);display:flex;flex-direction:column;justify-content:center}
.svc-row-icon{width:38px;height:38px;stroke:var(--amber);margin-bottom:14px}
.svc-row h3{font-size:1.45rem;font-weight:800;margin-bottom:10px}
.svc-row .deck{max-width:none;margin-top:0}
.chips{list-style:none;display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}
.chips li{font-size:.8rem;font-weight:500;color:var(--chalk);padding:5px 12px;border-radius:999px;
  border:1px solid var(--line-soft);background:color-mix(in srgb,var(--amber) 10%,transparent)}
@media(max-width:900px){
  .svc-row{grid-template-columns:1fr}
  .svc-row:nth-child(even) .svc-row-media{order:0}
  .svc-row-media{min-height:220px}
}

/* gallery + projects on the parallax-grid backdrop */
.gallery-pfx .gal a{transition:border-color .2s,box-shadow .2s}
.gallery-pfx .gal a:hover{border-color:var(--amber);
  box-shadow:0 20px 44px -14px color-mix(in srgb,var(--amber) 40%,transparent)}

/* ---- projects: pinned map set-piece (issue #14) ---- */
.map-story-stage{position:relative;min-height:100vh;display:flex;align-items:center;
  background:var(--asphalt);border-bottom:1px solid var(--line-soft);overflow:hidden}
.map-story-inner{width:100%;display:grid;grid-template-columns:1fr 1.15fr;gap:48px;align-items:center;padding-block:48px}
.map-svg{width:100%;max-width:640px;height:auto;max-height:78vh;display:block;margin-inline:auto}
.map-fill{fill:url(#dots);color:var(--rebar);opacity:.55}
.map-fill circle,#dots circle{fill:var(--rebar)}
.map-outline{fill:none;stroke:color-mix(in srgb,var(--rebar) 55%,transparent);stroke-width:.5;
  stroke-linejoin:round}
.pin-dot{fill:var(--amber)}
.pin-ring{fill:none;stroke:var(--amber);stroke-width:.6;opacity:.55}
.pin{transform-box:fill-box;transform-origin:center}
.map-counts{display:flex;gap:34px;margin-block:8px 26px}
.map-counts b{display:block;font-size:clamp(2.4rem,5vw,3.6rem);font-weight:800;color:var(--amber);
  line-height:1.2;font-variant-numeric:tabular-nums}
.map-counts span{font-size:.9rem;color:var(--rebar);font-weight:300}
.map-names{position:relative;list-style:none;display:grid;gap:4px;max-height:44vh;overflow:hidden;
  mask-image:linear-gradient(180deg,#000 70%,transparent)}
.map-names li{font-size:.95rem;font-weight:500;color:var(--rebar);padding:5px 0 5px 14px;
  border-inline-start:2px solid transparent;transition:color .2s,border-color .2s,opacity .2s;opacity:.55}
.map-names li span{display:block;font-size:.75rem;font-weight:300;opacity:.8}
.map-names li.is-on{color:var(--chalk);border-inline-start-color:var(--amber);opacity:1}
.map-names li.is-done{opacity:.8}
@media(max-width:899px){
  .map-story-stage{min-height:auto}
  .map-story-inner{grid-template-columns:1fr;gap:26px;padding-block:36px}
  .map-svg{max-height:52vh}
  .map-names{display:none}
}
@media(prefers-reduced-motion:reduce){.map-names{display:none}}

/* ---- services: pinned chapters set-piece (issue #14) ---- */
.svc-story-stage{position:relative;height:100vh;overflow:hidden;background:var(--asphalt)}
.chapter{position:absolute;inset:0;opacity:0}
.chapter:first-child{opacity:1}
.ch-media{position:absolute;inset:0;will-change:transform}
.ch-media img{width:100%;height:100%;object-fit:cover;display:block;filter:saturate(1.1) brightness(.5)}
.ch-media.is-glyph{display:flex;align-items:center;justify-content:center;
  background:radial-gradient(circle at 50% 55%,color-mix(in srgb,var(--amber) 18%,transparent),transparent 65%)}
.ch-media.is-glyph svg{opacity:.35;width:40%!important}
.ch-line{position:absolute;inset:0;width:100%;height:100%;opacity:.95;pointer-events:none}
.ch-line path{stroke:var(--amber);stroke-width:2.2;fill:none;stroke-linecap:round;stroke-linejoin:round;
  filter:drop-shadow(0 0 6px color-mix(in srgb,var(--amber) 55%,transparent))}
.ch-copy{position:absolute;inset-inline-start:clamp(24px,6vw,80px);bottom:clamp(40px,10vh,110px);
  max-width:540px;background:color-mix(in srgb,var(--asphalt) 62%,transparent);
  backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  border:1px solid var(--line-soft);border-radius:20px;padding:30px clamp(22px,3vw,40px)}
.ch-copy .eyebrow{margin-bottom:8px}
.ch-copy h3{font-size:clamp(1.8rem,3.6vw,2.8rem);font-weight:800;line-height:1.3;margin-bottom:10px}
.ch-copy .deck{margin-top:0;max-width:none;font-size:1rem}
.ch-copy .chips{margin-top:16px}
.ch-progress{position:absolute;bottom:28px;inset-inline-end:clamp(24px,6vw,80px);display:flex;gap:8px;z-index:2}
.ch-progress i{display:block;width:46px;height:3px;border-radius:2px;background:var(--line-soft);overflow:hidden}
.ch-progress i::after{content:"";display:block;height:100%;background:var(--amber);
  transform:scaleX(var(--p,0));transform-origin:inline-start}
@media(max-width:899px),(prefers-reduced-motion:reduce){.svc-story{display:none}}

/* ---- gallery: scroll-jacked strip + mixed-size grid (issue #14) ---- */
.gal-story-stage{position:relative;height:100vh;display:flex;flex-direction:column;justify-content:center;
  gap:26px;overflow:hidden;background:var(--asphalt);border-bottom:1px solid var(--line-soft)}
.gal-story-head{padding-inline:clamp(24px,6vw,80px)}
.gal-story-head .eyebrow{margin-bottom:6px}
.gal-story-head h2{font-size:clamp(1.5rem,3vw,2.1rem);font-weight:800}
.gal-strip{overflow:hidden;padding-inline:clamp(24px,6vw,80px)}
.gal-strip-track{display:flex;gap:18px;width:max-content;will-change:transform}
.gal-strip-track img{height:58vh;width:auto;aspect-ratio:4/3;object-fit:cover;border-radius:14px;
  border:1px solid var(--line-soft);filter:saturate(1.1)}
.gal-mix{grid-template-columns:repeat(4,1fr);grid-auto-rows:200px;grid-auto-flow:dense}
.gal-mix a:nth-child(6n+1){grid-column:span 2;grid-row:span 2}
.gal-mix a:nth-child(6n+4){grid-column:span 2}
.gal-mix img{width:100%;height:100%;aspect-ratio:auto}
@media(max-width:899px),(prefers-reduced-motion:reduce){
  .gal-story-stage{height:auto;padding-block:36px 14px}
  .gal-strip{overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;padding-bottom:6px}
  .gal-strip::-webkit-scrollbar{display:none}
  .gal-strip-track{will-change:auto}
  .gal-strip-track img{height:36vh;scroll-snap-align:start}
  .gal-mix{grid-template-columns:repeat(2,1fr);grid-auto-rows:150px}
}

/* ---- about: principle tiles + certificate fan-out (issue #14) ---- */
.principles{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.principle{background:var(--concrete);border:1px solid var(--line-soft);border-radius:12px;padding:18px 16px;
  transition-delay:calc(var(--i,0) * 140ms)}
.principle b{display:block;font-size:1.15rem;font-weight:800;color:var(--amber);margin-bottom:6px}
.principle span{font-size:.86rem;color:var(--rebar);font-weight:300;line-height:1.7}
@media(max-width:720px){.principles{grid-template-columns:1fr}}
/* certs start as a stacked deck at the grid's centre and fan out on scrub
   (assets/v3.js). Static grid when the JS doesn't run. */
.cert-story{overflow:hidden}
.cert-story .cert-card{will-change:transform;transform-origin:center}
.cert-story .cert-card.reveal{transition:none}

/* ---- contact: ambient hero + field-by-field form (issue #14) ----
   Deliberately no pin: a contact page shouldn't perform. The photo drifts
   slowly (Ken Burns on the <img>; the parallax in v3.js transforms the
   parent .bg, so the two don't fight), fields arrive one after another. */
.hero-ambient .bg img{animation:kenburns 28s ease-in-out infinite alternate;transform-origin:60% 40%}
@keyframes kenburns{from{transform:scale(1)}to{transform:scale(1.14) translate(-1.5%,1%)}}
.contact-panel .reveal{transition-delay:calc(var(--i,0) * 160ms)}
.contact-panel button.reveal{display:inline-block}
@media(prefers-reduced-motion:reduce){.hero-ambient .bg img{animation:none}}

/* FAQ (about page; also FAQPage JSON-LD). Native <details> — no JS. */
.faq-list{display:grid;gap:10px;max-width:56em}
.faq-item{background:var(--concrete);border:1px solid var(--line-soft);border-radius:12px;padding:0 20px}
.faq-item summary{list-style:none;cursor:pointer;padding:16px 0;display:flex;align-items:center;gap:14px}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::before{content:"+";color:var(--amber);font-weight:300;font-size:1.4rem;line-height:1;width:1em;flex-shrink:0;transition:transform .2s}
.faq-item[open] summary::before{transform:rotate(45deg)}
.faq-item h3{font-size:1rem;font-weight:700;margin:0}
.faq-item p{color:var(--rebar);font-weight:300;padding:0 0 18px 2.2em;line-height:1.9}
.faq-item[open]{border-color:color-mix(in srgb,var(--amber) 45%,var(--line-soft))}

/* contact: info + form sit in two panels instead of floating on the page */
.contact-panel{padding:28px clamp(18px,3vw,32px)}
.contact-panel.contact-info .row:last-child{border-bottom:none}

/* pinned mosaic + counter/filmstrip story (desktop: GSAP+ScrollTrigger pin,
   see assets/v3.js; the ONLY GSAP usage in this codebase — v1/v2 and every
   other v3 section stay zero-dependency). Photos, not video: see pin_story()
   docstring-comment above for why. */
.pin-story-stage{position:relative;height:100vh;overflow:hidden;background:var(--asphalt)}
.mosaic{position:absolute;inset:0}
.mosaic-img{position:absolute;object-fit:cover;border-radius:14px;
  box-shadow:0 30px 60px -20px rgba(0,0,0,.55)}
.mosaic-img.m0{inset:0;width:100%;height:100%;border-radius:0;opacity:1}
.mosaic-img.m1{width:34%;aspect-ratio:4/3;top:14%;inset-inline-end:8%;opacity:0}
.mosaic-img.m2{width:29%;aspect-ratio:4/3;bottom:13%;inset-inline-end:36%;opacity:0}
.mosaic-img.m3{width:31%;aspect-ratio:4/3;bottom:9%;inset-inline-start:6%;opacity:0}
.pin-counter{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;
  justify-content:center;opacity:0;text-align:center;padding-inline:24px}
.counter-num{font-size:clamp(4rem,13vw,8.5rem);font-weight:800;color:var(--amber);line-height:1}
.counter-lbl{font-size:1.05rem;color:var(--rebar);margin-top:10px;max-width:26em}
/* .filmstrip is the fixed clip; .filmstrip-track is what v3.js slides inside
   it (a transform on the clip itself would carry the clip along and reveal
   nothing — issue #2 item 3). Track width = content, so overflow is real. */
.filmstrip{margin-top:36px;max-width:82vw;overflow:hidden}
.filmstrip-track{display:flex;gap:14px;width:max-content;will-change:transform}
.filmstrip img{width:170px;height:114px;object-fit:cover;border-radius:8px;flex-shrink:0}

@media(max-width:899px){
  /* no pin on mobile — GSAP setup in v3.js is gated to min-width:900px, so
     this is just a static stacked layout; the counter still animates via
     the ordinary sitewide data-count/IntersectionObserver mechanism. */
  .pin-story-stage{height:auto;position:static;padding-block:40px 0}
  .mosaic{position:static;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-inline:16px}
  .mosaic-img{position:static!important;width:100%!important;height:130px!important;
    opacity:1!important;inset:auto!important;border-radius:10px}
  .mosaic-img.m0{grid-column:1/-1;height:190px!important}
  .pin-counter{position:static;opacity:1;padding:32px 16px 8px}
  .filmstrip{max-width:100%;overflow-x:auto;padding:0 16px 4px;scrollbar-width:none}
  .filmstrip::-webkit-scrollbar{display:none}
}
@media(prefers-reduced-motion:reduce){
  .mosaic-img{opacity:1!important}
  .pin-story-stage{height:auto;position:static}
  .mosaic{position:static;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-inline:16px}
  .mosaic-img{position:static!important;width:100%!important;height:130px!important;inset:auto!important}
  .pin-counter{position:static;opacity:1;padding:32px 16px 8px}
}
