/* Page layout for the Yekdast site. Tokens: tokens.css. Components: components.css. */

/* ---------- the scene: fixed globe behind the homepage ---------- */
.has-scene { background: var(--night-900); }
#globe { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; }
html:not(.js) .day { background: var(--paper); }           /* without JS the canvas paints nothing */
.site-header { transition: --t .6s cubic-bezier(.4, 0, .2, 1); }
main { position: relative; }

/* ---------- hero (night) ---------- */
.hero { --band: min(78vh, 700px); display: grid; align-items: center; min-height: calc(100svh - 76px); padding-block: var(--s-5) var(--band); }
.hero > .container { width: 100%; }
.hero__copy { max-width: 600px; }
.hero .lead { margin-block-start: var(--s-5); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-block-start: var(--s-6); }
@media (max-width: 899px) { .hero { align-items: start; min-height: 120svh; } }
@media (min-width: 900px) { .hero { padding-block-start: clamp(56px, 13vh, 150px); } }   /* room between the header and the headline on desktop */

/* ---------- day sections ---------- */
.section--first { padding-block-start: var(--s-5); }
.day { padding-block-end: var(--section); }
.grid { margin: 0; padding: 0; list-style: none; }

/* children arrive one after another */
.js .cascade.reveal { opacity: 1; transform: none; }
.js .cascade.reveal > * { opacity: 0; transform: translateY(26px); transition: opacity 1.1s cubic-bezier(.16, 1, .3, 1), transform 1.1s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--k, 0) * 80ms); }
.js .cascade.reveal.is-in > * { opacity: 1; transform: none; }
.cascade > :nth-child(2) { --k: 1; } .cascade > :nth-child(3) { --k: 2; } .cascade > :nth-child(4) { --k: 3; } .cascade > :nth-child(5) { --k: 4; } .cascade > :nth-child(6) { --k: 5; } .cascade > :nth-child(7) { --k: 6; } .cascade > :nth-child(8) { --k: 7; } .cascade > :nth-child(9) { --k: 8; }

/* industries: quiet rows */
.rows { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid var(--line-strong); }
.rows li { border-block-end: 1px solid var(--line); }


/* client logos (placeholders until real ones arrive) */

/* ---------- contact (night again) ---------- */
.contact { --band: min(78vh, 700px); padding-block: calc(var(--band) + var(--s-7)) var(--section); }
.contact__in { display: grid; gap: var(--s-7); align-items: start; }
.contact__copy { display: grid; gap: var(--s-4); }
.contact__form { padding: clamp(20px, 3vw, 36px); height: auto; }
@media (min-width: 1000px) { .contact__in { grid-template-columns: 5fr 6fr; gap: var(--s-8); } }

/* ---------- footer on the scene ---------- */
.has-scene .site-footer { margin-block-start: 0; background: color-mix(in oklab, var(--night-900), transparent 12%); }
.site-footer__legal { display: inline-flex; gap: var(--s-4); }

.not-found { display: grid; gap: var(--s-5); padding-block: var(--section); }
@media (prefers-reduced-motion: reduce) { .js .cascade.reveal > * { opacity: 1; transform: none; } }

/* The hero enters with a CSS animation, not a scroll observer: content above the fold must never wait on JS. */
@keyframes enter { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.enter { animation: enter 1.1s cubic-bezier(.16, 1, .3, 1) both; }
.enter:nth-child(2) { animation-delay: 90ms; } .enter:nth-child(3) { animation-delay: 180ms; } .enter:nth-child(4) { animation-delay: 270ms; } .enter:nth-child(5) { animation-delay: 360ms; }
@media (prefers-reduced-motion: reduce) { .enter { animation: none; } }

/* headline enters word by word */
@keyframes word { from { opacity: 0; transform: translateY(.45em); } to { opacity: 1; transform: none; } }
.words .w { display: inline-block; animation: word .95s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--w) * 75ms + 120ms); }

/* reading progress */
.scroll-progress { position: fixed; z-index: 40; inset-block-start: 0; inset-inline: 0; height: 2px; background: linear-gradient(90deg, var(--teal-400), var(--gold-300)); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; pointer-events: none; }
:dir(rtl) .scroll-progress { background: linear-gradient(270deg, var(--teal-400), var(--gold-300)); transform-origin: 100% 50%; }

/* the main button leans toward the pointer (offsets set by site.js) */
.btn.is-magnetic { transform: translate(var(--mx, 0px), var(--my, 0px)); }
.btn.is-magnetic:hover { transform: translate(var(--mx, 0px), calc(var(--my, 0px) - 2px)); }

@media (prefers-reduced-motion: reduce) { .words .w { animation: none; } .scroll-progress { display: none; } .btn.is-magnetic, .btn.is-magnetic:hover { transform: none; } }

/* ---------- grab-the-globe cursor ---------- */
.globe-cursor { position: fixed; z-index: 30; inset-block-start: 0; left: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; display: grid; place-items: center; border: 1px solid rgba(241, 244, 246, .55); border-radius: 50%; color: #f1f4f6; font: var(--fw-strong) .6875rem/1 var(--font); letter-spacing: .04em; pointer-events: none; opacity: 0; scale: .5; transition: opacity .35s, scale .5s var(--ease), background-color .35s; }
:lang(fa) .globe-cursor { letter-spacing: 0; font-size: var(--fs-2xs); }
.globe-hover .globe-cursor { opacity: 1; scale: 1; }
.globe-drag .globe-cursor { scale: .72; background: rgba(55, 200, 184, .22); border-color: var(--teal-300); }
.globe-cursor span { width: 8px; height: 8px; border-radius: 50%; background: #f1f4f6; transition: scale .5s var(--ease), background-color .35s; }
.globe-drag .globe-cursor span { scale: 1.6; background: var(--teal-300); }
html.globe-hover, html.globe-hover main { cursor: none; }
html.globe-drag, html.globe-drag * { cursor: none !important; user-select: none; }

/* ---------- light under the pointer on cards ---------- */
a.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(260px circle at var(--sx, 50%) var(--sy, 50%), color-mix(in oklab, var(--accent), transparent 84%), transparent 70%); opacity: 0; transition: opacity .6s; pointer-events: none; }
a.card:hover::after { opacity: 1; }

/* ---------- soft cross-fade when moving between pages and languages ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .35s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in .6s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* ---------- city clocks ---------- */

/* ---------- menu button and full-screen mobile menu ---------- */
.menu-btn__bars, .menu-btn__bars::before { display: block; width: 18px; height: 1.6px; background: currentColor; border-radius: 2px; transition: transform .5s var(--ease); }
.menu-btn__bars { transform: translateY(-3.5px); }
.menu-btn__bars::before { content: ""; transform: translateY(7px); }
.menu-btn[aria-expanded="true"] .menu-btn__bars { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: rotate(-90deg); }
.nav__foot { display: none; }
@media (max-width: 1039px) {
  .nav { display: flex; flex-direction: column; position: absolute; inset-inline: 0; inset-block-start: 100%; height: calc(100dvh - 76px); padding: var(--s-5) var(--gutter) var(--s-6); background: var(--bg); overflow-y: auto; visibility: hidden; opacity: 0; transition: opacity .45s, visibility 0s .45s; }
  .nav.is-open { display: flex; inset-inline: 0; inset-block-start: 100%; padding: var(--s-5) var(--gutter) var(--s-6); border: 0; border-radius: 0; box-shadow: none; visibility: visible; opacity: 1; transition: opacity .45s; }
  .nav ul, .nav.is-open ul { flex-direction: column; gap: 0; }
  .nav a, .nav.is-open a { display: block; padding-block: 16px; font: var(--fw-display) clamp(1.6rem, 6.4vw, 2.2rem)/1.25 var(--font-display); letter-spacing: var(--ls-heading); color: var(--ink); border-block-end: 1px solid var(--line); }
  :lang(fa) .nav a { line-height: 1.6; }
  .nav li, .nav__foot { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .nav.is-open li, .nav.is-open .nav__foot { opacity: 1; transform: none; transition-delay: calc(var(--k, 0) * 60ms + 120ms); }
  .nav li:nth-child(2) { --k: 1; } .nav li:nth-child(3) { --k: 2; } .nav li:nth-child(4) { --k: 3; } .nav li:nth-child(5) { --k: 4; } .nav li:nth-child(6) { --k: 5; }
  .nav__foot { --k: 6; display: grid; gap: var(--s-3); margin-block-start: auto; padding-block-start: var(--s-6); }
  .nav .nav__foot .btn, .nav.is-open .nav__foot .btn { display: inline-flex; width: 100%; padding: 0 var(--s-5); font: var(--fw-strong) var(--fs-base)/1 var(--font); letter-spacing: var(--ls-body); color: var(--on-accent); border: 1.5px solid transparent; }
  html.nav-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .nav li, .nav__foot { opacity: 1; transform: none; }
}

/* in-page links (every call to action goes to the form) glide instead of jumping */
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* numbers: the project record, in place of case studies and testimonials */
#contact { scroll-margin-top: 110px; }

/* ---------- section titles: each word rises from behind a mask ---------- */
.mask .w { display: inline-block; overflow: hidden; vertical-align: top; padding-block: .14em; margin-block: -.14em; }
.js .reveal .mask .w > span { display: inline-block; transform: translateY(115%); transition: transform 1.1s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--w) * 55ms + 80ms); }
.js .reveal.is-in .mask .w > span { transform: none; }

/* ---------- tools strip: a slow, endless line of names ---------- */

/* ---------- FAQ ---------- */
.faq { display: grid; gap: var(--s-7); }
.faq__head { display: grid; gap: var(--s-3); align-content: start; }
.faq__list { border-block-start: 1px solid var(--line-strong); }
.faq__item { border-block-end: 1px solid var(--line); interpolate-size: allow-keywords; }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); padding-block: var(--s-5); cursor: pointer; list-style: none; font: var(--fw-heading) var(--fs-md)/1.4 var(--font); transition: color .3s; }
:lang(fa) .faq__item summary { line-height: 1.7; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--accent-text); }
.faq__item summary i { position: relative; flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; transition: background-color .4s, border-color .4s, transform .6s var(--ease); }
.faq__item summary i::before, .faq__item summary i::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 12px; height: 1.5px; margin: -.75px 0 0 -6px; background: currentColor; transition: transform .6s var(--ease); }
.faq__item summary i::after { transform: rotate(90deg); }
.faq__item[open] summary i { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: rotate(180deg); }
.faq__item[open] summary i::after { transform: rotate(0deg); }
.faq__item::details-content { block-size: 0; overflow: hidden; opacity: 0; transition: block-size .6s var(--ease), opacity .5s, content-visibility .6s allow-discrete; }
.faq__item[open]::details-content { block-size: auto; opacity: 1; }
.faq__answer { padding-block-end: var(--s-5); color: var(--ink-2); max-width: 60ch; }
@media (min-width: 900px) {
  .faq { grid-template-columns: 5fr 7fr; gap: var(--s-8); }
  .faq__head { position: sticky; inset-block-start: 120px; }
}

/* ---------- the form: three short steps ---------- */
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.step { display: grid; gap: var(--s-4); }
.step__title { padding: 0; margin-block-end: var(--s-2); font: var(--fw-heading) var(--fs-lg)/1.3 var(--font-display); letter-spacing: var(--ls-heading); }
:lang(fa) .step__title { line-height: 1.6; }
.picks { display: flex; flex-wrap: wrap; gap: 10px; }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pick span { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: var(--surface-2); font-weight: var(--fw-medium); transition: background-color .35s, border-color .35s, color .35s, transform .4s var(--ease); }
.pick span::before { content: ""; width: 8px; height: 8px; border: 1.5px solid var(--ink-3); transform: rotate(45deg); transition: background-color .35s, border-color .35s; }
.pick:hover span { border-color: var(--line-strong); transform: translateY(-1px); }
.pick input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pick input:checked + span::before { background: var(--on-accent); border-color: var(--on-accent); }
.pick input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status:empty { display: none; }
.form__progress { display: none; }
.form__foot [hidden] { display: none; }
/* enhanced by site.js: one step at a time */
.form.is-stepped { gap: var(--s-5); }
.form.is-stepped .form__progress { display: flex; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.form.is-stepped .form__progress li { flex: 1; display: flex; align-items: center; gap: 8px; padding-block-start: 12px; border-block-start: 2px solid var(--line); font-size: var(--fs-xs); color: var(--ink-3); transition: border-color .6s, color .6s; }
.form.is-stepped .form__progress li span { font-variant-numeric: tabular-nums; }
.form.is-stepped .form__progress li.is-done, .form.is-stepped .form__progress li.is-current { border-color: var(--accent); color: var(--ink); }
.form.is-stepped .step { display: none; }
.form.is-stepped .step.is-current { display: grid; animation: step-in .7s cubic-bezier(.16, 1, .3, 1) both; }
.form.is-stepped .form__foot { justify-content: space-between; }
.form.is-stepped .form__foot [data-next], .form.is-stepped .form__foot [data-send] { margin-inline-start: auto; }
@keyframes step-in { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 26px)); } to { opacity: 1; transform: none; } }
.contact__form { min-height: 430px; align-content: start; }
.contact__form .form__foot { margin-block-start: auto; }

/* ---------- thank-you page ---------- */
/* the form's confirmation takes the form's place, in the same card */
.form__done { display: none; }
.form.is-sent > :not(.form__done) { display: none !important; }   /* must beat the stepped-form rules */
.form.is-sent .form__done { display: grid; gap: var(--s-3); align-content: center; justify-items: start; margin-block: auto; outline: 0; animation: done-in .7s var(--ease) both; }
.form__done p { color: var(--ink-2); max-width: 46ch; }
.form__done-mark { margin-block-end: var(--s-3); color: var(--accent); }
.form__done-mark > * { stroke-dasharray: 1; stroke-dashoffset: 1; animation: done-draw .8s cubic-bezier(.5, 0, .2, 1) .15s forwards; }
.form__done-mark > path { animation-delay: .75s; animation-duration: .45s; }
@keyframes done-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes done-draw { to { stroke-dashoffset: 0; } }
.form.is-busy [data-send] { opacity: .65; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .form.is-sent .form__done { animation: none; } .form__done-mark > * { animation: none; stroke-dashoffset: 0; } }

/* ---------- service cards lean toward the pointer ---------- */
.cascade > li { perspective: 900px; }
a.card--service { transform-style: preserve-3d; }
@media (hover: hover) and (pointer: fine) {
  a.card--service:hover { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-5px); transition: transform .25s ease-out, border-color .5s, box-shadow .7s; }
}

/* ---------- numbers roll into place like a counter ---------- */
.odo { display: inline-flex; direction: ltr; overflow: hidden; line-height: 1.1; vertical-align: bottom; }
.odo__col { display: inline-block; height: 1.1em; }
.odo__col > span { display: flex; flex-direction: column; transform: translateY(0); transition: transform 1.9s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--n, 0) * 140ms); }
.odo__col > span > b { height: 1.1em; font-weight: inherit; }
.odo.is-in .odo__col > span { transform: translateY(calc(var(--d) * -1.1em)); }

/* ---------- header steps aside while reading down, returns on the way up ---------- */
.site-header { transition: --t .6s cubic-bezier(.4, 0, .2, 1), transform .6s cubic-bezier(.16, 1, .3, 1); }
.site-header.is-away { transform: translateY(-100%); }

/* ---------- phone: the request button stays within reach until the form is on screen ---------- */
.sticky-cta { display: none; }
@media (max-width: 699px) {
  .sticky-cta { display: block; position: fixed; z-index: 18; inset-inline: 0; inset-block-end: 0; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); text-decoration: none; pointer-events: none; transform: translateY(110%); transition: transform .7s cubic-bezier(.16, 1, .3, 1); }
  .sticky-cta[hidden] { display: block; }
  .sticky-cta.is-on { transform: none; }
  .sticky-cta .btn { width: 100%; pointer-events: auto; box-shadow: 0 14px 34px -10px rgba(7, 11, 18, .55); }
  html.nav-open .sticky-cta { transform: translateY(110%); }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal .mask .w > span { transform: none; }
  .odo__col > span { transition: none; }
  .site-header.is-away { transform: none; }
}

/* ================= middle sections: drawings instead of paragraphs ================= */

/* line art that draws itself: every shape has pathLength="1" */
.draw { width: 100%; height: 100%; overflow: visible; }
.draw > * { stroke-dasharray: 1; stroke-dashoffset: 0; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.draw > :nth-child(2) { --o: 1; } .draw > :nth-child(3) { --o: 2; } .draw > :nth-child(4) { --o: 3; } .draw > :nth-child(5) { --o: 4; } .draw > :nth-child(6) { --o: 5; }

/* services: a drawing and a name; the sentence appears when the card is pointed at */
/* Service cards are built around one large line illustration each. It draws itself when the cards arrive,
   and when a card is pointed at it draws again and one part of it moves, once. */
.card--service { min-height: 0; gap: 0; padding: clamp(20px, 2.2vw, 30px); overflow: hidden; }
.card--service .card__no { position: absolute; inset-block-start: clamp(20px, 2.2vw, 30px); inset-inline-end: clamp(20px, 2.2vw, 30px); margin: 0; }
.card__art { display: block; width: clamp(104px, 10.5vw, 148px); aspect-ratio: 1; margin-block-end: var(--s-5); color: var(--ink); transition: translate .7s var(--ease); }
.art { display: block; width: 100%; height: 100%; overflow: visible; stroke-width: 1.5; }
.art .a { stroke: var(--teal-600); stroke-width: 2; }
.art path, .art rect, .art circle { stroke-dasharray: 1; stroke-dashoffset: 0; }
.art .m { transform-box: fill-box; transform-origin: 50% 50%; }
.card__text { display: grid; gap: var(--s-2); margin-block-start: auto; }
.card--service p { max-width: 34ch; }
.card--service .card__go { position: absolute; inset-block-end: clamp(20px, 2.2vw, 30px); inset-inline-end: clamp(20px, 2.2vw, 30px); margin: 0; padding: 0; opacity: 0; transform: translateX(-6px); transition: opacity .5s, transform .6s var(--ease); }
:dir(rtl) .card--service .card__go { transform: translateX(6px); }
a.card--service:hover .card__go, a.card--service:focus-visible .card__go { opacity: 1; transform: none; }
/* arrival: each card's strokes draw one after another */
.js .grid.reveal .art path, .js .grid.reveal .art rect, .js .grid.reveal .art circle { stroke-dashoffset: 1; }
.js .grid.reveal.is-in .art path, .js .grid.reveal.is-in .art rect, .js .grid.reveal.is-in .art circle { animation: draw 1.3s cubic-bezier(.5, 0, .2, 1) both; animation-delay: calc(var(--k, 0) * 90ms + var(--o, 0) * 70ms + 250ms); }
.art > :nth-child(2) { --o: 1; } .art > :nth-child(3) { --o: 2; } .art > :nth-child(4) { --o: 3; } .art > :nth-child(5) { --o: 4; } .art > :nth-child(6) { --o: 5; } .art > :nth-child(7) { --o: 6; } .art > :nth-child(8) { --o: 7; } .art > :nth-child(9) { --o: 8; } .art > :nth-child(10) { --o: 9; } .art > :nth-child(11) { --o: 10; } .art > :nth-child(12) { --o: 11; } .art > :nth-child(13) { --o: 12; }
.grid.cascade > li:nth-child(1) .art { --k: 0; } .grid.cascade > li:nth-child(2) .art { --k: 1; } .grid.cascade > li:nth-child(3) .art { --k: 2; } .grid.cascade > li:nth-child(4) .art { --k: 3; } .grid.cascade > li:nth-child(5) .art { --k: 4; } .grid.cascade > li:nth-child(6) .art { --k: 5; } .grid.cascade > li:nth-child(7) .art { --k: 6; } .grid.cascade > li:nth-child(8) .art { --k: 7; } .grid.cascade > li:nth-child(9) .art { --k: 8; }
/* pointing at a card: the drawing is traced again and its moving part plays once */
@media (hover: hover) {
  a.card--service:hover .card__art { translate: 0 -4px; }
  .grid.reveal.is-in a.card--service:hover .art path, .grid.reveal.is-in a.card--service:hover .art rect, .grid.reveal.is-in a.card--service:hover .art circle { animation: draw-again .9s cubic-bezier(.5, 0, .2, 1) both; animation-delay: calc(var(--o, 0) * 45ms); }
  a.card--service:hover .art .m { animation: art-move 1.5s var(--ease) .35s both; }
  a.card--service:hover .art--0 .m { animation-name: art-point; }
  a.card--service:hover .art--1 .m { animation-name: art-pulse; }
  a.card--service:hover .art--2 .m--up { animation-name: art-lift; }
  a.card--service:hover .art--2 .m--down { animation-name: art-drop; }
  a.card--service:hover .art--3 .m { animation-name: art-pop; }
  a.card--service:hover .art--4 .m { animation-name: art-turn; }
  a.card--service:hover .art--5 .m { animation-name: art-pop; }
  a.card--service:hover .art--6 .m { animation-name: art-pop; }
  a.card--service:hover .art--7 .m { animation-name: art-rise; }
}
@keyframes art-move { 50% { translate: 0 -4px; } }
@keyframes art-point { 0% { translate: 30px 0; } 55% { translate: 0 0; } 70% { scale: .82; } 100% { scale: 1; } }
@keyframes art-pulse { 0%, 100% { scale: 1; } 40% { scale: 1.45; } 70% { scale: .9; } }
@keyframes art-lift { 50% { translate: 0 -7px; } }
@keyframes art-drop { 50% { translate: 0 7px; } }
@keyframes art-turn { 0% { rotate: 0deg; scale: .5; } 60% { rotate: 180deg; scale: 1.25; } 100% { rotate: 180deg; scale: 1; } }
@keyframes art-pop { 0% { scale: 0; } 55% { scale: 1.12; } 100% { scale: 1; } }
@keyframes art-rise { 0% { translate: -8px 8px; opacity: 0; } 60% { translate: 3px -3px; opacity: 1; } 100% { translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .js .grid.reveal .art path, .js .grid.reveal .art rect, .js .grid.reveal .art circle { stroke-dashoffset: 0; animation: none !important; } .art .m { animation: none !important; } }

@media (min-width: 1000px) {
  /* tabs have a fixed width; the open panel takes whatever is left, so any number of panels fits */
  /* folded: the name runs down the tab */
  /* physical offsets on purpose: the element's own vertical writing mode would swap the logical ones */
  /* open: the content has a fixed width, so it is revealed rather than re-flowed while the panel grows */
}

/* process: on wide screens a path that draws itself as you scroll, with the steps hanging from it.
   --sp (0 → 1) and the position of the light are set by site.js; without JS everything is drawn and lit. */
.process { position: relative; --sp: 1; max-width: 640px; }
.process__path { display: none; }
.process::before, .process::after { content: ""; position: absolute; inset-block-start: 0; inset-inline-start: 0; inline-size: 1px; block-size: 100%; }
.process::before { background: var(--line-strong); }
.process::after { background: linear-gradient(var(--accent), var(--highlight)); transform: scaleY(var(--sp)); transform-origin: 50% 0; }
.process__light { position: absolute; z-index: 2; inset-inline-start: 0; inset-block-start: calc(var(--sp) * 100%); width: 9px; height: 9px; margin: -4px; border-radius: 50%; background: var(--highlight); box-shadow: 0 0 0 4px color-mix(in oklab, var(--highlight), transparent 78%), 0 0 20px 5px color-mix(in oklab, var(--highlight), transparent 45%); }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-7); }
.steps__item { position: relative; display: grid; gap: var(--s-2); align-content: start; padding-inline-start: var(--s-6); }
.steps__item::before { content: ""; position: absolute; inset-block-start: 6px; inset-inline-start: -5px; width: 9px; height: 9px; background: var(--accent); transform: rotate(45deg); transition: background-color .8s, box-shadow .8s; }
.steps__no { font-size: var(--fs-xs); color: var(--accent-text); font-variant-numeric: tabular-nums; }
.steps__item p { color: var(--ink-2); font-size: var(--fs-ui); }
.js .steps__item > * { transition: opacity .9s cubic-bezier(.16, 1, .3, 1); }
.js .process.is-live .steps__item:not(.is-on) > * { opacity: .32; }
.js .process.is-live .steps__item:not(.is-on)::before { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-strong); }
.steps__item.is-on::before { box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent), transparent 82%); }
@media (min-width: 1000px) {
  .process { max-width: none; padding-block-start: 220px; }
  .process::before, .process::after { display: none; }
  .process__path { display: block; position: absolute; inset-block-start: 0; inset-inline: 0; width: 100%; height: 220px; overflow: visible; fill: none; }
  :dir(rtl) .process__path { transform: scaleX(-1); }
  .process__track { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 2 7; }
  .process__ink { stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--sp)); stroke-linecap: round; }
  .process__light { inset-inline-start: var(--lx, 100%); inset-block-start: var(--ly, 60px); width: 12px; height: 12px; margin: -6px; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: var(--s-5); }
  .steps__item { padding: 0 var(--s-4); text-align: center; justify-items: center; }
  .steps__item::before { inset-inline-start: 50%; margin-inline-start: -6px; width: 12px; height: 12px; inset-block-start: calc(-220px + var(--ny) - 6px); }
  .steps__item:nth-child(odd) { --ny: 150px; } .steps__item:nth-child(even) { --ny: 60px; }
  .steps__item p { max-width: 26ch; }
}

/* what you can count on: four short pledges, each with its own sign */
.pledges { margin: var(--s-8) 0 0; padding: var(--s-7) 0 0; list-style: none; display: grid; gap: var(--s-6); border-block-start: 1px solid var(--line); }
.pledge { display: grid; grid-template-columns: 64px 1fr; gap: var(--s-1) var(--s-4); align-items: center; }
.pledge__art { grid-row: 1 / 3; display: grid; place-items: center; width: 64px; height: 64px; padding: 14px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.pledge__name { margin: 0; align-self: end; font: var(--fw-heading) var(--fs-md)/1.3 var(--font); }
:lang(fa) .pledge__name { line-height: 1.6; }
.pledge p { align-self: start; color: var(--ink-2); font-size: var(--fs-ui); }
.pledges.is-in .pledge__art .draw > * { animation: draw 1.2s cubic-bezier(.5, 0, .2, 1) both; animation-delay: calc(var(--k, 0) * 120ms + var(--o, 0) * 110ms + 250ms); }
@media (min-width: 700px) { .pledges { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .pledges { grid-template-columns: repeat(4, 1fr); } }

/* standalone pages (FAQ) */
.page { padding-block: var(--s-8) var(--section); }

@media (prefers-reduced-motion: reduce) { .draw > * { animation: none !important; } }

/* optional budget ranges in the form */
.field__label { font-size: var(--fs-ui); font-weight: var(--fw-strong); }
.field .pick { font-size: var(--fs-sm); font-weight: var(--fw-regular); }
.picks--one { margin-block-start: var(--s-1); }
.step .form__row { align-items: end; }

/* ---------- numbers: one large dark tile with orbits, and a field of smaller tiles that fill with teal under the pointer ---------- */
.tally { --open: radial-gradient(130% 120% at 15% 0%, #14706b, #0b4744 55%, #072c2c); margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: var(--s-2); min-height: 236px; padding: clamp(18px, 2vw, 26px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: border-color .5s, color .5s, opacity .5s, translate .6s var(--ease), box-shadow .6s; }
/* tiles are direct children of a .cascade, whose entry transition would replace the one above; once the pointer arrives, hand it back */
.js .tally.cascade.reveal.is-live > .tile { transition: border-color .5s, color .5s, opacity .5s, translate .6s var(--ease), box-shadow .6s; }
.tile::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--open); transform: translateY(101%); transition: transform .7s cubic-bezier(.3, .7, .2, 1); }
.tile::after { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(260px circle at var(--sx, 50%) var(--sy, 50%), rgba(92, 214, 200, .22), transparent 70%); opacity: 0; transition: opacity .5s; }
.tile__idx { position: absolute; inset-block-start: clamp(18px, 2vw, 26px); inset-inline-end: clamp(18px, 2vw, 26px); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; color: var(--accent-text); transition: color .5s; }
.tile__art { position: absolute; inset-block-start: clamp(18px, 2vw, 26px); inset-inline-start: clamp(18px, 2vw, 26px); width: 44px; height: 44px; color: var(--ink-3); transition: color .5s, scale .7s var(--ease); transform-origin: 0 0; }
:dir(rtl) .tile__art { transform-origin: 100% 0; }
.tile__art .draw { stroke-width: 1.6; }
.tally.is-in .tile__art .draw > * { animation: draw 1.2s cubic-bezier(.5, 0, .2, 1) both; animation-delay: calc(var(--k, 0) * 80ms + var(--o, 0) * 110ms + 300ms); }
.tile__num { order: 1; margin: 0; font: var(--fw-display) var(--fs-num)/1 var(--font-display); letter-spacing: var(--ls-display); transition: translate .7s var(--ease); }
.tile__label { order: 2; font-size: var(--fs-ui); line-height: 1.45; color: var(--ink-2); transition: color .5s; }
.tile .ph { display: inline-block; padding-block-end: 6px; }
.tile .ph-tag { display: block; width: max-content; margin-block-start: 8px; transition: color .5s, border-color .5s; }

.tile--key { grid-column: 1 / -1; min-height: 300px; border-color: transparent; background: var(--open); color: #eaf7f4; box-shadow: var(--shadow-lg); }
.tile--key::before { display: none; }
.tile--key::after { opacity: 1; background: radial-gradient(420px circle at var(--sx, 30%) var(--sy, 30%), rgba(92, 214, 200, .28), transparent 70%); }
.tile--key .tile__num { font-size: var(--fs-num-xl); }
.tile--key .tile__label { font-size: var(--fs-md); color: rgba(234, 247, 244, .85); }
.tile--key .tile__idx, .tile--key .ph, .tile--key .ph-tag { color: inherit; border-color: currentColor; }
.tile--key .tile__idx { opacity: .7; }
.tile__orbit { position: absolute; z-index: -1; inset-block-start: 50%; inset-inline-end: -12%; width: min(86%, 460px); aspect-ratio: 1; color: rgba(234, 247, 244, .5); translate: calc(var(--px, 0) * -26px) calc(-50% + var(--py, 0) * -26px); transition: translate .9s var(--ease); }
.tile__orbit svg { display: block; width: 100%; height: 100%; overflow: visible; stroke-width: 1; }
.tile__orbit svg > circle { stroke-dasharray: 2 7; opacity: .7; }
.orbit { transform-origin: 200px 200px; color: var(--teal-300); }
.orbit--a { transform: rotate(-38deg); }   /* the three points rest at different places on their rings */
.orbit--b { transform: rotate(118deg); color: var(--gold-300); }
.orbit--c { transform: rotate(-150deg); color: #eaf7f4; }

@media (min-width: 900px) {
  .tally { grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(244px, auto); }
  .tile { min-height: 0; }
  .tile--key { grid-column: span 2; grid-row: span 2; }
}
@media (hover: hover) and (pointer: fine) {
  .tally:has(.tile:hover) .tile:not(:hover):not(.tile--key) { opacity: .55; }
  .tile:not(.tile--key):hover { color: #eaf7f4; border-color: transparent; translate: 0 -4px; box-shadow: var(--shadow-lg); }
  .tile:not(.tile--key):hover::before { transform: none; }
  .tile:hover::after { opacity: 1; }
  .tile:not(.tile--key):hover .tile__label, .tile:not(.tile--key):hover .tile__idx, .tile:not(.tile--key):hover .tile__art, .tile:not(.tile--key):hover .ph, .tile:not(.tile--key):hover .ph-tag { color: inherit; border-color: currentColor; }
  .tile:not(.tile--key):hover .tile__art { scale: 1.18; }
  .tile:not(.tile--key):hover .tile__art .draw > * { animation: draw-again .9s cubic-bezier(.5, 0, .2, 1) both; animation-delay: calc(var(--o, 0) * 90ms); }
  .tile:not(.tile--key):hover .tile__num { translate: 0 -4px; }
}
@keyframes draw-again { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .tile, .tile::before { transition: none; } }
.tile:not(.tile--key) { padding-block-start: calc(clamp(18px, 2vw, 26px) + 44px + 16px); }   /* room for the drawing, whatever the label length */



@media (min-width: 620px) { .places { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .places { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); } }

.stat__num { margin: 0; font: var(--fw-display) var(--fs-num-lg)/1 var(--font-display); letter-spacing: var(--ls-display); }
.stat:first-child .stat__num { color: var(--accent-text); }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }

/* service names at the very top of the page */
.hero .display em { display: block; }   /* the second half of the slogan always starts its own line */

/* ---------- team: 60+ specialists, a group for every field ---------- */
.crew { position: relative; overflow: hidden; display: grid; gap: var(--s-6); padding: clamp(20px, 3vw, 40px); border-radius: var(--r-lg); background: radial-gradient(120% 140% at 100% 0%, #14504d, #0d1a2a 50%, #070b12); color: var(--ink); box-shadow: var(--shadow-lg); }
:dir(rtl) .crew { background: radial-gradient(120% 140% at 0% 0%, #14504d, #0d1a2a 50%, #070b12); }
.crew__side { display: flex; flex-direction: column; gap: var(--s-5); }
.crew__total { display: grid; gap: var(--s-2); margin: 0; }
.crew__num { font: var(--fw-display) var(--fs-num-xl)/1 var(--font-display); letter-spacing: var(--ls-display); }
:lang(fa) .crew__num { line-height: 1.15; }
.crew__total-label { font-size: var(--fs-md); color: var(--ink-2); }
/* The nine fields as one line of large type, not a set of cards: every name the same size and weight.
   Pointing at a name underlines it and says, in one sentence below, what that group does. */
.crew::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(340px circle at var(--sx, 70%) var(--sy, 30%), rgba(92, 214, 200, .13), transparent 70%); opacity: 0; transition: opacity .6s; }
.crew:hover::after { opacity: 1; }
.crew__fields { position: relative; z-index: 1; display: grid; gap: var(--s-5); align-content: center; }
.crew__words { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 2px clamp(14px, 1.8vw, 28px); }
.crew__words li { overflow: hidden; padding-block: 2px; }
.crew__word { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 0; border: 0; background: linear-gradient(var(--teal-400), var(--teal-400)) no-repeat 0 100% / 0 2px; color: var(--ink); font: var(--fw-display) clamp(1.3rem, 2.1vw, 1.95rem)/1.35 var(--font-display); letter-spacing: var(--ls-heading); white-space: nowrap; cursor: pointer; opacity: .42; transition: opacity .45s, background-size .6s var(--ease), color .45s, translate .9s var(--ease); }
:dir(rtl) .crew__word { background-position: 100% 100%; }
:lang(fa) .crew__word { font-weight: 700; line-height: 1.7; }
.crew__word sup { font: var(--fw-regular) var(--fs-2xs)/1 var(--font); letter-spacing: 0; color: var(--teal-300); font-variant-numeric: tabular-nums; translate: 0 -.2em; transition: translate .5s var(--ease); }
.crew__word.is-active { opacity: 1; background-size: 100% 2px; }
.crew__word.is-active sup { translate: 0 -.55em; }
.crew__word:focus-visible { opacity: 1; outline-offset: 4px; }
@media (max-width: 619px) { .crew__word { white-space: normal; text-align: start; } }
/* names rise into place one after another, once */
.js .crew .crew__word { translate: 0 115%; }
.js .crew.is-in .crew__word { translate: 0 0; transition-delay: 0s, 0s, 0s, calc(var(--k) * 70ms + 150ms); }
.crew__say { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: var(--s-4); min-height: 4.6em; margin: 0; padding-block-start: var(--s-4); border-block-start: 1px solid var(--line); color: var(--ink-2); }
:lang(fa) .crew__say { min-height: 5.4em; }
.crew__say b { font: var(--fw-display) var(--fs-lg)/1 var(--font-display); color: var(--teal-300); font-variant-numeric: tabular-nums; }
.crew__say b, .crew__say span { transition: opacity .28s, translate .45s var(--ease); }
.crew__say.is-out b, .crew__say.is-out span { opacity: 0; translate: 0 -10px; transition-duration: .18s; }
.crew__say.is-in b, .crew__say.is-in span { opacity: 0; translate: 0 12px; transition: none; }
@media (prefers-reduced-motion: reduce) { .js .crew .crew__word { translate: 0 0; transition: opacity .2s; } .crew__say b, .crew__say span { transition: none; } }
@media (min-width: 1000px) { .crew { grid-template-columns: minmax(250px, .62fr) 1.9fr; gap: var(--s-8); } }

/* ---------- who we work with: pick a field and hear, in speech bubbles, what its owners worry about ---------- */
.voices { display: grid; gap: var(--s-5); margin-block-start: var(--s-8); padding-block-start: var(--s-7); border-block-start: 1px solid var(--line); }
.voices__label { margin-block-end: var(--s-4); font-size: var(--fs-sm); font-weight: var(--fw-strong); color: var(--ink-3); }
.voices__list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.voices__name { padding: 10px 18px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: transparent; color: var(--ink-2); font: var(--fw-strong) var(--fs-base)/1.5 var(--font); letter-spacing: inherit; cursor: pointer; transition: color .35s, background-color .35s, border-color .35s, padding .5s var(--ease); }
.voices__name.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.voices__frame { position: relative; display: grid; align-items: center; min-height: 430px; padding: clamp(20px, 3vw, 40px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.voices__pane { grid-area: 1 / 1; display: grid; gap: var(--s-3); align-content: start; visibility: hidden; }
.voices__pane.is-active { visibility: visible; }
.voices__head { display: flex; align-items: center; gap: var(--s-5); margin-block-end: var(--s-3); }
.voices__art { flex: none; display: block; width: clamp(84px, 9vw, 120px); aspect-ratio: 1; color: var(--teal-600); }
.voices__art .draw { stroke-width: 1.3; }
.voices__pane.is-active .voices__art .draw > * { animation: draw 1s cubic-bezier(.5, 0, .2, 1) both; animation-delay: calc(var(--o, 0) * 90ms); }
.voices__hear { font-size: var(--fs-sm); color: var(--ink-3); }
.voices__title { margin: 0; font: var(--fw-display) var(--fs-lg)/1.3 var(--font-display); letter-spacing: var(--ls-heading); }
:lang(fa) .voices__title { line-height: 1.6; }
.bubble { position: relative; display: grid; gap: 6px; justify-self: start; max-width: min(36ch, 88%); margin: 0; padding: 14px 20px; color: inherit; text-decoration: none; transition: translate .5s var(--ease), box-shadow .5s, border-color .4s; border: 1.5px solid var(--line-strong); border-radius: 22px; border-end-start-radius: 5px; font-size: var(--fs-md); line-height: 1.5; transform-origin: 0 100%; }
:lang(fa) .bubble { line-height: 1.8; }
:dir(rtl) .bubble { transform-origin: 100% 100%; }
.bubble--1, .bubble--3 { justify-self: end; border-color: var(--teal-700); background: var(--teal-700); color: #fff; border-end-start-radius: 22px; border-end-end-radius: 5px; transform-origin: 100% 100%; }
:dir(rtl) .bubble--1, :dir(rtl) .bubble--3 { transform-origin: 0 100%; }
.voices__pane.is-active .bubble { animation: bubble-in .6s var(--ease) both; animation-delay: calc(var(--b) * 150ms + 200ms); }
/* under each worry, the service that answers it; the bubble leads to the form with that service chosen */
.bubble small { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: var(--fw-strong); line-height: 1.4; color: var(--teal-700); }
.bubble--1 small, .bubble--3 small { color: #9fe6dc; }
:dir(rtl) .bubble small svg { transform: scaleX(-1); }
.bubble:hover, .bubble:focus-visible { translate: 0 -3px; border-color: var(--teal-600); box-shadow: var(--shadow-md); }
@keyframes bubble-in { from { opacity: 0; scale: .55; translate: 0 16px; } }
/* nothing plays until the block has scrolled into view */
.js .voices:not(.is-in) .bubble, .js .voices:not(.is-in) .voices__art .draw > * { animation: none; opacity: 0; }
@media (min-width: 900px) {
  .voices { grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: var(--s-8); align-items: stretch; }
  .voices__list { display: grid; gap: 0; border-block-start: 1px solid var(--line); }
  .voices__name { display: flex; align-items: center; width: 100%; padding: 17px 4px; border: 0; border-block-end: 1px solid var(--line); border-radius: 0; font: var(--fw-heading) clamp(1.25rem, 1.7vw, 1.5rem)/1.5 var(--font); text-align: start; }
  .voices__name::before { content: ""; flex: none; width: 0; height: 2px; margin-inline-end: 0; background: var(--teal-600); transition: width .5s var(--ease), margin .5s var(--ease); }
  .voices__name.is-active { background: transparent; border-color: var(--line); color: var(--ink); }
  .voices__name.is-active::before { width: 28px; margin-inline-end: 14px; }
}
@media (prefers-reduced-motion: reduce) { .voices__pane.is-active .bubble, .voices__pane.is-active .voices__art .draw > * { animation: none; } }
/* the team panel now sits inside "how we work", between the steps and the commitments */
.process + .crew { margin-block-start: var(--s-8); }
.crew__lead { color: var(--ink-2); max-width: 34ch; }

/* ---------- our story: one paragraph at the top of the footer, pointed to from the hero ---------- */
.hero__story { margin-block-start: var(--s-3); font-size: var(--fs-ui); color: var(--ink-2); }
.site-footer .site-footer__story { max-width: 72ch; margin-block-end: var(--s-7); padding-block-end: var(--s-7); border-block-end: 1px solid var(--line); scroll-margin-top: 110px; }
.site-footer .site-footer__story h2 { margin-block-end: var(--s-3); font: var(--fw-display) var(--fs-lg)/1.3 var(--font-display); letter-spacing: var(--ls-heading); color: var(--ink); }
:lang(fa) .site-footer .site-footer__story h2 { line-height: 1.6; }
.site-footer__story p { color: var(--ink-2); font-size: var(--fs-md); line-height: 1.75; }
:lang(fa) .site-footer__story p { line-height: 2; }

/* On wide screens the footer's text keeps to one side, so the other side is left clear for the globe to show through and be turned. */
@media (min-width: 900px) {
  .has-scene .site-footer { background: linear-gradient(90deg, rgba(7, 11, 18, .92) 0%, rgba(7, 11, 18, .92) 36%, rgba(7, 11, 18, 0) 68%); }
  .has-scene:dir(rtl) .site-footer, :dir(rtl) .has-scene .site-footer { background: linear-gradient(270deg, rgba(7, 11, 18, .92) 0%, rgba(7, 11, 18, .92) 36%, rgba(7, 11, 18, 0) 68%); }
  .has-scene .site-footer__story { max-width: 58ch; }
  .has-scene .site-footer__top { grid-template-columns: minmax(0, 320px) minmax(0, 220px); justify-content: start; }
  .has-scene .site-footer__cols { grid-template-columns: 1fr; }
}

/* one line under the form's buttons: when to expect an answer */
.form__note { display: flex; align-items: center; gap: 10px; margin: 0; padding-block-start: var(--s-4); border-block-start: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-2); }
.form__note i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--teal-400); box-shadow: 0 0 0 4px rgba(55, 200, 184, .18); }
