/* Layout safeguards shared by all viewport sizes. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 110px; }
body { min-width: 0; }
.container { width: min(calc(100% - 48px), var(--container)); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.hero-layout > *, .section-head > *, .project-row > *, .project-featured > *, .team-grid > *, .faq-layout > *, .capability-panel > * { min-width: 0; }
p, h1, h2, h3, h4, .tags span, .member-info > span { overflow-wrap: anywhere; }
svg { flex-shrink: 0; }
.tags span { max-width: 100%; }
.member-info h3, .member-info p { height: auto; }
.header-cta, .menu-toggle, .hero-shortcuts a, .text-link, .back-top, .team-note > a { min-height: 44px; }
.text-link { display: inline-flex; align-items: center; flex-wrap: wrap; }
.desktop-nav a { min-height: 44px; display: inline-flex; align-items: center; }
.hero-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.orbit { max-width: 100%; aspect-ratio: 1; height: auto; }
.member-info p { font-size: 12px; }
.member-info > span { font-size: 10px; }
.member-info .tags span { font-size: 11px; }
.footer-bottom { flex-wrap: wrap; line-height: 1.8; padding-block: 16px; }

@media (min-width: 861px) and (max-width: 1024px) {
  .header-inner { gap: 14px; }
  .brand-copy strong { font-size: 13px; }
  .brand-copy small { font-size: 6px; }
  .desktop-nav { gap: 12px; }
  .header-cta { padding-inline: 12px; gap: 8px; }
  .hero h1 { font-size: 45px; }
  .core-title { font-size: 40px; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .hero-layout { grid-template-columns: minmax(0, 1fr); }
  .mobile-menu { inset: 76px 0 auto; height: calc(100vh - 76px); height: calc(100dvh - 76px); overscroll-behavior-y: contain; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .mobile-menu a { flex-shrink: 0; }
  .project-featured { grid-template-columns: minmax(0, 1fr); }
  .project-featured .project-canvas { grid-row: 1; min-height: 320px; }
  .project-featured .project-info { min-height: 0; }
  .project-info h3 { margin-top: 24px; }
  .browser-frame { max-width: 620px; }
  .commerce-canvas { padding: 30px; }
  .browser-frame { border-radius: 12px; transform: none; }
  .contact-channels { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  .contact-channel { padding: 24px 82px 24px 24px; min-height: 145px; }
  .channel-icon { position: absolute; right: 22px; top: 25px; margin: 0; }
  .channel-detail { min-height: 0; margin: 6px 0 12px; font-size: 12px; }
  .contact-channel strong { padding-left: 22px; font-size: 17px; }
  .channel-address { font-size: 16px; }
  .section-head { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .section-head > p { max-width: 580px; }
}

@media (max-width: 600px) {
  .container { width: calc(100% - 32px); }
  .hero-copy > p, .service-card p, .project-info p, .process-step p, .section-head > p, .contact p, details p { font-size: 14px; line-height: 2.05; }
  .hero-actions { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .hero-actions .button { width: 100%; min-height: 50px; font-size: 13px; }
  .hero-shortcuts a { font-size: 12px; min-height: 44px; }
  .hero-shortcuts > span { font-size: 12px; }
  .services-grid, .project-row { grid-template-columns: minmax(0, 1fr); }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-info { padding: 18px 14px; }
  .member-info h3 { font-size: 15px; min-height: 56px; }
  .member-info p { min-height: 64px; font-size: 12px; }
  .member-info > span { font-size: 9px; min-height: 28px; }
  .member-info .tags span { font-size: 10px; }
  .member-visual { height: 130px; }
  .project-small { grid-template-columns: minmax(0, 1fr); }
  .capability-panel { padding: 24px 20px; }
  .capability-grid { grid-template-columns: minmax(0, 1fr); }
  .capability-intro > p, .capability-grid p, .team-note p { font-size: 13px; }
  .team-note > a { margin-inline-start: 0; }
  .team-note > div { flex-basis: calc(100% - 55px); }
  .faq summary { font-size: 14px; line-height: 2; }
  .faq details p { padding-left: 0; }
  .contact-channel { padding: 23px 76px 23px 20px; }
  .channel-icon { right: 18px; width: 40px; height: 40px; }
  .contact-brief, .contact-note { font-size: 12px; }
  .contact-note { max-width: 100%; }
  .footer-main { gap: 18px; }
  .footer-main > p { font-size: 12px; }
  .footer-bottom { font-size: 10px; }
}

@media (max-width: 540px) {
  .mobile-menu { top: 70px; height: calc(100vh - 70px); height: calc(100dvh - 70px); }
  .hero-visual { min-height: 0; padding-block: 24px; }
  .visual-core { width: 92%; transform: none; }
  .floating-card { position: relative; inset: auto; width: max-content; max-width: 100%; margin-top: 12px; justify-self: center; }
  .floating-card-one { display: none; }
  .floating-card small { font-size: 9px; }
  .floating-card strong { font-size: 12px; }
  .core-chip { font-size: 8px; line-height: 1.7; }
  .core-stack span { font-size: 8px; line-height: 1.4; }
  .core-corner { font-size: 8px; flex-wrap: wrap; }
  .core-topbar small { font-size: 7px; }
  .core-title { font-size: clamp(32px, 9vw, 46px); }
  .orbit { top: 20px; }
  .commerce-canvas { padding: 20px 14px; }
  .project-featured .project-canvas { min-height: 280px; }
  .dash-main { padding: 12px; }
  .dashboard-layout { grid-template-columns: 34px minmax(0, 1fr); }
  .dash-title { flex-wrap: wrap; }
  .dash-stats { gap: 5px; }
  .dash-stats > div { padding: 8px 5px; }
  .dash-title strong { font-size: 11px; }
}

@media (max-width: 380px) {
  .container { width: calc(100% - 28px); }
  .team-grid { grid-template-columns: minmax(0, 1fr); }
  .member-visual { height: 145px; }
  .member-info h3, .member-info p, .member-info > span { min-height: 0; }
  .member-info h3 { font-size: 17px; }
  .member-info p { margin-block: 8px; }
  .hero h1 { font-size: clamp(28px, 10vw, 37px); }
  .hero-proof strong { font-size: 11px; }
  .hero-proof span { font-size: 10px; }
  .hero-proof > div { padding-inline: 5px; }
  .contact-channel { padding: 20px; }
  .channel-icon { position: static; margin-bottom: 12px; }
  .channel-address { font-size: 15px; }
  .brand-copy strong { font-size: 12px; }
  .brand-copy small { font-size: 6px; }
  .core-screen { padding-inline: 14px; }
  .core-corner { gap: 5px; padding-inline: 12px; }
}

@media (max-width: 860px) and (max-height: 500px) and (orientation: landscape) {
  .mobile-menu { padding-top: 12px; }
  .mobile-menu nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
  .mobile-menu a { padding-block: 10px; font-size: 16px; min-height: 48px; }
  .hero { padding-top: 28px; }
}

@media (hover: none) {
  .button:hover, .service-card:hover, .contact-channel:hover { transform: none; }
}

/* Two identical groups make the technology ribbon loop without a jump. */
.tech-inner { overflow: hidden; }
.tech-inner > p { flex-shrink: 0; }
.marquee { overflow: hidden; direction: ltr; padding-block: 8px; mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent); }
.marquee-track { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 0; width: max-content; animation: tech-drift 48s linear infinite; }
.tech-group { display: flex; align-items: center; flex-shrink: 0; gap: 14px; padding-right: 14px; }
.tech-group > span { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; white-space: nowrap; padding: 12px 17px; border: 1px solid #d8c8b5; border-radius: 8px; background: #fcf6ec; color: #315f86; font: 650 12px/1.4 Arial, sans-serif; letter-spacing: .03em; }
.tech-group > span:nth-child(3n) { background: #eee3d5; color: #76573f; border-color: #d3bda4; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee:focus-visible { outline-offset: -3px; }
@keyframes tech-drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 860px) { .tech-inner { gap: 10px; } .marquee { flex: auto; width: 100%; } }
@media (max-width: 540px) { .tech-group { gap: 10px; padding-right: 10px; } .tech-group > span { font-size: 11px; padding: 11px 14px; } }
@media (prefers-reduced-motion: reduce) {
  .marquee { mask-image: none; }
  .marquee-track { animation: none; transform: none; width: 100%; }
  .tech-group { flex-wrap: wrap; justify-content: center; padding: 0; width: 100%; }
  .tech-group[aria-hidden="true"] { display: none; }
}
@media print { .marquee-track { animation: none; width: 100%; } .tech-group { flex-wrap: wrap; } .tech-group[aria-hidden="true"] { display: none; } }
@media (max-width: 860px) { .tech-inner { flex-direction: row; flex-wrap: wrap; justify-content: space-between; } .tech-inner .marquee { flex-basis: 100%; } }

/* Full-width technology ribbon, with a small gutter on every screen. */
.tech-strip .tech-inner { width: calc(100% - 24px); max-width: none; display: block; padding-block: 18px; }
.tech-strip .marquee { width: 100%; min-width: 0; }
/* Ribbon chips share the borderless denim shadow treatment. */
.tech-group > span, .tech-group > span:nth-child(3n) {
  border: 0;
  box-shadow: 0 5px 14px -7px rgb(49 95 134 / 25%);
}
.marquee { padding-block: 14px; }

/* Match Latin typography to the local Persian type family. */
:root { --font-latin: IRANYekanX, 'Segoe UI', Arial, sans-serif; }
.brand-copy strong, .brand-copy small, .brand-mark,
.core-topbar small, .core-chip, .core-title, .core-stack span, .core-corner,
.floating-card small, .marquee-track span, .tech-group > span,
.section-index, .service-number, .tags span, .project-kicker,
.project-info h3, .project-meta span, .browser-bar small,
.dash-side b, .dash-title strong, .dash-stats small, .dash-stats b,
.mini-site > span, .mini-site strong, .manifesto-label,
.member-visual > span, .member-visual i, .member-info > span,
.member-info p, .process-step > span, .footer-bottom {
  font-family: var(--font-latin);
}
.brand-copy strong { font-weight: 800; letter-spacing: .04em; }
.brand-copy small { font-size: 9px; font-weight: 500; letter-spacing: .04em; line-height: 1.6; }
.core-title { font-weight: 800; line-height: 1.25; letter-spacing: -.045em; font-size: clamp(34px, 3.7vw, 50px); }
.core-topbar small, .core-chip, .core-corner, .floating-card small { font-size: 10px; font-weight: 500; line-height: 1.8; letter-spacing: .02em; }
.core-stack span { font-size: 9px; font-weight: 700; line-height: 1.6; letter-spacing: 0; }
.section-index, .project-kicker, .manifesto-label { font-size: 11px; font-weight: 700; line-height: 1.8; letter-spacing: .035em; }
.tags span, .member-info .tags span, .capability-grid .tags span { font-size: 11px; font-weight: 500; line-height: 1.6; }
.project-meta span, .member-info > span { font-size: 11px; font-weight: 700; line-height: 1.8; letter-spacing: 0; }
.member-info p { font-size: 13px; font-weight: 500; line-height: 1.9; }
.tech-group > span { font-size: 14px; font-weight: 700; line-height: 1.6; letter-spacing: 0; }
.project-info h3 { font-weight: 800; letter-spacing: -.03em; }
.browser-bar small, .dash-stats small { font-size: 9px; line-height: 1.6; }
.mock-button { font-family: var(--font-latin) !important; font-weight: 700 !important; }
.footer-bottom { font-size: 11px; font-weight: 500; line-height: 1.8; letter-spacing: 0; }
@media (max-width: 1024px) {
  .brand-copy small { font-size: 8px; }
  .core-title { font-size: 36px; }
}
@media (max-width: 860px) {
  .core-title { font-size: clamp(32px, 7vw, 46px); }
}
@media (max-width: 540px) {
  .core-title { font-size: clamp(27px, 7.5vw, 39px); }
  .core-topbar small, .core-chip, .core-corner, .floating-card small { font-size: 9px; }
  .core-topbar { height: auto; min-height: 38px; gap: 8px; padding-block: 8px; }
  .core-topbar small { text-align: right; }
  .core-stack { flex-wrap: wrap; }
  .core-stack span { font-size: 8px; }
  .section-index, .project-kicker, .manifesto-label { font-size: 10px; }
  .member-info > span { font-size: 10px; }
  .member-info p { font-size: 12px; }
  .tech-group > span { font-size: 13px; }
  .footer-bottom { font-size: 10px; }
}

/* A quieter closing invitation after the work and the people behind it. */
.contact-invitation { margin: 0 24px 32px; padding: 64px 0; border-radius: 28px; }
.contact-invitation .contact-inner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); column-gap: 64px; align-items: start; text-align: right; }
.contact-invitation .section-index { grid-column: 1; text-align: right; margin-bottom: 20px; }
.contact-invitation h2 { grid-column: 1; font-size: clamp(32px, 4vw, 52px); line-height: 1.6; }
.contact-invitation p { grid-column: 1; margin: 18px 0 0; max-width: 390px; }
.contact-invitation .contact-channels { grid-column: 2; grid-row: 1 / 4; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; max-width: none; margin: 0; gap: 12px; align-items: stretch; }
.contact-invitation .contact-channel { padding: 22px; min-height: 0; border-radius: 18px; }
.contact-invitation .channel-call { grid-column: 1 / -1; background: #2c567a; color: #fffaf2; padding: 28px; box-shadow: 0 16px 32px -20px #18374f80; }
.contact-invitation .channel-call .channel-icon { background: #ffffff14; color: #fffaf2; border-color: #ffffff30; }
.contact-invitation .channel-call .channel-detail, .contact-invitation .channel-call .channel-arrow { color: #e0e9f1; }
.contact-invitation .channel-call .channel-address { color: #fffaf2; font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: .02em; }
.contact-invitation .channel-icon { position: static; margin-bottom: 14px; }
.contact-invitation .channel-detail { min-height: 0; margin: 5px 0 12px; }
.contact-invitation .contact-channel strong { font-size: 15px; padding-left: 20px; }
.contact-invitation .channel-call strong { font-size: 18px; }
.contact-invitation .channel-address { font-size: 13px; }
.call-caption { display: flex; gap: 20px; align-items: center; margin-top: 18px; font-size: 12px; color: #e0e9f1; }
@media (max-width: 860px) {
  .contact-invitation { margin: 0 16px 24px; padding: 40px 0; border-radius: 22px; }
  .contact-invitation .contact-inner { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .contact-invitation .section-index { margin-bottom: 12px; }
  .contact-invitation .contact-channels { grid-column: 1; grid-row: auto; margin-top: 28px; }
  .contact-invitation p { max-width: 520px; }
}
@media (max-width: 540px) {
  .contact-invitation .contact-channels { grid-template-columns: minmax(0, 1fr); }
  .contact-invitation .channel-call { padding: 24px 20px; }
  .contact-invitation .contact-channel { padding: 20px; }
  .contact-invitation .channel-call strong { font-size: 16px; }
}

/* Shared team identity, using the supplied logo artwork. */
.brand-logo { display: block; width: 56px; height: 56px; flex-shrink: 0; object-fit: contain; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.hero-brand { width: 100%; max-width: 510px; margin: 0; justify-self: center; align-self: center; overflow: hidden; border-radius: 24px; background: #fffaf2; box-shadow: 0 20px 55px -25px #58412d55; }
.hero-brand > img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.hero-brand figcaption { display: flex; flex-direction: column; gap: 4px; padding: 20px 24px; text-align: center; }
.hero-brand figcaption strong { font-size: 16px; color: #293849; }
.hero-brand figcaption span { font-size: 12px; color: #65574e; }
@media (max-width: 860px) {
  .brand-logo { width: 48px; height: 48px; }
  .hero-brand { max-width: 420px; }
}
@media (max-width: 540px) {
  .brand-logo { width: 44px; height: 44px; }
  .hero-brand { max-width: 350px; border-radius: 18px; }
  .hero-brand figcaption { padding: 16px; }
  .hero-brand figcaption strong { font-size: 14px; }
}
