body:has(.agency-home) {
    --ink: #0a204b;
    --text: #33486d;
    --paper: #faf9f7;
    --line: #dce3ef;
    --max: 1320px;
    background: var(--paper);
}
body:has(.agency-home) .wrap { width: min(var(--max), calc(100% - 72px)); }
body:has(.agency-home) .site-header { background: #fafbfc; }
body:has(.agency-home) .header-inner { min-height: 76px; }
body:has(.agency-home) .brand-logo { width: 42px; height: 42px; box-shadow: none; }
body:has(.agency-home) .site-footer { background: radial-gradient(ellipse at 85% 120%, #103871, transparent 55%), #081d41; }
body:has(.agency-home) .footer-grid { grid-template-columns: 1.15fr 1.65fr 1fr; gap: 30px; }
body:has(.agency-home) .footer-nav, body:has(.agency-home) .footer-nav ul { display: flex; flex-wrap: wrap; gap: 0 18px; }
body:has(.agency-home) .footer-bottom { border-color: #ffffff28; }

.agency-home {
    --blue: #0754e5;
    --soft-blue: #e7efff;
    --card-border: #e2e7f0;
    --card-shadow: 0 4px 14px #10244812;
    padding-block-end: clamp(28px, 4vw, 54px);
}
.agency-home h2 { font-size: clamp(1.75rem, 3.1vw, 2.8rem); font-weight: 750; }
.agency-home h3 { font-weight: 700; }
.agency-home .agency-section { margin-block-start: clamp(32px, 4vw, 58px); scroll-margin-top: 28px; }
.agency-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    color: #0848bd;
    background: var(--soft-blue);
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.4;
    margin-block-end: 12px;
}
.agency-tag::before { content: ''; flex: 0 0 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.agency-hero { position: relative; isolation: isolate; overflow: hidden; background: #f3f3f1; }
.agency-hero-photo { position: absolute; z-index: -1; inset-block: 0; inset-inline-end: 0; width: 69%; }
.agency-hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; object-position: center; }
.agency-hero-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #f3f3f1, #f3f3f1ed 12%, #f3f3f100 61%); }
.rtl .agency-hero-photo img { transform: scaleX(-1); }
.rtl .agency-hero-photo::after { transform: scaleX(-1); }
.agency-hero-inner { padding-block: clamp(34px, 4.1vw, 66px) 28px; }
.agency-hero h1 { max-width: 700px; width: 59%; font-size: clamp(2.5rem, 4.6vw, 4.65rem); line-height: 1.025; font-weight: 750; letter-spacing: -.055em; }
.rtl .agency-hero h1 { line-height: 1.26; letter-spacing: -.025em; }
.agency-lead { margin-block-start: 18px; max-width: 445px; width: 56%; font-size: clamp(.98rem, 1.45vw, 1.24rem); line-height: 1.6; }
.agency-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin-block-start: 22px; }
.agency-home .button, .agency-outline { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; font-size: .86rem; font-weight: 700; text-align: center; border-radius: 999px; padding: 9px 18px; }
.agency-outline { border: 1px solid #798eb0; color: var(--ink); background: #ffffff74; }
.agency-outline:hover { background: #e7efff; border-color: var(--blue); }
.agency-founder-link { display: inline-flex; align-items: center; gap: 10px; margin-block-start: 24px; padding: 6px 13px 6px 6px; max-width: 100%; border: 1px solid #fff; border-radius: 12px; background: #fffefaec; box-shadow: 0 4px 12px #0a204b12; }
.agency-founder-link:hover { border-color: #95b9fc; }
.agency-founder-link img { width: 41px; height: 41px; object-fit: cover; border-radius: 8px; }
.agency-founder-link strong, .agency-founder-link small { display: block; line-height: 1.4; }
.agency-founder-link strong { font-size: .84rem; }
.agency-founder-link small { color: var(--text); font-size: .72rem; }
.agency-founder-link > svg { margin-inline-start: 4px; }
.agency-values { display: flex; align-items: center; justify-content: center; gap: 0; margin: 0; padding: 12px 20px; list-style: none; background: #ededf0; }
.agency-values li { display: flex; align-items: center; justify-content: center; gap: 12px; padding-inline: clamp(18px, 4.2vw, 68px); font-weight: 700; font-size: .83rem; }
.agency-values li + li { border-inline-start: 1px solid #b8c5db; }
.agency-values svg { width: 20px; height: 20px; flex: 0 0 20px; }
.agency-services, .agency-work { display: grid; align-items: center; gap: 18px; }
.agency-services { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); }
.agency-work { grid-template-columns: minmax(0, .65fr) minmax(0, 2.2fr); }
.agency-section-intro { padding-inline-end: clamp(0px, 1vw, 14px); }
.agency-section-intro > p:not(.agency-tag) { margin-block-start: 12px; line-height: 1.6; max-width: 36ch; }
.agency-section-intro > a { margin-block-start: 15px; }
.agency-text-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: .85rem; font-weight: 700; }
.agency-text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.agency-service-grid, .agency-featured-grid, .agency-project-grid { display: grid; gap: 14px; }
.agency-service-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.agency-service-card { background: #fff; border: 1px solid var(--card-border); border-radius: 13px; overflow: hidden; box-shadow: var(--card-shadow); }
.agency-service-card:hover, .agency-project-card:hover { border-color: #89abef; }
.agency-service-card img { display: block; object-fit: cover; width: 100%; aspect-ratio: 1.42; }
.agency-service-card > div { padding: 15px 12px 17px; }
.agency-service-card h3, .agency-project-card h3 { font-size: clamp(.9rem, 1.35vw, 1.24rem); letter-spacing: -.025em; line-height: 1.25; }
.agency-service-card p, .agency-project-card p { font-size: .82rem; line-height: 1.5; margin-block-start: 6px; overflow-wrap: anywhere; }
.agency-featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.agency-featured-card { position: relative; isolation: isolate; display: flex; align-items: end; justify-content: space-between; gap: 10px; min-width: 0; aspect-ratio: 1.68; padding: clamp(12px, 2vw, 24px); border-radius: 13px; color: #fff; background: #182843; overflow: hidden; }
.agency-featured-card img, .agency-featured-card::after { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.agency-featured-card img { object-fit: cover; object-position: center; transition: transform .2s; }
.agency-featured-card:hover img { transform: scale(1.035); }
.agency-featured-card::after { content: ''; background: linear-gradient(0deg, #0a1425f5, #0a1425b5 23%, #0a142500 66%); }
.agency-featured-card h3 { font-size: clamp(1.14rem, 2vw, 1.65rem); letter-spacing: -.02em; }
.agency-featured-card p { color: #f1f4f9; margin-block-start: 5px; font-size: .83rem; line-height: 1.45; }
.agency-card-arrow { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 35px; color: var(--blue); background: white; border-radius: 50%; }
.agency-project-grid, .agency-stack { grid-column: 1 / -1; }
.agency-project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); scroll-margin-top: 30px; }
.agency-project-card { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); min-height: 122px; border-radius: 12px; overflow: hidden; border: 1px solid var(--card-border); background: #f0f2f6; box-shadow: var(--card-shadow); }
.agency-project-card img { width: 100%; height: 100%; max-height: 165px; object-fit: cover; }
.agency-project-card > div { padding: 15px clamp(9px, 1.4vw, 21px); align-self: center; }
.agency-project-card small { display: block; margin-block-start: 6px; color: #0849c2; font-weight: 700; line-height: 1.35; }
.agency-stack { display: flex; align-items: center; gap: 15px 26px; margin-block-start: 8px; padding: 18px 26px; border-radius: 13px; background: #eeeff4; }
.agency-stack h3 { font-size: 1.1rem; }
.agency-stack p { font-size: .79rem; }
.agency-stack ul { display: flex; flex-wrap: wrap; gap: 3px 12px; list-style: none; margin: 0; padding: 0 0 0 16px; padding-inline-start: 19px; border-inline-start: 1px solid #b3c0d7; font-size: .84rem; font-weight: 700; }
.agency-stack li { white-space: nowrap; }
.agency-stack li:not(:last-child)::after { content: ' ·'; color: #44608e; margin-inline-start: 6px; }
.agency-approach, .agency-faq { text-align: center; }
.agency-approach ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; list-style: none; padding: 0; margin: 23px 0 0; }
.agency-approach ol::before { content: ''; position: absolute; inset: 16px 12.5% auto; border-top: 2px solid #aac9fb; }
.agency-approach li { position: relative; padding-inline: 10px; }
.agency-step-number { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; box-shadow: 0 0 0 4px var(--paper); }
.agency-approach li h3 { font-size: 1.1rem; margin-block-start: 11px; }
.agency-approach li p { max-width: 25ch; margin: 6px auto 0; font-size: .85rem; line-height: 1.48; }
.agency-about { display: grid; grid-template-columns: minmax(0, .87fr) minmax(0, 1.9fr); min-height: clamp(220px, 23vw, 330px); overflow: hidden; border-radius: 15px; background: #e9eff5; }
.agency-about img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.agency-about-copy { align-self: stretch; display: flex; align-items: start; justify-content: center; flex-direction: column; padding: clamp(20px, 4vw, 56px); background: radial-gradient(circle at 107% 144%, #359ef3 0 18%, #62b1f6 18.2% 24%, #8ccbf9 24.2% 30%, #b2dcfa 30.2% 36%, transparent 36.2%); }
.rtl .agency-about-copy { background: radial-gradient(circle at -7% 144%, #359ef3 0 18%, #62b1f6 18.2% 24%, #8ccbf9 24.2% 30%, #b2dcfa 30.2% 36%, transparent 36.2%); }
.agency-about-copy h2 { font-size: clamp(1.55rem, 2.85vw, 2.45rem); }
.agency-about-copy .agency-role { font-size: 1.1rem; font-weight: 700; color: var(--ink); margin-block-start: 4px; }
.agency-about-copy > p:not(.agency-role) { margin-block-start: 14px; max-width: 54ch; line-height: 1.6; }
.agency-about-copy .agency-actions { margin-block-start: 10px; }
.agency-faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin-block-start: 16px; align-items: start; text-align: start; }
.agency-faq details { border: 1px solid var(--card-border); border-radius: 9px; background: #fff; box-shadow: 0 2px 7px #1024480d; }
.agency-faq summary { min-height: 48px; padding: 10px 15px; font-size: .9rem; }
.agency-faq details p { padding: 2px 15px 15px; }
.agency-contact { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 17px; padding: 24px clamp(16px, 3.1vw, 44px); border-radius: 14px; color: #fff; background: radial-gradient(ellipse at 76% 150%, #1679c8 1% 39%, #1679c800 39.5%), linear-gradient(110deg, #081d41 36%, #0750a4 69%, #24afcb 100%); }
.agency-contact-icon { width: 38px; height: 38px; color: #8ebdff; }
.agency-contact h2 { font-size: clamp(1.27rem, 2.65vw, 2.1rem); }
.agency-contact p { color: #e8f5ff; margin-block-start: 5px; font-size: .88rem; }
.agency-contact .button { color: var(--ink); background: #fff; border-color: #fff; }
.agency-contact .button:hover { background: #e7efff; }
@media (max-width: 1000px) {
    body:has(.agency-home) .wrap { width: calc(100% - 44px); }
    .agency-services { grid-template-columns: minmax(0, 1fr); }
    .agency-service-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .agency-work { grid-template-columns: minmax(0, 1fr); }
    .agency-hero h1 { width: 62%; }
    .agency-project-card { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
}
@media (max-width: 700px) {
    body:has(.agency-home) .wrap { width: calc(100% - 36px); }
    body:has(.agency-home) .header-inner { min-height: 65px; }
    body:has(.agency-home) .footer-grid { grid-template-columns: minmax(0, 1fr); }
    .agency-hero { display: flex; flex-direction: column; }
    .agency-hero-photo { position: relative; order: 1; width: 100%; aspect-ratio: 2.35; }
    .agency-hero-photo img { object-position: 65% 55%; }
    .agency-hero-photo::after, .rtl .agency-hero-photo::after { background: linear-gradient(180deg, #f3f3f1, #f3f3f100 29%); }
    .agency-hero-inner { padding-block: 29px 14px; }
    .agency-hero h1, .agency-lead { width: 100%; }
    .agency-hero h1 { font-size: clamp(2rem, 9.3vw, 3.7rem); }
    .agency-actions { gap: 9px; margin-block-start: 16px; }
    .agency-home .button, .agency-outline { font-size: .79rem; min-height: 44px; padding-inline: 12px; }
    .agency-founder-link { margin-block-start: 16px; }
    .agency-values { padding: 9px 7px; align-items: stretch; }
    .agency-values li { flex: 1; flex-direction: column; gap: 4px; text-align: center; font-size: .68rem; padding-inline: 4px; }
    .agency-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .agency-project-grid { grid-template-columns: minmax(0, 1fr); }
    .agency-project-card { grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); min-height: 106px; }
    .agency-featured-card { aspect-ratio: 1.55; }
    .agency-stack { align-items: start; flex-direction: column; padding: 15px; }
    .agency-stack ul { border: 0; padding: 0; }
    .agency-approach ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 4px; }
    .agency-approach ol::before { display: none; }
    .agency-about { grid-template-columns: minmax(0, 1fr); }
    .agency-about img { aspect-ratio: 1.55; }
    .agency-about-copy { padding: 20px; }
    .agency-faq-grid { grid-template-columns: minmax(0, 1fr); }
    .agency-contact { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .agency-contact .button { justify-self: start; }
}
@media (max-width: 540px) {
    .agency-featured-grid { grid-template-columns: minmax(0, 1fr); }
}
