/* Home page chrome: fonts, header, carousel and popup. Moved from the inline <style> of the static index.html. */
@font-face {
  font-family: 'Dana Pro';
  src: url('./DanaVF.woff2') format('woff2');
  font-weight: 10 990;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('./plus-jakarta-sans.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
html, body {
  background-color: var(--L-bg, #090D16);
  color: var(--L-ink, #F8FAFC);
  overflow-x: clip;
}

html[dir="rtl"] body {
  font-family: 'Dana Pro', sans-serif;
  font-feature-settings: "ss02";
}

html[dir="ltr"] body {
  font-family: 'Plus Jakarta Sans', 'Dana Pro', sans-serif;
}

.ambient-orb {
  filter: blur(130px);
  pointer-events: none;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--L-bg, #090D16);
}
::-webkit-scrollbar-thumb {
  background: #182236;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2D40F0;
}

.glass-nav {
  background: rgb(var(--L-bg-rgb, 9 13 22) / 0.82);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
:is(#work, #services, #why, #faq, #contact) { scroll-margin-top: 5rem; }
.header-nav a[aria-current="true"] { color: var(--L-ink, #f8fafc); background: rgb(var(--L-raised-rgb, 24 34 54) / 1); }
#mobileMenu a[aria-current="true"] { background: rgb(var(--L-surface-rgb, 17 24 39) / 1); color: var(--L-gold-ink, #ffbe0b); }
.glass-nav :is(a, button):focus-visible { outline: 2px solid #ffbe0b; outline-offset: 2px; }
#mobileMenuBtn .menu-close, #mobileMenuBtn[aria-expanded="true"] .menu-bars { display: none; }
#mobileMenuBtn[aria-expanded="true"] .menu-close { display: block; }
/* Desktop nav with six links: keep each link on one line between 1024px and 1280px */
.header-nav a { white-space: nowrap; }
@media (min-width: 64rem) and (max-width: 79.999rem) {
  .header-nav a { padding-inline: .75rem; }
  .header-brand [data-i18n="brandTagline"] { display: none; }
}
@media (max-width: 63.999rem) {
  .header-row { height: auto; min-height: 4rem; gap: .75rem; padding-block: .5rem; }
  .header-brand { gap: .5rem; min-height: 2.75rem; }
  .header-brand-mark { flex: none; width: 2.25rem; height: 2.25rem; border-radius: .7rem; box-shadow: none; }
  .header-brand [data-i18n="brandName"] { white-space: nowrap; }
  .header-nav, #langToggleBtn { display: none; }
  .header-actions { flex: none; gap: .5rem; }
  .header-actions [data-i18n="navCta"] {
    min-height: 2.75rem; padding: .5rem .95rem; white-space: nowrap; font-size: .875rem; line-height: 1.35;
  }
  #mobileMenuBtn {
    display: grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; padding: .5rem;
  }
  #mobileMenu:not([hidden]) {
    display: block; position: absolute; inset-inline: 0; top: 100%; overflow-y: auto;
    max-height: calc(100vh - 4rem); max-height: calc(100dvh - 4rem);
    padding: .5rem 1rem .75rem; background: var(--L-surface, #0d1320); border-block: 1px solid rgb(var(--L-ink-rgb, 255 255 255) / 0.086);
    box-shadow: 0 12px 24px rgb(var(--L-shade-rgb, 0 0 0) / calc(.267 * var(--L-shade-k, 1)));
  }
  #mobileMenu :is(a, button) { min-height: 2.75rem; }
  #mobileLangToggle {
    display: flex; align-items: center; gap: .6rem; width: 100%; padding: .65rem 1rem;
    margin-top: .35rem; border-top: 1px solid rgb(var(--L-ink-rgb, 255 255 255) / 0.086); color: var(--L-gold-ink, #ffbe0b); font-size: .875rem;
  }
  :is(#top, #work, #services, #why, #faq, #contact) { scroll-margin-top: 4rem; }
}
@media (max-width: 39.999rem) {
  .header-brand [data-i18n="brandTagline"], .header-brand-dot { display: none; }
}

.glass-surface {
  background: linear-gradient(165deg, rgb(var(--L-raised-rgb, 24 34 54) / 0.65) 0%, rgb(var(--L-surface-rgb, 17 24 39) / 0.94) 100%);
  border: 1px solid rgb(var(--L-ink-rgb, 255 255 255) / 0.08);
}

.glass-surface:hover {
  border-color: rgba(45, 64, 240, 0.45);
}

/* انیمیشن اسکرول نرم پیش‌نمایش سایت‌ها درون قاب مرورگر */
@keyframes gentlePageScroll {
  0%, 15% { object-position: top center; }
  50%, 65% { object-position: center 45%; }
  100% { object-position: top center; }
}

.screenshot-scroll-preview {
  object-fit: cover;
  object-position: top center;
  animation: gentlePageScroll 16s ease-in-out infinite;
}
.group:hover .screenshot-scroll-preview {
  animation-play-state: paused;
}

#work { overflow-x: clip; }
@media (any-pointer: fine) {
  #appleCarouselViewport { cursor: grab; user-select: none; -webkit-user-select: none; }
  #appleCarouselViewport :is(a, button) { cursor: pointer; }
}
#appleCarouselViewport.is-dragging, #appleCarouselViewport.is-dragging * { cursor: grabbing; }
#appleCarouselViewport:is(.is-dragging, .is-scrubbing) #appleCarouselTrack { transition: none; }
#appleCarouselTrack > [data-slide-index] { position: relative; transition-property: opacity, transform; }
#carouselControls {
  position: sticky;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 1;
  pointer-events: none;
}
#carouselControls button { pointer-events: auto; }
#appleCarouselDots {
  gap: 0;
  padding-inline: .65rem;
  flex: none;
}
.carousel-dot {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 2.75rem;
  border-radius: 1rem;
  transition: width 260ms ease;
}
.carousel-dot[aria-current="true"] { width: 3.5rem; }
.carousel-dot-track {
  display: block;
  width: .5rem;
  height: .5rem;
  border-radius: 1rem;
  overflow: hidden;
  background: #73757b;
  transition: width 260ms ease;
}
.carousel-dot[aria-current="true"] .carousel-dot-track { width: 2.875rem; }
.carousel-dot-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: #fff; }
.carousel-dot:focus-visible { outline: 2px solid #ffbe0b; outline-offset: -2px; }
@media (max-width: 400px) {
  #carouselControls { gap: .375rem; padding-inline: .25rem; }
  #appleCarouselDots { padding-inline: .25rem; }
  .carousel-dot { width: 1.375rem; }
  .carousel-dot[aria-current="true"] { width: 3.125rem; }
}
@media (prefers-reduced-motion: reduce) {
  .carousel-dot, .carousel-dot-track, #appleCarouselTrack, #appleCarouselTrack > div { transition: none; }
  .screenshot-scroll-preview { animation: none; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
  animation: fadeUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
#projectModal {
  position: fixed;
  inset: auto 0;
  top: var(--inquiry-center, 50%);
  transform: translateY(-50%);
  margin: 0 auto;
  width: min(36rem, calc(100% - 1.25rem));
  max-width: none;
  max-height: calc(100vh - 1.25rem);
  max-height: calc(var(--inquiry-height, 100dvh) - 1.25rem);
  overflow: hidden;
  padding: 0;
}
/* The rounded dialog clips; this inner box scrolls, so the scrollbar stays inside the corners. */
#projectModal .inquiry-scroll {
  max-height: calc(100vh - 1.25rem - 2px);
  max-height: calc(var(--inquiry-height, 100dvh) - 1.25rem - 2px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 1rem;
}
#projectModal .inquiry-scroll::-webkit-scrollbar { width: 12px; }
#projectModal .inquiry-scroll::-webkit-scrollbar-track { background: transparent; margin-block: 28px; }
#projectModal .inquiry-scroll::-webkit-scrollbar-thumb { background: rgb(142 155 255 / .3); border-radius: 99px; border: 4px solid transparent; background-clip: padding-box; }
#projectModal .inquiry-scroll::-webkit-scrollbar-thumb:hover { background-color: rgb(142 155 255 / .5); }
@supports not selector(::-webkit-scrollbar) {
  #projectModal .inquiry-scroll { scrollbar-width: thin; scrollbar-color: rgb(142 155 255 / .35) transparent; }
}
#projectModal::backdrop { background: rgb(0 0 0 / 80%); backdrop-filter: blur(5px); }
html.inquiry-open, html.inquiry-open body { overflow: hidden; }
#projectModal [hidden] { display: none; }
#projectModal input[type="text"], #projectModal textarea { font-size: 1rem; }
#projectModal :focus-visible { outline: 2px solid #ffbe0b; outline-offset: 2px; }
#projectModal .if { margin-top: 1.5rem; }
