/* Mobile layout layer, loaded after the original visual design. */
html { -webkit-text-size-adjust: 100%; }
button, a, input, select, textarea { touch-action: manipulation; }
.hero-copy, .project-copy, .about-lead, .service-name { min-width: 0; }
@media (max-width: 759px) {
  .container { width: calc(100% - 40px); }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 24px; padding-block: 28px 24px; }
  .hero-copy { max-width: 560px; }
  .hero h1 { font-size: clamp(28px, 7.4vw, 40px); line-height: 1.6; letter-spacing: 0; }
  .hero-description { font-size: 15px; line-height: 1.95; margin-top: 16px; }
  .desktop-break { display: none; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
  .hero-actions .button, .hero-actions .quiet-link { min-height: 48px; justify-content: center; padding: 10px 12px; font-size: 14px; }
  .hero-actions .quiet-link { border: 1px solid var(--border); border-radius: 8px; }
  .hero-disciplines { margin-top: 20px; font-size: 12px; line-height: 1.8; gap: 8px; }
  .hero-disciplines > span + span { padding-inline-start: 8px; }
  .hero-art { width: min(100%, 280px); justify-self: center; }
  .art-stage { width: min(100%, 240px); margin-inline: auto; }
  .hero-art figcaption { font-size: 12px; padding-block: 10px; }
  .main-stack { gap: 44px; padding-block: 20px 44px; }
  .section-heading { display: block; margin-bottom: 20px; }
  .section-heading h2, .about-lead h2, .next-step h2 { font-size: clamp(24px, 6.4vw, 30px); line-height: 1.65; }
  .section-description { max-width: 100%; font-size: 14px; margin-top: 8px; }
  .portfolio-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .portfolio-grid .featured-project .project-copy { padding: 20px; align-items: stretch; }
  .portfolio-grid .project-card:not(.featured-project) .project-copy { padding: 18px; grid-template-columns: minmax(0,1fr) 44px; }
  .portfolio-grid .project-arrow { width: 44px; height: 44px; }
  .portfolio-grid .project-description { font-size: 14px; line-height: 1.85; }
  .service-row { grid-template-columns: minmax(0,1fr) 44px; gap: 12px; padding: 18px 0; }
  .service-num, .service-icon { display: none; }
  .service-row .service-title { font-size: clamp(18px, 5vw, 22px); line-height: 1.7; text-wrap: pretty; }
  .service-row .service-category { font-size: 13px; }
  .service-arrow { width: 44px; height: 44px; }
  .service-row:hover, .service-row:focus-visible { padding-inline: 10px; }
  .about-panel { grid-template-columns: minmax(0,1fr); padding: 28px 20px; gap: 24px; border-radius: 16px; }
  .about-lead p, .about-values span { font-size: 15px; line-height: 1.95; }
  .about-values li { padding-block: 18px; gap: 6px 14px; }
  .next-step { display: block; padding-block: 32px; }
  .next-step .button { width: 100%; min-height: 48px; margin-top: 18px; justify-content: center; }
  .footer-inner { min-height: 0; padding-block: 36px; gap: 28px; }
  .footer-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; gap: 6px; }
  .footer-nav a { justify-content: center; padding: 10px 6px; font-size: 14px; min-height: 48px; }
  .footer-nav a[href^="tel:"] { grid-column: 1 / -1; }
  .socials { gap: 16px; flex-wrap: wrap; justify-content: center; }
  .social { width: 52px; height: 52px; }
  dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); padding: 20px 16px; border-radius: 14px; overscroll-behavior: contain; }
  #contact-dialog { padding-top: 0; scroll-padding-top: 76px; }
  #contact-dialog .dialog-head { position: sticky; top: 0; z-index: 2; background: var(--bg); padding-block: 14px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
  .dialog-head h2 { font-size: 24px; }
  .dialog-note { font-size: 14px; line-height: 1.9; margin-bottom: 16px; }
  .form-grid { gap: 14px; }
  .form-grid input, .form-grid textarea, .form-grid select { font-size: 16px; min-height: 48px; scroll-margin-block: 80px 24px; }
  .form-grid .button { width: 100%; min-height: 48px; justify-content: center; }
  .project-pagination { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); }
  .project-pagination button { padding-inline: 6px; font-size: 12px; white-space: normal; }
  .project-window-bar, .case-bar { gap: 8px; padding: 10px 12px; }
  .project-window-bar > span, .case-bar-title { min-width: 0; font-size: 12px; }
  .project-intro { padding: 20px 16px; }
  .project-window-bottom { padding: 20px 16px; }
  .project-window-bottom .button { width: 100%; justify-content: center; }
  .case-study .container { width: calc(100% - 32px); }
  .case-study .cs-title { font-size: clamp(28px,8vw,40px); }
  .case-study .g2, .case-study .g3 { grid-template-columns: minmax(0,1fr); }
  .lightbox { padding: 12px; }
  .lightbox-tools { gap: 10px; }
}
@media (max-width: 359px) {
  .container { width: calc(100% - 32px); }
  .hero-actions { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .hero-disciplines { font-size: 11px; }
  .lightbox-tools { display: grid; justify-content: stretch; }
  .gallery-nav { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Flowsee responsive refinement */
@media (max-width:649px) {
  .hero { display:flex; flex-direction:column; align-items:stretch; gap:18px; }
  .hero-art { display:contents; }
  .hero-art > .art-stage { display:grid; order:-2; width:min(100%,300px); margin-inline:auto; }
  .hero-art > figcaption { display:flex; order:-1; width:100%; }
  .hero-copy { order:0; max-width:none; }
  .portfolio-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .portfolio-grid .featured-project { grid-column:1/-1; }
  .portfolio-grid > .project-card:not(.featured-project) { min-width:0; border-radius:12px; }
  .portfolio-grid > .project-card:not(.featured-project) .project-copy { min-width:0; gap:8px; padding:12px; }
  .portfolio-grid > .project-card:not(.featured-project) .project-name { font-size:17px; line-height:1.6; }
  .portfolio-grid > .project-card:not(.featured-project) .project-description { font-size:11px; line-height:1.6; }
  .portfolio-grid > .project-card:not(.featured-project) .project-arrow { width:32px; height:32px; font-size:19px; }
  .featured-project .project-copy { padding:16px; }
  .featured-project .project-name { font-size:clamp(20px,5.2vw,25px); line-height:1.55; }
  .featured-project .project-description { font-size:12px; margin-top:4px; }
  .portfolio-grid > .featured-project .project-copy .project-action { display:none!important; }
  .case-dialog { position:fixed; inset:0; width:100vw; max-width:none; height:100dvh; max-height:100dvh; margin:0; padding:0; border:0; border-radius:0; }
  .case-dialog::backdrop { background:rgba(9,12,20,.7); backdrop-filter:blur(8px); }
  .case-bar { min-height:58px; padding:10px 16px; }
  .case-bar-title { min-width:0; font-size:13px; }
  .case-scroll { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; scroll-behavior:smooth; }
  .case-study .cs-hero { padding-block:28px 24px; }
  .case-study .cs-lead, .case-study .cs-head p, .case-study .trio p, .case-study .steps p { text-align:justify; text-justify:inter-word; }
  .case-study .cs-hero .meta { gap:12px 20px; }
  .case-study .cs-hero .meta li { min-width:calc(50% - 12px); }
  .case-study .cs-sec > .container { padding-block:30px; }
  .case-study .cover img { max-height:56vh; object-fit:cover; }
  .case-study .fig-grid { gap:12px; }
  .case-study .case-cta, .case-study .cs-cta, .case-study a.button, .case-study .cs-hero .button, .case-study .cs-head + .button { width:100%; justify-content:center; }
  .about .about-panel { position:relative; display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto; align-content:start; align-items:start; gap:20px; isolation:isolate; overflow:hidden; height:auto; min-height:0; padding:28px 20px; border:1px solid color-mix(in srgb,var(--blue) 24%,var(--border)); border-radius:16px; background:linear-gradient(145deg,var(--fg),#222 75%); color:var(--bg); box-shadow:0 16px 44px oklch(from var(--fg) l c h / .12); }
  .about .about-panel::before { content:"F"; position:absolute; z-index:-1; inset:auto auto -45px -6px; color:oklch(from var(--bg) l c h / .05); font:700 220px/1 Montserrat,sans-serif; pointer-events:none; }
  .about .about-panel > .about-lead { grid-area:1/1/2/2; position:relative; min-width:0; height:auto; min-height:0; align-self:start; }
  .about .about-panel > .about-values { grid-area:2/1/3/2; position:relative; display:grid; gap:0; width:100%; height:auto; min-height:0; margin:0; padding:0; list-style:none; align-self:start; }
  .about .about-lead .eyebrow, .about .about-lead h2 { color:var(--bg); }
  .about .about-lead h2 { max-width:none; font-size:28px; line-height:1.55; text-wrap:balance; }
  .about .about-lead p { color:oklch(from var(--bg) l c h / .78); font-size:14px; line-height:1.95; text-align:justify; text-justify:inter-word; }
  .about .about-lead .about-consultation { margin-top:18px; }
  .about .about-values li { display:grid; grid-template-columns:30px minmax(0,1fr); align-items:baseline; gap:4px 10px; min-height:0; padding:14px 0; border-top:1px solid oklch(from var(--bg) l c h / .16); }
  .about .about-values .n { grid-row:span 2; color:var(--accent); }
  .about .about-values b { color:var(--bg); font-size:16px; }
  .about .about-values li>span:last-child { grid-column:2; color:oklch(from var(--bg) l c h / .72); font-size:13px; line-height:1.8; }
  .footer-inner { align-items:center; }
  .footer-brand { align-self:center; width:36px; flex:0 0 36px; margin-inline:auto; }
  .footer-brand img, .site-footer .footer-brand img { display:block; width:36px; height:auto; }
  .footer-nav { width:100%; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); justify-items:stretch; }
  .footer-nav a { justify-content:center; }
  .socials { width:100%; max-width:340px; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:12px; margin-inline:auto; }
  .socials .social { flex:0 0 58px; }
}
@media (min-width:650px) { .about-lead p { text-align:justify; text-justify:inter-word; } }
.case-dialog[open] { animation:case-dialog-arrive .38s cubic-bezier(.2,.8,.2,1) both; }
@keyframes case-dialog-arrive { from { opacity:0; transform:translateY(22px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
@media (prefers-reduced-motion:reduce) { .case-dialog[open] { animation:none!important; } }
@media (max-width:649px) {
  .service-list .service-row { grid-template-columns:minmax(0,1fr) 30px; min-height:126px; height:100%; gap:8px; padding:14px 12px; }
  .service-list .service-row .service-icon, .service-list .service-row .service-num { display:none; }
  .service-list .service-row .service-name { grid-column:1; min-width:0; }
  .service-list .service-row .service-title { font-size:clamp(15px,4vw,18px); line-height:1.55; }
  .service-list .service-row .service-category { font-size:11px; line-height:1.7; }
  .service-list .service-row .service-arrow { grid-column:2; width:30px; height:30px; }
  .portfolio-grid .featured-project { position:relative; display:flex; flex-direction:column; min-height:0; }
  .portfolio-grid .featured-project::after { display:none; }
  .portfolio-grid .featured-project .project-visual { position:relative; inset:auto; aspect-ratio:16/9; min-height:0; }
  .portfolio-grid .featured-project .project-image { position:static; width:100%; height:100%; object-fit:cover; }
  .portfolio-grid .featured-project .project-copy { width:100%; min-height:0; margin:0; padding:16px; background:#fff; color:#191919; }
}
@media (max-width:359px) {
  .service-list .service-row { min-height:118px; padding:12px 9px; }
}

@media (max-width:649px) {
  .socials .social { width:44px; height:44px; flex:0 0 44px; border-radius:50%; }
  .socials .social-glyph { top:7px; left:7px; height:28px; }
}

@media(max-width:649px){
  .about .about-panel::before{content:none}
  .about .about-panel>.about-mark{inset-inline-end:-10px;inset-block-end:-22px;width:min(245px,64vw);opacity:.64}
}

/* Compact mobile project cards and keep the about artwork apart. */
@media (max-width: 649px) {
  .portfolio-grid { align-items: start; }
  .portfolio-grid > .project-card:not(.featured-project) { height: auto; align-self: start; }
  .portfolio-grid > .project-card:not(.featured-project) .project-visual { flex: 0 0 auto; aspect-ratio: 16 / 9; }
  .portfolio-grid > .project-card:not(.featured-project) .project-image { display: block; width: 100%; height: 100%; object-fit: cover; }
  .portfolio-grid > .project-card:not(.featured-project) .project-copy { flex: 0 0 auto; min-height: 0; padding: 10px 12px; justify-content: center; }
  .portfolio-grid > .project-card:not(.featured-project) .project-name { font-size: clamp(14px, 4.4vw, 17px); line-height: 1.45; letter-spacing: 0; text-wrap: balance; }
  .portfolio-grid .featured-project .project-copy { gap: 8px; padding: 14px; }
  .portfolio-grid .featured-project .project-name { letter-spacing: 0; }
  .portfolio-grid .featured-project .project-description { margin-top: 0; line-height: 1.75; }

  .about .about-panel { position: relative; isolation: isolate; overflow: hidden; }
  .about .about-panel::after {
    z-index: 0;
    inset-block-start: -142px;
    inset-inline-start: -150px;
    width: 238px;
    height: 238px;
    opacity: .13;
    animation: about-orbit-mobile 10s ease-in-out infinite alternate;
  }
  .about .about-panel > .about-mark {
    z-index: 0;
    inset-inline-end: -36px;
    inset-block-end: -30px;
    width: min(184px, 52vw);
    opacity: .09 !important;
    animation: about-mark-mobile 13s ease-in-out infinite alternate;
  }
  .about .about-lead { position: relative; z-index: 1; }
  .about .about-lead p { letter-spacing: 0; word-spacing: normal; text-align: justify; text-justify: inter-word; }
  @keyframes about-orbit-mobile { from { transform: translateY(0) scale(1); } to { transform: translateY(5px) scale(1.025); } }
  @keyframes about-mark-mobile { from { transform: translateY(0); } to { transform: translateY(-4px); } }

  .service-grid .service-card { min-height: 0; }
  .service-grid .service-icon {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #ff702d, #fe5400);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .34), 0 4px 10px rgb(254 84 0 / .2);
  }
  .service-grid .service-icon::after {
    content: "";
    position: absolute;
    inset: 1px;
    border: 1px solid rgb(255 255 255 / .18);
    border-radius: inherit;
    pointer-events: none;
  }
  .service-grid .service-icon svg { position: relative; z-index: 1; stroke-width: 1.9; }
}

@media (max-width: 420px) {
  .service-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .service-grid .service-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 3px;
    padding: 13px 15px;
  }
  .service-grid .service-top { display: contents; }
  .service-grid .service-icon { grid-column: 1; grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 12px; }
  .service-grid .service-icon svg { width: 21px; height: 21px; }
  .service-grid .service-title { grid-column: 2; grid-row: 1; font-size: clamp(15px, 4.5vw, 17px); line-height: 1.5; }
  .service-grid .service-description { grid-column: 2; grid-row: 2; padding: 0; font-size: 12px; line-height: 1.7; }
}

@media (min-width: 421px) and (max-width: 649px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .service-grid .service-card { padding: 12px; gap: 8px; }
  .service-grid .service-top { gap: 9px; align-items: flex-start; }
  .service-grid .service-icon { width: 36px; height: 36px; border-radius: 10px; }
  .service-grid .service-icon svg { width: 19px; height: 19px; }
  .service-grid .service-title { font-size: clamp(14px, 3.7vw, 16px); line-height: 1.5; }
  .service-grid .service-description { padding-inline-start: 45px; font-size: 12px; line-height: 1.7; }
}

.about .about-lead p { letter-spacing: 0; }
.site-footer .footer-brand img { transition: filter .28s ease, transform .28s ease; }
.site-footer .footer-brand:hover img,
.site-footer .footer-brand:active img,
.site-footer .footer-brand:focus-visible img {
  filter: brightness(0) saturate(100%) invert(37%) sepia(94%) saturate(4438%) hue-rotate(2deg) brightness(103%) contrast(104%);
  transform: scale(1.06);
}


/* Dark-mode-only contrast refinements requested for the landing page. */
:root[data-theme="dark"] .art-stage::before {
  background:#292929;
  box-shadow:inset 0 0 34px rgba(255,255,255,.035),0 18px 50px rgba(0,0,0,.35);
}
:root[data-theme="dark"] .hero-logo-glass {
  filter:brightness(.78) saturate(.84) drop-shadow(0 22px 16px oklch(from var(--blue) l c h/.16));
}
:root[data-theme="dark"] .featured-project .project-copy {
  background:#242424;
  color:var(--fg);
}
:root[data-theme="dark"] .featured-project .project-category,
:root[data-theme="dark"] .featured-project .project-description { color:var(--muted); }
:root[data-theme="dark"] .featured-project .project-name,
:root[data-theme="dark"] .featured-project .project-action { color:var(--fg); }
:root[data-theme="dark"] .featured-project .project-action { border-color:var(--border); }
:root[data-theme="dark"] .about .about-panel {
  background:linear-gradient(145deg,#252525,#1f1f1f 75%);
  color:var(--fg);
  border-color:var(--border);
  box-shadow:0 16px 44px rgba(0,0,0,.28);
}
:root[data-theme="dark"] .about .about-panel .eyebrow,
:root[data-theme="dark"] .about .about-panel h2,
:root[data-theme="dark"] .about .about-panel b { color:var(--fg); }
:root[data-theme="dark"] .about .about-panel p,
:root[data-theme="dark"] .about .about-panel li>span:last-child { color:var(--muted); }
:root[data-theme="dark"] .about .about-panel>.about-mark { filter:brightness(.55) saturate(.7); opacity:.07!important; }
:root[data-theme="dark"] .featured-project .project-copy { background:#242424; color:var(--fg); }
:root[data-theme="light"] .portfolio-grid .featured-project { background:#fff; }
:root[data-theme="light"] .portfolio-grid .featured-project::after { background:linear-gradient(90deg,transparent 32%,rgba(255,255,255,.74) 51%,#fff 76%); }
:root[data-theme="light"] .portfolio-grid .featured-project .project-copy { background:#fff; color:#191919; }
:root[data-theme="light"] .portfolio-grid .featured-project .project-name { color:#191919; }
:root[data-theme="light"] .portfolio-grid .featured-project .project-description { color:#555; }
:root[data-theme="light"] .portfolio-grid .featured-project .project-category { color:#555; }
:root[data-theme="dark"] .portfolio-grid .featured-project::after { background:linear-gradient(90deg,transparent 32%,rgba(18,18,18,.48) 51%,#191919 76%); }
:root[data-theme="dark"] .site-footer {
  background:#1a1a1a;
  color:var(--fg);
  border-top:1px solid var(--border);
}

/* Requested mobile refinements and interactive service details. */
@media (max-width:649px) {
  #portfolio .section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:8px; }
  #portfolio .section-heading>div { min-width:0; }
  #portfolio .section-heading .eyebrow { font-size:10px; margin-bottom:2px; }
  #portfolio .section-heading h2 { font-size:clamp(17px,4.8vw,22px); line-height:1.5; white-space:nowrap; }
  #portfolio .portfolio-view-all { min-height:34px; flex:0 0 auto; gap:4px; padding:5px 9px; font-size:11px; }
  #portfolio .portfolio-view-all svg { width:14px; height:14px; }
  .about .about-lead h2 { font-size:clamp(24px,6vw,30px); line-height:1.7; }
}
.theme-toggle { border:0!important; border-radius:0!important; background:transparent!important; }
.theme-toggle:hover { background:transparent!important; }
.about .about-lead h2 { font-size:clamp(28px,2.7vw,36px); }
.about .about-lead p { text-align:justify; text-justify:inter-word; }
.service-grid .service-card { cursor:pointer; }
.service-grid .service-card:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.service-grid .service-icon {
  position:relative; isolation:isolate; overflow:visible;
  background:linear-gradient(145deg,rgba(255,255,255,.48),rgba(254,84,0,.78) 42%,rgba(130,39,0,.94));
  border:1px solid rgba(255,255,255,.58);
  box-shadow:inset 0 1px 2px rgba(255,255,255,.65),inset 0 -5px 10px rgba(90,27,0,.26),0 7px 15px rgba(254,84,0,.22);
}
.service-grid .service-icon::before { content:"";position:absolute;inset:-35% 28% 36% -18%;z-index:-1;border-radius:50%;background:rgba(255,255,255,.5);filter:blur(7px);transform:rotate(-24deg); }
.service-grid .service-icon::after { content:"";position:absolute;inset:1px;border:1px solid rgba(255,255,255,.42);border-radius:inherit;pointer-events:none;background:linear-gradient(140deg,rgba(255,255,255,.23),transparent 44%); }
.service-grid .service-icon svg { position:relative;z-index:1;filter:drop-shadow(0 1px 2px rgba(70,22,0,.32)); }
.service-dialog { width:min(540px,calc(100% - 32px)); }
.service-dialog-description { color:var(--muted);margin:0 0 22px; }
.service-dialog h3 { margin:0 0 10px;font-size:18px; }
.service-dialog-items { display:grid;gap:8px;margin:0 0 24px;padding-inline-start:22px;color:var(--muted); }
.service-dialog-items li::marker { color:var(--accent); }
.site-footer .social img { object-fit:contain; }
.site-footer .social-map img { width:28px;height:28px; }
.site-footer .social-balad img { width:30px;height:30px;border-radius:7px; }
.footer-social-links img { display:block; width:28px; height:28px; object-fit:contain; }
:root[data-theme="dark"] .site-footer .footer-nav a { color:var(--muted); }
:root[data-theme="dark"] .site-footer .footer-nav a:hover { color:var(--fg); }

/* Keep the featured outline consistent with the rest of the portfolio. */
.portfolio-grid > .featured-project,
.portfolio-grid > .featured-project:hover { border-color:var(--border)!important; }

/* Additional work stays browseable as the portfolio grows. */
.project-carousel { grid-column:1/-1; min-width:0; }
.project-carousel-controls { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:4px 0 12px; color:var(--muted); font-size:14px; }
.project-carousel-controls>div { display:flex; gap:6px; }
.project-carousel-controls button { display:grid; place-items:center; width:40px; height:36px; border:1px solid var(--border); border-radius:11px; background:var(--bg); color:var(--fg); cursor:pointer; transition:border-color .2s,background-color .2s,color .2s; }
.project-carousel-controls button svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.project-carousel-controls button:hover:not(:disabled) { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 8%,var(--bg)); color:var(--accent); }
.project-carousel-controls button:disabled { opacity:.4; cursor:default; }
.project-carousel-track { display:grid; grid-auto-flow:column; grid-auto-columns:calc(33.333333% - 9.333333px); grid-template-rows:1fr; gap:14px; overflow-x:auto; overscroll-behavior-inline:contain; scroll-snap-type:x mandatory; scrollbar-width:none; padding:2px 1px 8px; direction:rtl; touch-action:auto; }
.project-carousel-track::-webkit-scrollbar { display:none; }
.project-carousel-track>.project-card { min-width:0; scroll-snap-align:center; height:auto; display:flex; flex-direction:column; }
.project-carousel-track>.project-card .project-visual { flex:0 0 auto; aspect-ratio:16/9; }
.project-carousel-track>.project-card .project-image { display:block; width:100%; height:100%; object-fit:cover; }
.project-carousel-track>.project-card .project-copy { flex:1; min-height:72px; display:flex; flex-direction:column; justify-content:center; gap:3px; padding:12px 14px; text-align:right; }
.project-carousel-track>.project-card .project-category { font-size:12px; color:var(--muted); line-height:1.4; }
.project-carousel-track>.project-card .project-name { font-size:clamp(15px,1.8vw,19px); font-weight:600; line-height:1.45; }
@media(max-width:649px) {
  .project-carousel-track { display:flex; gap:10px; }
  .project-carousel-track>.project-card { flex:0 0 min(76vw,280px); }
  .project-carousel-track>.project-card .project-copy { min-height:58px; padding:10px 12px; gap:2px; }
  .project-carousel-track>.project-card .project-category { font-size:11px; }
  .project-carousel-track>.project-card .project-name { font-size:15px; }
}

/* Keep service icon corners clear and consistent. */
.service-grid .service-icon { overflow:visible!important; clip-path:none!important; -webkit-clip-path:none!important; border-radius:13px!important; background:#fe5400!important; border:0!important; box-shadow:0 4px 10px rgb(254 84 0/.18)!important; }
.service-grid .service-icon::before,.service-grid .service-icon::after { content:none!important; }
.service-grid .service-icon svg { position:relative;z-index:1;filter:none!important; }

@keyframes service-dialog-enter { from { opacity:0; transform:translateY(18px) scale(.97); } to { opacity:1; transform:translateY(0) scale(1); } }
.service-dialog[open] { animation:service-dialog-enter 240ms cubic-bezier(.2,.75,.25,1) both; }
@media(prefers-reduced-motion:reduce) { .service-dialog[open] { animation:none; } }

/* Center the footer into a simple brand, navigation, and contact stack. */
.site-footer .footer-inner { display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:22px;padding-block:42px; }
.site-footer .footer-brand { order:0;align-self:center;width:48px;height:48px;margin:0; }
.site-footer .footer-brand img { display:block;width:42px;height:auto; }
.site-footer .footer-nav { order:1;display:flex;width:auto;max-width:100%;flex-wrap:wrap;justify-content:center;gap:4px 16px;margin:0; }
.site-footer .footer-nav a { min-height:42px;padding:8px 12px;justify-content:center; }
.site-footer .socials { order:2;display:flex;width:auto;max-width:208px;flex:0 1 auto;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;margin:0 auto;direction:ltr; }
.site-footer .socials .social { width:44px;height:44px;flex:0 0 44px; }
.site-footer .socials .social img { width:22px;height:22px; }
@media(max-width:649px) {
  .site-footer .footer-inner { gap:16px;padding-block:30px; }
  .site-footer .footer-nav { width:auto;display:flex;flex-wrap:wrap;gap:2px 8px; }
  .site-footer .footer-nav a { min-height:40px;padding:6px 10px;font-size:14px; }
  .site-footer .socials { width:min(100%,206px);max-width:206px;display:flex;flex-wrap:wrap;gap:8px; }
  .site-footer .socials .social { width:44px;height:44px;flex:0 0 44px; }
}

/* Put the service identifier below its title and match the glass service marks. */
.service-dialog .dialog-head { display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:0 0 2px; }
.service-dialog .dialog-head h2 { flex:1; }
.service-dialog .close-dialog { width:32px;height:32px;flex:0 0 32px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--fg);box-shadow:none; }
.service-dialog .close-dialog:hover { background:color-mix(in srgb,var(--muted) 12%,transparent); }
.service-dialog .close-dialog .icon { width:18px;height:18px;filter:none; }
.service-dialog-kicker { gap:12px;margin:0 0 18px; }
.service-dialog-icon { position:relative;overflow:visible!important;clip-path:none!important;-webkit-clip-path:none!important;border:1px solid rgba(255,255,255,.55);background:linear-gradient(145deg,#ff8b47 0%,#fe5400 56%,#a93b0b 100%);box-shadow:inset 0 1px 1px rgba(255,255,255,.62),inset 0 -2px 3px rgba(88,29,0,.28),0 8px 18px rgba(254,84,0,.24); }
.service-dialog-icon::after { content:"";position:absolute;inset:1px;border:1px solid rgba(255,255,255,.3);border-radius:inherit;background:linear-gradient(140deg,rgba(255,255,255,.2),transparent 52%);pointer-events:none; }
.service-dialog-kicker b,.service-detail-number { display:none!important; }
.service-dialog-items li { grid-template-columns:minmax(0,1fr); }
.service-dialog [data-service-contact] { display:flex;width:100%;justify-content:center; }
.service-dialog-description { width:100%;max-width:none; }
.service-grid .service-description { white-space:normal;overflow-wrap:anywhere;word-break:normal; }
.service-grid .service-icon { position:relative;background:linear-gradient(145deg,#ff8b47 0%,#fe5400 56%,#a93b0b 100%)!important;border:1px solid rgba(255,255,255,.55)!important;box-shadow:inset 0 1px 1px rgba(255,255,255,.62),inset 0 -2px 3px rgba(88,29,0,.28),0 8px 18px rgba(254,84,0,.24)!important; }
.service-grid .service-icon::before { content:""!important;position:absolute;inset:5% 24% 45% 4%;z-index:0;border-radius:50%;background:linear-gradient(120deg,rgba(255,255,255,.48),rgba(255,255,255,0));filter:blur(5px); }
.service-grid .service-icon::after { content:""!important;position:absolute;inset:1px;z-index:2;border:1px solid rgba(255,255,255,.35);border-radius:inherit;background:linear-gradient(140deg,rgba(255,255,255,.18),transparent 50%);pointer-events:none; }
.service-grid .service-icon svg { z-index:1;filter:drop-shadow(0 1px 2px rgba(70,22,0,.3))!important; }
@media(max-width:649px) {
  .service-dialog .dialog-head { gap:12px; }
  .service-dialog .close-dialog { width:32px;height:32px;flex-basis:32px; }
  .service-dialog-description { width:100%;max-width:none; }
  .service-grid .service-description { white-space:normal;overflow-wrap:anywhere;word-break:normal;font-size:clamp(10px,2.8vw,12px);letter-spacing:-.02em; }
}

@media(max-width:649px) {
  .site-footer .socials { width:auto;max-width:min(100%,230px);display:flex;flex:0 1 auto;flex-wrap:wrap;justify-content:center;gap:12px;margin-inline:auto;direction:ltr; }
  .site-footer .socials .social { width:44px;height:44px;flex:0 0 44px; }
}

/* Give case studies a clearer editorial cover and more visual project details. */
.case-dialog { border-color:color-mix(in srgb,var(--accent) 18%,var(--border));background:var(--bg);box-shadow:0 32px 100px oklch(0% .01 250/.48); }
.case-bar { padding-inline:clamp(16px,3vw,36px);background:color-mix(in srgb,var(--bg) 88%,transparent); }
.case-bar-title { display:flex;align-items:center;gap:12px;color:var(--fg);font-weight:500; }
.case-bar-title::before { content:"";width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 5px color-mix(in srgb,var(--accent) 14%,transparent); }
.case-study .cs-hero.container { position:relative;isolation:isolate;overflow:hidden;display:grid;grid-template-columns:minmax(0,1.45fr) minmax(250px,.85fr);align-items:stretch;gap:clamp(24px,4vw,56px);width:min(1120px,calc(100% - 64px));margin:clamp(20px,4vw,40px) auto clamp(24px,4vw,40px);padding:clamp(28px,5vw,64px);border:1px solid color-mix(in srgb,var(--accent) 24%,var(--border));border-radius:24px;background:radial-gradient(circle at 8% 4%,color-mix(in srgb,var(--accent) 17%,transparent),transparent 26rem),radial-gradient(circle at 100% 100%,color-mix(in srgb,var(--blue) 13%,transparent),transparent 30rem),linear-gradient(140deg,var(--surface),var(--bg) 76%);box-shadow:0 24px 70px oklch(from var(--fg) l c h/.08); }
.case-study .cs-hero::before { content:"";position:absolute;z-index:-1;inset-inline-start:-170px;inset-block-end:-245px;width:390px;aspect-ratio:1;border:1px solid color-mix(in srgb,var(--accent) 24%,transparent);border-radius:50%;box-shadow:0 0 0 20px color-mix(in srgb,var(--accent) 5%,transparent),0 0 0 42px color-mix(in srgb,var(--blue) 5%,transparent);pointer-events:none; }
.case-study .cs-hero::after { content:"F";position:absolute;z-index:-1;inset-inline-start:24px;inset-block-start:-88px;color:color-mix(in srgb,var(--fg) 4%,transparent);font:700 clamp(190px,28vw,340px)/1 Arial,sans-serif;transform:rotate(-9deg);pointer-events:none; }
.case-study .case-intro-copy { position:relative;min-width:0;align-self:center; }
.case-study .case-intro-copy>.eyebrow { display:inline-flex;align-items:center;gap:9px;margin:0 0 16px;padding:6px 12px;border:1px solid color-mix(in srgb,var(--accent) 30%,transparent);border-radius:999px;background:color-mix(in srgb,var(--accent) 9%,transparent);color:var(--accent);font-size:12px; }
.case-study .case-intro-copy>.eyebrow::before { content:"";width:6px;height:6px;border-radius:50%;background:var(--accent);box-shadow:0 0 12px color-mix(in srgb,var(--accent) 60%,transparent); }
.case-study .cs-title { max-width:17ch;font-size:clamp(34px,5vw,62px);line-height:1.42;letter-spacing:-.02em;text-wrap:balance; }
.case-study .cs-lead { max-width:58ch;margin-top:16px;color:var(--muted);font-size:clamp(15px,1.5vw,18px);line-height:2;text-wrap:pretty; }
.case-study .meta { display:grid;grid-template-columns:minmax(0,1fr);align-content:center;gap:10px;margin:0;padding:0;border:0; }
.case-study .meta li { display:grid;grid-template-columns:minmax(62px,.42fr) minmax(0,1fr);align-items:center;gap:8px 14px;min-width:0;padding:13px 15px;border:1px solid color-mix(in srgb,var(--border) 76%,transparent);border-radius:14px;background:color-mix(in srgb,var(--surface) 72%,transparent); }
.case-study .meta .k { color:var(--muted);font-size:12px; }
.case-study .meta .v { min-width:0;color:var(--fg);font:500 13px/1.8 var(--body); }
.case-study .cover { width:min(1120px,calc(100% - 64px));margin:0 auto;border:1px solid var(--border);border-radius:20px;overflow:hidden;background:var(--surface);box-shadow:0 24px 64px oklch(from var(--fg) l c h/.12); }
.case-study .cover img { display:block;width:100%;max-height:min(72vh,760px);object-fit:contain;background:var(--surface); }
.case-study .cover figcaption { padding:13px 18px;background:color-mix(in srgb,var(--surface) 90%,var(--bg));color:var(--muted); }
.case-study .cs-sec>.container { padding-block:clamp(32px,5vw,56px); }
.case-study .cs-head { max-width:780px;margin-bottom:30px; }
.case-study .cs-head>.eyebrow { width:max-content;max-width:100%;margin-bottom:4px;padding:5px 11px;border:1px solid color-mix(in srgb,var(--accent) 22%,transparent);border-radius:999px;background:color-mix(in srgb,var(--accent) 8%,transparent);color:var(--accent);font-size:12px; }
.case-study .cs-head .idx { display:inline-grid;place-items:center;min-width:23px;height:23px;margin-inline-end:4px;border-radius:50%;background:var(--accent);color:var(--on-accent,oklch(23% .05 42));font:700 10px/1 Arial,sans-serif; }
.case-study .trio { gap:14px; }
.case-study .trio article { gap:10px;padding:20px;border:1px solid var(--border);border-top:2px solid var(--accent);border-radius:16px;background:linear-gradient(145deg,color-mix(in srgb,var(--surface) 88%,transparent),var(--bg)); }
.case-study .steps { gap:12px;margin-top:32px; }
.case-study .steps li { gap:8px;padding:20px;border:1px solid var(--border);border-radius:16px;background:var(--surface); }
.case-study .steps .n { display:grid;place-items:center;width:34px;height:34px;border:1px solid color-mix(in srgb,var(--accent) 32%,transparent);border-radius:11px;background:color-mix(in srgb,var(--accent) 10%,transparent);font:700 12px/1 Arial,sans-serif; }
.case-study .fig { border-radius:16px;box-shadow:0 12px 32px oklch(from var(--fg) l c h/.07); }
.case-study .palette .sw { height:100px;border-radius:14px; }
.case-study .cs-cta { position:relative;isolation:isolate;overflow:hidden;grid-template-columns:minmax(0,1fr) auto;margin-block:32px 48px;padding:clamp(24px,4vw,48px);border:1px solid color-mix(in srgb,var(--accent) 25%,var(--border));border-radius:22px;background:radial-gradient(circle at 100% 0,color-mix(in srgb,var(--accent) 12%,transparent),transparent 22rem),var(--surface); }
.case-study .cs-cta::after { content:"";position:absolute;z-index:-1;inset-inline-start:-72px;inset-block-end:-132px;width:220px;aspect-ratio:1;border:1px solid color-mix(in srgb,var(--accent) 24%,transparent);border-radius:50%;box-shadow:0 0 0 18px color-mix(in srgb,var(--accent) 4%,transparent); }
@media(max-width:899px) {
  .case-study .cs-hero.container { grid-template-columns:minmax(0,1fr);gap:24px; }
  .case-study .meta { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .case-study .meta li { grid-template-columns:minmax(0,1fr);gap:4px; }
}
@media(max-width:649px) {
  .case-study .cs-hero.container { width:calc(100% - 32px);margin-block:16px 20px;padding:26px 20px;border-radius:20px; }
  .case-study .cs-title { font-size:clamp(30px,8vw,40px); }
  .case-study .cs-lead { margin-top:12px;font-size:14px; }
  .case-study .meta { grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
  .case-study .meta li { grid-template-columns:minmax(0,1fr);gap:4px;min-width:0;padding:11px;border-radius:12px; }
  .case-study .meta li:last-child { grid-column:1/-1; }
  .case-study .meta .v { font-size:12px; }
  .case-study .cover { width:calc(100% - 24px);border-radius:16px; }
  .case-study .cover img { max-height:58vh; }
  .case-study .cs-cta { gap:20px;margin-block:20px 32px;border-radius:18px; }
}
@media(prefers-reduced-motion:reduce) { .case-dialog[open] .cs-hero,.case-dialog[open] .cover { animation:none!important; } }

/* Mobile case-study details: keep process cards side by side and give data cards real glass depth. */
.case-study .meta li,
.case-study .steps li,
.case-study .trio article {
  -webkit-backdrop-filter:blur(16px) saturate(1.25);
  backdrop-filter:blur(16px) saturate(1.25);
  background:color-mix(in srgb,var(--surface) 48%,transparent);
  box-shadow:inset 0 1px 0 color-mix(in srgb,var(--fg) 8%,transparent),0 10px 28px oklch(from var(--fg) l c h/.045);
}
.case-study .cs-head .idx,
.case-study .steps .n {
  font-family:IRANSansX,sans-serif;
}
.case-study .cs-head .idx { color:#fff; }
@media(max-width:649px) {
  .case-study .steps { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .case-study .steps li { min-width:0;padding:14px 12px;border-radius:14px; }
  .case-study .steps .n { width:32px;height:32px;font-size:12px; }
}

/* Footer columns remain balanced when the viewport is too narrow for one row. */
.site-footer .footer-inner { grid-template-columns:auto minmax(0,1fr) minmax(384px,auto); gap:24px; }
.site-footer .footer-brand { grid-area:1 / 1; }
.site-footer .footer-nav { grid-area:1 / 2; width:auto; flex-wrap:nowrap; gap:8px clamp(12px,2vw,24px); }
.site-footer .socials { grid-area:1 / 3; width:max-content; max-width:none; flex-wrap:nowrap; gap:8px; justify-self:start; }
.site-footer .social { width:44px; height:44px; flex:0 0 44px; background:transparent!important; box-shadow:none!important; border-color:color-mix(in srgb,var(--muted) 40%,transparent)!important; }
.site-footer .social:hover { background:color-mix(in srgb,var(--accent) 10%,transparent)!important; border-color:var(--accent)!important; }
.site-footer .social img { width:22px; height:22px; }
@media(min-width:650px) and (max-width:899px) {
  .site-footer .footer-inner { grid-template-columns:auto minmax(0,1fr); grid-template-rows:auto auto; gap:16px 24px; }
  .site-footer .footer-brand { grid-area:1 / 1; }
  .site-footer .footer-nav { grid-area:1 / 2; justify-self:start; flex-wrap:wrap; }
  .site-footer .socials { grid-area:2 / 1 / 3 / 3; justify-self:center; }
}
@media(max-width:649px) {
  .site-footer .footer-inner { grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto auto; justify-items:center; gap:14px; }
  .site-footer .footer-brand { grid-area:1 / 1; }
  .site-footer .footer-nav { grid-area:2 / 1; width:min(100%,420px); flex-wrap:wrap; justify-self:center; gap:4px 14px; }
  .site-footer .socials { grid-area:3 / 1; width:auto;max-width:min(100%,230px);justify-self:center;display:flex;flex-wrap:wrap;justify-content:center;gap:12px; }
}

/* A graphic, numbered service detail dialog. */
.service-dialog { width:min(620px,calc(100% - 32px)); padding:clamp(24px,5vw,42px); overflow:hidden; border:1px solid var(--border); border-radius:24px; background:radial-gradient(circle at 100% 0,color-mix(in srgb,var(--accent) 13%,var(--bg)) 0,transparent 36%),var(--bg); box-shadow:0 28px 90px rgb(0 0 0/.24); }
.service-dialog::before { content:"";position:absolute;inset:auto auto -98px -72px;width:220px;height:220px;border:1px solid color-mix(in srgb,var(--accent) 22%,transparent);border-radius:50%;box-shadow:0 0 0 18px color-mix(in srgb,var(--accent) 4%,transparent),0 0 0 38px color-mix(in srgb,var(--accent) 3%,transparent);pointer-events:none; }
.service-dialog-kicker { display:flex;align-items:center;gap:12px;margin:0 64px 18px 0;color:var(--muted);font:600 10px/1.4 Arial,sans-serif;letter-spacing:.16em;direction:ltr; }
.service-dialog-kicker>span:last-child { display:flex;align-items:center;gap:9px; }
.service-dialog-kicker i { width:4px;height:4px;border-radius:50%;background:var(--accent); }
.service-dialog-kicker b { color:var(--accent);font-weight:700; }
.service-dialog-icon { display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:var(--accent);color:#fff;box-shadow:0 8px 20px color-mix(in srgb,var(--accent) 24%,transparent); }
.service-dialog-icon svg { width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
.service-dialog .dialog-head { position:relative;z-index:1;margin-bottom:8px; }
.service-dialog .dialog-head h2 { font-size:clamp(25px,4vw,34px);line-height:1.55; }
.service-dialog-description { position:relative;z-index:1;max-width:48ch;margin:0 0 22px;color:var(--muted);font-size:16px; }
.service-dialog-items { position:relative;z-index:1;display:grid;gap:9px;margin:0 0 24px;padding:0;list-style:none; }
.service-dialog-items li { display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:12px;min-height:52px;padding:7px 12px;border:1px solid var(--border);border-radius:14px;background:color-mix(in srgb,var(--surface) 72%,transparent); }
.service-detail-number { display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:color-mix(in srgb,var(--accent) 11%,var(--bg));color:var(--accent);font:700 12px/1 Arial,sans-serif; }
.service-detail-label { color:var(--fg);font-size:14px; }
.service-dialog [data-service-contact] { position:relative;z-index:1; }
@media(max-width:649px) { .service-dialog { padding:24px 20px; } .service-dialog-description { font-size:14px; } .service-dialog-items li { min-height:48px; } }
@media(prefers-reduced-motion:reduce) { .service-dialog[open] { animation:none; } }

/* Keep each service detail on a full-width row after the number badges are removed. */
.service-dialog .service-dialog-items { display:flex!important;flex-direction:column;width:100%; }
.service-dialog .service-dialog-items li { display:flex!important;align-items:center;width:100%;min-width:0;box-sizing:border-box; }
.service-dialog .service-dialog-items li>.service-detail-label { display:block;flex:1 1 auto;width:auto!important;min-width:0;text-align:right;white-space:normal;overflow-wrap:anywhere; }

/* Keep metadata cards independent and let section copy use the full width. */
.case-study .cs-hero.container { background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.case-study .meta { background: transparent; border: 0; box-shadow: none; }
.case-study .meta li { -webkit-backdrop-filter: blur(16px) saturate(1.25); backdrop-filter: blur(16px) saturate(1.25); background: color-mix(in srgb, var(--surface) 48%, transparent); border: 1px solid color-mix(in srgb, var(--border) 76%, transparent); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--fg) 8%, transparent), 0 10px 28px oklch(from var(--fg) l c h / .045); }
.case-study .cs-head,
.case-study .cs-head p,
.case-study .cs-head .rich-content { width: 100%; max-width: none; }
.case-study .fig,
.case-study .fig:hover,
.case-study .band,
.case-study .band:hover { cursor: default; border-color: transparent; box-shadow: none; transform: none; transition: none; }
.case-study .fig img,
.case-study .band img { transform: none; transition: none; }

@media (max-width: 649px) {
  .portfolio-grid .featured-project .project-visual { min-height: 0; aspect-ratio: 16 / 9; }
  .portfolio-grid .featured-project .project-copy { min-height: 0; padding: 16px; }
}

/* Keep the original featured landscape card; remove only the image blur. */
.portfolio-grid .featured-project::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
