/* =========================================================================
   AB Designs — studio homepage (partials/agency-home.php)
   Square corners, natural-proportion grotesk, one fixed section gap.
   Logical properties throughout so /ar/ mirrors without overrides.
   ========================================================================= */

:root {
    --bg: #0b0b0d;
    --bg-2: #121215;
    --bg-3: #18181c;
    --line: rgba(242, 240, 235, .12);
    --line-2: rgba(242, 240, 235, .22);
    --ink: #f2f0eb;
    --ink-2: #c9c6cf;
    --mute: #8e8b96;
    --accent: #8f87ff;
    --accent-ink: #0b0b0d;
    --paper: #ecebe6;
    --paper-ink: #111113;
    --paper-mute: #5f5d66;

    --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --wrap: 1360px;
    --gutter: 40px;
    --gap: 72px;            /* the one section gap */
    --header-h: 76px;
    --ease: cubic-bezier(.2, .7, .1, 1);
    --ease-io: cubic-bezier(.7, 0, .2, 1);
}
.ag-rtl { --font: "IBM Plex Sans Arabic", "Inter Tight", system-ui, sans-serif; }

@media (max-width: 1024px) { :root { --gap: 56px; --gutter: 28px; } }
@media (max-width: 640px)  { :root { --gap: 44px; --gutter: 16px; --header-h: 64px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.ag {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
.ag img, .ag video { display: block; max-width: 100%; height: auto; }
.ag a { color: inherit; text-decoration: none; }
.ag h1, .ag h2, .ag h3, .ag h4, .ag p, .ag ul, .ag ol, .ag dl, .ag dd, .ag figure { margin: 0; padding: 0; }
.ag ul, .ag ol { list-style: none; }
.ag button { font: inherit; color: inherit; cursor: pointer; border-radius: 0; }
.ag ::selection { background: var(--accent); color: var(--accent-ink); }
.ag :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.ag-wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.ag-section { margin-block: var(--gap); scroll-margin-top: calc(var(--header-h) + 8px); }
.ag-band { padding-block: var(--gap); }
.ag-center { display: flex; justify-content: center; margin-top: 44px; }

.ag-skip { position: fixed; inset-inline-start: 16px; top: -60px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 16px; }
.ag-skip:focus { top: 12px; }

/* ---------- progress + cursor ---------- */
.ag-progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 120; pointer-events: none; }
.ag-progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.ag-rtl .ag-progress span { transform-origin: 100% 50%; }

.ag-cursor {
    position: fixed; top: 0; left: 0; z-index: 150; pointer-events: none;
    width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
    background: var(--ink); mix-blend-mode: difference;
    display: flex; align-items: center; justify-content: center;
    transform: translate3d(var(--x, -100px), var(--y, -100px), 0);
    transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, opacity .3s;
    opacity: 0;
}
.ag-cursor.is-on { opacity: 1; }
.ag-cursor.is-label { width: 104px; height: 104px; margin: -52px 0 0 -52px; background: var(--accent); mix-blend-mode: normal; }
.ag-cursor-label { font-size: 12.5px; font-weight: 600; line-height: 1.2; color: var(--accent-ink); text-align: center; padding: 0 10px; opacity: 0; transition: opacity .2s; }
.ag-cursor.is-label .ag-cursor-label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .ag-cursor { display: none; } }

/* ---------- buttons + links ---------- */
.ag-btn {
    position: relative; isolation: isolate; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    min-height: 54px; padding: 0 26px;
    background: var(--ink); color: var(--bg) !important; border: 1px solid var(--ink);
    font-size: 15.5px; font-weight: 600; letter-spacing: -.005em; white-space: nowrap;
    transition: color .45s var(--ease), border-color .45s var(--ease), transform .4s var(--ease);
}
.ag-btn::after {
    content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent);
    transform: translateY(101%); transition: transform .5s var(--ease);
}
.ag-btn:hover::after, .ag-btn:focus-visible::after { transform: translateY(0); }
.ag-btn:hover { border-color: var(--accent); color: var(--accent-ink) !important; }
.ag-btn i { font-size: 14px; transition: transform .4s var(--ease); }
.ag-btn:hover i { transform: translateX(4px); }
.ag-rtl .ag-btn:hover i { transform: translateX(-4px); }
.ag-btn-ghost { background: transparent; color: var(--ink) !important; border-color: var(--line-2); }
.ag-btn-sm { min-height: 42px; padding: 0 18px; font-size: 14px; }
.ag-btn-block { width: 100%; }

.ag-link {
    display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-weight: 600; font-size: 16px; padding-bottom: 4px;
    background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
    transition: background-size .45s var(--ease), color .3s;
}
.ag-rtl .ag-link { background-position: 100% 100%; }
.ag-link:hover { color: var(--accent); background-size: 0 1px; }
.ag-link-dom { color: var(--mute); font-weight: 500; }

/* ---------- header ---------- */
.ag-header {
    position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
    transition: transform .5s var(--ease), background .4s, border-color .4s;
    border-bottom: 1px solid transparent;
}
.ag-header.is-solid { background: rgba(11, 11, 13, .78); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-color: var(--line); }
.ag-header.is-hidden { transform: translateY(-100%); }
.ag-header-in { height: 100%; display: flex; align-items: center; gap: 24px; }
.ag-brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: 18px; letter-spacing: -.02em; flex-shrink: 0; }
.ag-brand img { width: 40px; height: auto; }
.ag-nav { display: flex; gap: 4px; margin-inline: auto; }
.ag-nav a { position: relative; padding: 8px 14px; font-size: 15px; color: var(--ink-2); transition: color .3s; }
.ag-nav a::after { content: ""; position: absolute; inset-inline: 14px; bottom: 4px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .45s var(--ease); }
.ag-nav a:hover, .ag-nav a.is-active { color: var(--ink); }
.ag-nav a:hover::after, .ag-nav a.is-active::after { transform: scaleX(1); transform-origin: 0 50%; }
.ag-header-end { display: flex; align-items: center; gap: 14px; margin-inline-start: auto; }
.ag-nav + .ag-header-end { margin-inline-start: 0; }
.ag-lang { font-size: 14px; color: var(--ink-2); padding: 8px 6px; }
.ag-lang:hover { color: var(--ink); }
.ag-burger { display: none; align-items: center; gap: 12px; background: none; border: 0; padding: 8px 0; font-size: 15px; }
.ag-burger-lines { display: grid; gap: 6px; width: 26px; }
.ag-burger-lines i { display: block; height: 1.5px; background: currentColor; transition: transform .45s var(--ease); }
.ag-burger[aria-expanded="true"] .ag-burger-lines i:first-child { transform: translateY(3.75px) rotate(45deg); }
.ag-burger[aria-expanded="true"] .ag-burger-lines i:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 1180px) {
    .ag-nav { display: none; }
    .ag-burger { display: inline-flex; }
}
@media (max-width: 640px) {
    .ag-header-cta { display: none; }
    .ag-burger-txt { display: none; }
}

/* full-screen menu */
.ag-menu {
    position: fixed; inset: 0; z-index: 90; background: var(--bg);
    padding-top: var(--header-h); display: flex;
    clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease-io);
}
.ag-menu[hidden] { display: none; }
.ag-menu.is-open { clip-path: inset(0 0 0 0); }
.ag-menu-in { display: flex; flex-direction: column; justify-content: space-between; padding-block: 32px 40px; overflow-y: auto; }
.ag-menu-nav { display: flex; flex-direction: column; }
.ag-menu-nav a {
    display: flex; align-items: flex-start; gap: 14px; padding: 6px 0;
    font-size: clamp(38px, 8vw, 72px); font-weight: 500; letter-spacing: -.035em; line-height: 1.12;
    border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(30px);
    transition: opacity .6s var(--ease) calc(.15s + var(--i) * .05s), transform .6s var(--ease) calc(.15s + var(--i) * .05s), color .3s;
}
.ag-rtl .ag-menu-nav a { letter-spacing: 0; line-height: 1.35; }
.ag-menu.is-open .ag-menu-nav a { opacity: 1; transform: none; }
.ag-menu-nav a:hover { color: var(--accent); }
.ag-menu-nav sup { font-family: var(--mono); font-size: 12px; letter-spacing: 0; color: var(--mute); margin-top: 1.1em; }
.ag-menu-foot { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 40px; color: var(--ink-2); font-size: 15px; }
.ag-menu-foot a:hover { color: var(--ink); }
body.menu-open { overflow: hidden; }

/* ---------- hero ---------- */
.ag-hero {
    position: relative; min-height: 100vh; min-height: 100svh;
    display: flex; align-items: stretch;
    padding-top: calc(var(--header-h) + 28px); padding-bottom: 40px;
    overflow: hidden;
}
.ag-hero > .ag-wrap { display: flex; flex-direction: column; position: relative; z-index: 1; }
.ag-hero-glow {
    position: absolute; z-index: 0; width: 70vw; height: 70vw; max-width: 1100px; max-height: 1100px;
    inset-inline-end: -18vw; top: -22vw;
    background: radial-gradient(closest-side, rgba(143, 135, 255, .22), rgba(143, 135, 255, 0));
    transform: translate3d(var(--gx, 0), var(--gy, 0), 0);
    transition: transform 1.2s var(--ease);
    pointer-events: none;
}
.ag-hero-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 14.5px; color: var(--ink-2); }
.ag-status { display: inline-flex; align-items: center; gap: 10px; }
.ag-clock { font-family: var(--mono); font-size: 13px; color: var(--ink); }

.ag-hero-title {
    font-size: clamp(46px, 6.3vw, 114px); font-weight: 500; line-height: .93; letter-spacing: -.05em;
}
.ag-rtl .ag-hero-title { font-size: clamp(42px, 5.6vw, 100px); line-height: 1.18; letter-spacing: 0; font-weight: 600; }
.ag-line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.ag-line > span { display: inline-block; transform: translateY(105%); transition: transform 1.15s var(--ease); }
.ag-line:nth-child(2) > span { transition-delay: .08s; }
.ag-line:nth-child(3) > span { transition-delay: .16s; }
.is-loaded .ag-hero .ag-line > span, .ag-line.is-in > span { transform: none; }
.ag-line-indent { padding-inline-start: 5vw; }
.ag-hero-title em, .ag-contact-title em { font-style: normal; color: var(--accent); }

.ag-hero-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .82fr); align-items: center; gap: 56px; padding-top: 32px; }
.ag-hero-main { padding-bottom: 8px; }
.ag-hero-bottom { display: grid; gap: 28px; margin-top: 36px; }
.ag-hero-fade { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease) .45s, transform 1s var(--ease) .45s; }
.ag-hero-actions.ag-hero-fade { transition-delay: .55s; }
.is-loaded .ag-hero-fade { opacity: 1; transform: none; }

/* founder portrait */
.ag-portrait { position: relative; width: 100%; max-width: 470px; justify-self: end; opacity: 0; transform: translateY(40px); transition: opacity 1.2s var(--ease) .25s, transform 1.2s var(--ease) .25s; }
.is-loaded .ag-portrait { opacity: 1; transform: none; }
.ag-portrait-frame { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.ag-portrait-frame img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0;
    filter: contrast(1.04) saturate(1.02);
    -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%); mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
}
.ag-portrait figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); font-size: 15px; }
.ag-portrait figcaption strong { font-weight: 600; }
.ag-portrait figcaption span { color: var(--mute); text-align: end; }
@media (max-width: 1100px) {
    .ag-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 36px; }
}
@media (max-width: 820px) {
    .ag-hero-grid { grid-template-columns: 1fr; gap: 40px; padding-top: 28px; align-items: start; }
    .ag-hero-bottom { margin-top: 24px; }
    .ag-portrait { justify-self: start; max-width: 460px; }
    .ag-hero-title { font-size: clamp(44px, 11.5vw, 96px); }
    .ag-rtl .ag-hero-title { font-size: clamp(40px, 10.5vw, 88px); }
}
.ag-hero-lead { max-width: 560px; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; color: var(--ink-2); }
.ag-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ag-scroll-cue { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 12px; color: var(--mute); }
.ag-scroll-cue i { display: block; width: 1px; height: 54px; background: linear-gradient(var(--ink), transparent); transform-origin: top; animation: ag-cue 2.2s var(--ease-io) infinite; }
@keyframes ag-cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (max-width: 900px) {
    .ag-line-indent { padding-inline-start: 0; }
}

/* ---------- showreel ---------- */
.ag-reel { margin-block: 0 var(--gap); }
.ag-reel-stage { padding-inline: var(--gutter); }
.ag-reel-frame {
    position: relative; display: block; width: 100%; padding: 0; border: 0; background: #000;
    aspect-ratio: 16 / 8; overflow: hidden; cursor: none;
    transform: scale(var(--s, .9)); transform-origin: 50% 0; will-change: transform;
}
@media (hover: none), (pointer: coarse) { .ag-reel-frame { cursor: pointer; } }
@media (max-width: 640px) { .ag-reel-frame { aspect-ratio: 4 / 3; } }
.ag-reel-video { width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.18 - (var(--s, .9) - .9) * 1.8)); }
.ag-reel-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.6)); }
.ag-reel-play {
    position: absolute; top: 50%; left: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 22px;
    background: var(--accent); color: var(--accent-ink); transition: transform .5s var(--ease);
}
.ag-reel-frame:hover .ag-reel-play { transform: scale(1.08); }
@media (hover: hover) and (pointer: fine) { .ag-reel-play { opacity: 0; } }
.ag-reel-meta { position: absolute; inset-inline: 28px; bottom: 22px; display: flex; justify-content: space-between; color: #fff; font-size: 15px; font-weight: 500; }

/* ---------- marquee ---------- */
.ag-marquee { border-block: 1px solid var(--line); overflow: hidden; padding-block: 22px; margin-block: var(--gap); }
.ag-marquee-track { display: flex; width: max-content; animation: ag-scroll 38s linear infinite; }
.ag-rtl .ag-marquee-track { animation-name: ag-scroll-rtl; }
.ag-marquee-group { display: flex; align-items: center; gap: 36px; padding-inline-end: 36px; }
.ag-marquee span { font-size: clamp(26px, 3.3vw, 48px); font-weight: 500; letter-spacing: -.03em; white-space: nowrap; }
.ag-rtl .ag-marquee span { letter-spacing: 0; }
.ag-marquee b { color: var(--accent); font-size: clamp(18px, 2vw, 28px); font-weight: 400; }
@keyframes ag-scroll { to { transform: translateX(-50%); } }
@keyframes ag-scroll-rtl { to { transform: translateX(50%); } }
.ag-marquee:hover .ag-marquee-track { animation-play-state: paused; }

/* ---------- section heads ---------- */
.ag-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); align-items: end; gap: 24px 64px; margin-bottom: 48px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.ag-h2 { font-size: clamp(40px, 6vw, 96px); font-weight: 500; line-height: .98; letter-spacing: -.045em; }
.ag-rtl .ag-h2 { line-height: 1.25; letter-spacing: 0; font-weight: 600; }
.ag-h2 sup { font-family: var(--mono); font-size: .2em; letter-spacing: 0; font-weight: 400; color: var(--accent); vertical-align: top; position: relative; top: .5em; margin-inline-start: .3em; }
.ag-head-lead { color: var(--ink-2); font-size: 17.5px; max-width: 520px; justify-self: end; }
@media (max-width: 900px) {
    .ag-head { grid-template-columns: 1fr; }
    .ag-head-lead { justify-self: start; }
}

/* ---------- reveal ---------- */
.ag-reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease) calc(var(--d, 0) * .08s), transform .9s var(--ease) calc(var(--d, 0) * .08s); }
.ag-reveal.is-in { opacity: 1; transform: none; }
.no-js .ag-reveal, .no-js .ag-line > span { opacity: 1; transform: none; }

/* ---------- statement / about ---------- */
.ag-statement {
    font-size: clamp(28px, 3.9vw, 60px); font-weight: 500; line-height: 1.12; letter-spacing: -.035em;
    max-width: 1220px; margin-bottom: 72px !important;
}
.ag-rtl .ag-statement { line-height: 1.45; letter-spacing: 0; }
.ag-statement .w { color: rgba(242, 240, 235, .18); transition: color .4s; }
.ag-statement .w.is-lit { color: var(--ink); }
.ag-about-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "text stats" "social stats"; gap: 0 72px; align-items: start; }
.ag-about-text { grid-area: text; }
.ag-stats { grid-area: stats; }
.ag-social { grid-area: social; align-self: end; }
.ag-founder-img { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: linear-gradient(160deg, #1d1c26, #101013); }
.ag-founder-img img { width: 100%; height: 108%; object-fit: cover; object-position: 50% 0; transform: translateY(var(--py, 0)); }
.ag-founder figcaption { display: flex; justify-content: space-between; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); margin-top: 16px; font-size: 15px; }
.ag-founder figcaption span { color: var(--mute); text-align: end; }
.ag-about-text { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.55; color: var(--ink-2); max-width: 640px; margin-bottom: 48px !important; }
.ag-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.ag-stat { padding: 28px 0; border-bottom: 1px solid var(--line); }
.ag-stat:nth-child(odd) { padding-inline-end: 24px; border-inline-end: 1px solid var(--line); }
.ag-stat:nth-child(even) { padding-inline-start: 28px; }
.ag-stat dt { font-size: clamp(56px, 6.5vw, 104px); font-weight: 500; line-height: 1; letter-spacing: -.05em; }
.ag-stat dt sup { font-size: .4em; color: var(--accent); vertical-align: top; position: relative; top: .25em; }
.ag-stat dd { color: var(--mute); font-size: 15px; margin-top: 10px; }
.ag-social { display: flex; gap: 10px; margin-top: 32px; flex-wrap: wrap; }
.ag-social a { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border: 1px solid var(--line-2); font-size: 14.5px; transition: background .35s, color .35s, border-color .35s; }
.ag-social a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (max-width: 900px) { .ag-about-body { grid-template-columns: 1fr; grid-template-areas: "text" "stats" "social"; } }

/* ---------- services ---------- */
.ag-services { border-top: 1px solid var(--line); counter-reset: s; }
.ag-service {
    position: relative; isolation: isolate;
    display: grid; grid-template-columns: 90px minmax(0, 1.1fr) minmax(0, 1fr) 60px; align-items: center; gap: 24px;
    padding: 34px 0; border-bottom: 1px solid var(--line);
    transition: color .45s var(--ease), padding .55s var(--ease);
}
.ag-service::before {
    content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1); z-index: -1; background: var(--accent);
    transform: scaleY(0); transform-origin: 50% 100%; transition: transform .55s var(--ease);
}
.ag-service:hover { color: var(--accent-ink); padding-inline: 18px; }
.ag-service:hover::before { transform: scaleY(1); }
.ag-service-num { font-family: var(--mono); font-size: 14px; color: var(--mute); transition: color .45s; }
.ag-service-title { font-size: clamp(26px, 3vw, 44px); font-weight: 500; letter-spacing: -.035em; line-height: 1.08; }
.ag-rtl .ag-service-title { letter-spacing: 0; line-height: 1.35; }
.ag-service-text { color: var(--ink-2); font-size: 16px; transition: color .45s; }
.ag-service-icon { justify-self: end; width: 52px; height: 52px; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-size: 18px; transition: background .45s, color .45s, border-color .45s, transform .55s var(--ease); }
.ag-service:hover .ag-service-num, .ag-service:hover .ag-service-text { color: rgba(11, 11, 13, .75); }
.ag-service:hover .ag-service-icon { background: var(--accent-ink); color: var(--accent); border-color: var(--accent-ink); transform: rotate(-8deg); }
@media (max-width: 900px) {
    .ag-service { grid-template-columns: 52px minmax(0, 1fr); gap: 10px 16px; padding: 26px 0; }
    .ag-service-text { grid-column: 2; }
    .ag-service-icon { display: none; }
    .ag-service:hover { padding-inline: 0; }
}

/* ---------- work (stacked case studies) ---------- */
.ag-work { display: grid; gap: 28px; }
.ag-case { position: sticky; top: calc(var(--header-h) + 16px + var(--i) * 14px); }
.ag-case-in {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start;
    padding: 44px; background: var(--bg-2); border: 1px solid var(--line); border-top: 2px solid var(--accent);
    box-shadow: 0 -30px 60px rgba(0, 0, 0, .45);
    transform: scale(var(--cs, 1)); transform-origin: 50% 0; transition: transform .2s linear;
}
.ag-case-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 13.5px; color: var(--mute); margin-bottom: 22px; }
.ag-case-meta > span:first-child { font-family: var(--mono); color: var(--ink-2); }
.ag-live { color: var(--ink-2); }
.ag-case-name { font-size: clamp(40px, 4.6vw, 72px); font-weight: 500; letter-spacing: -.045em; line-height: 1; margin-bottom: 18px !important; }
.ag-case-name span { font-size: .45em; color: var(--mute); letter-spacing: 0; margin-inline-start: 10px; }
.ag-case-title { font-size: 20px; font-weight: 500; line-height: 1.35; margin-bottom: 14px !important; }
.ag-case-desc { color: var(--ink-2); font-size: 15.5px; line-height: 1.7; margin-bottom: 22px !important; }
.ag-case-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 22px; margin-bottom: 24px !important; }
.ag-case-points li { position: relative; padding-inline-start: 18px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.ag-case-points li::before { content: ""; position: absolute; inset-inline-start: 0; top: .55em; width: 7px; height: 7px; background: var(--accent); }
.ag-case-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-block: 18px; border-block: 1px solid var(--line); margin-bottom: 24px; }
.ag-case-facts span { display: block; font-size: 13px; color: var(--mute); margin-bottom: 6px; }
.ag-case-facts p { font-size: 14.5px; line-height: 1.5; }
.ag-case-stack { font-family: var(--mono); font-size: 13px !important; color: var(--ink-2); }
.ag-case-shot { display: block; position: relative; cursor: none; }
@media (hover: none), (pointer: coarse) { .ag-case-shot { cursor: pointer; } }
.ag-case-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding-inline: 14px; background: #1f1f24; border: 1px solid var(--line); border-bottom: 0; }
.ag-case-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a3a42; }
.ag-case-bar span { margin-inline-start: 12px; font-family: var(--mono); font-size: 12px; color: var(--mute); padding: 4px 12px; background: #141418; }
.ag-case-img { display: block; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: #000; }
.ag-case-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: transform 1.2s var(--ease), object-position 3.5s ease-in-out; }
.ag-case-shot:hover .ag-case-img img { transform: scale(1.03); }
.ag-case-tag { display: block; margin-top: 16px; font-size: 15px; color: var(--ink-2); }
@media (max-width: 1100px) {
    .ag-case { position: relative; top: auto; }
    .ag-case-in { grid-template-columns: 1fr; padding: 32px; transform: none; }
    .ag-case-shot { order: -1; }
}
@media (max-width: 640px) {
    .ag-case-in { padding: 20px; gap: 28px; }
    .ag-case-points, .ag-case-facts { grid-template-columns: 1fr; }
    .ag-case-bar span { display: none; }
}

/* ---------- process (light band) ---------- */
.ag-band { background: var(--paper); color: var(--paper-ink); }
.ag-band .ag-head { border-color: rgba(17, 17, 19, .14); }
.ag-band .ag-head-lead { color: var(--paper-mute); }
.ag-band .ag-h2 sup { color: #5b52e0; }
.ag-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-inline-start: 1px solid rgba(17, 17, 19, .14); }
.ag-step { padding: 8px 28px 32px; border-inline-end: 1px solid rgba(17, 17, 19, .14); }
.ag-step-num { display: block; font-size: clamp(56px, 6vw, 96px); font-weight: 500; letter-spacing: -.05em; line-height: 1; color: #5b52e0; margin-bottom: 56px; }
.ag-step h3 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 10px !important; }
.ag-step p { color: var(--paper-mute); font-size: 15.5px; }
.ag-stack { margin-top: 72px; }
.ag-stack-title { font-size: clamp(24px, 2.4vw, 34px); font-weight: 500; letter-spacing: -.03em; margin-bottom: 24px !important; }
.ag-stack-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: rgba(17, 17, 19, .14); border: 1px solid rgba(17, 17, 19, .14); }
.ag-tool { background: var(--paper); padding: 28px; transition: background .35s; }
.ag-tool:hover { background: #fff; }
.ag-tool img { width: 40px; height: 40px; object-fit: contain; margin-bottom: 22px; }
.ag-tool h4 { font-size: 18px; font-weight: 600; margin-bottom: 8px !important; }
.ag-tool p { font-size: 14.5px; color: var(--paper-mute); line-height: 1.55; }
@media (max-width: 1024px) {
    .ag-steps, .ag-stack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ag-step { border-bottom: 1px solid rgba(17, 17, 19, .14); padding-top: 24px; }
    .ag-step-num { margin-bottom: 28px; }
}
@media (max-width: 560px) { .ag-steps, .ag-stack-grid { grid-template-columns: 1fr; } }

/* ---------- clients ---------- */
.ag-logos { overflow: hidden; margin-top: 12px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ag-logos-track { display: flex; width: max-content; animation: ag-scroll 46s linear infinite; }
.ag-rtl .ag-logos-track { animation-name: ag-scroll-rtl; }
.ag-logos.is-reverse .ag-logos-track { animation-direction: reverse; animation-duration: 52s; }
.ag-logos:hover .ag-logos-track { animation-play-state: paused; }
.ag-logos-group { display: flex; gap: 12px; padding-inline-end: 12px; }
.ag-logo { cursor: default; width: 220px; height: 124px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: 18px 28px; background: var(--bg-2); border: 1px solid var(--line); transition: background .35s, border-color .35s; }
.ag-logo img { max-width: 100%; max-height: 82px; width: auto; object-fit: contain; filter: grayscale(1) contrast(1.05); opacity: .72; transition: filter .4s, opacity .4s; }
.ag-logo:hover { background: var(--bg-3); border-color: var(--line-2); }
.ag-logo:hover img { filter: none; opacity: 1; }
@media (max-width: 640px) { .ag-logo { width: 160px; height: 96px; padding: 14px 18px; } .ag-logo img { max-height: 62px; } }

/* ---------- templates ---------- */
.ag-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.ag-filter { padding: 10px 18px; background: transparent; border: 1px solid var(--line-2); font-size: 14.5px; color: var(--ink-2); transition: background .3s, color .3s, border-color .3s; }
.ag-filter:hover { color: var(--ink); border-color: var(--ink); }
.ag-filter.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ag-tpls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.ag-tpl { position: relative; display: flex; flex-direction: column; cursor: none; animation: ag-fade .6s var(--ease) both; }
@media (hover: none), (pointer: coarse) { .ag-tpl { cursor: pointer; } }
.ag-tpl[hidden] { display: none; }
@keyframes ag-fade { from { opacity: 0; transform: translateY(16px); } }
.ag-tpl-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #e9e8e3; }
.ag-tpl-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.ag-tpl:hover .ag-tpl-img img { transform: scale(1.05); }
.ag-tpl-body { display: block; padding-top: 18px; padding-inline-end: 36px; }
.ag-tpl-title { display: block; font-size: 19px; font-weight: 500; line-height: 1.35; letter-spacing: -.015em; transition: color .3s; }
.ag-tpl:hover .ag-tpl-title { color: var(--accent); }
.ag-tpl-tags { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--mute); }
@media (max-width: 1024px) { .ag-tpls { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .ag-tpls { grid-template-columns: 1fr; } }

/* ---------- journal ---------- */
.ag-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.ag-post-link { display: block; }
.ag-post-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); margin-bottom: 18px; }
.ag-post-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.ag-post-link:hover .ag-post-img img { transform: scale(1.05); }
.ag-post-meta { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--mute); margin-bottom: 10px; }
.ag-rtl .ag-post-meta { font-family: var(--font); }
.ag-post-title { font-size: 22px; font-weight: 500; line-height: 1.3; letter-spacing: -.02em; margin-bottom: 10px !important; transition: color .3s; }
.ag-post-link:hover .ag-post-title { color: var(--accent); }
.ag-post-ex { color: var(--ink-2); font-size: 15px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 1024px) { .ag-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .ag-posts { grid-template-columns: 1fr; } }

/* ---------- pricing ---------- */
.ag-toggle { justify-self: end; display: inline-flex; border: 1px solid var(--line-2); padding: 4px; }
.ag-toggle button { background: transparent; border: 0; padding: 12px 20px; font-size: 15px; color: var(--ink-2); transition: background .3s, color .3s; }
.ag-toggle button.is-on { background: var(--ink); color: var(--bg); }
@media (max-width: 900px) { .ag-toggle { justify-self: start; } }
.ag-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); animation: ag-fade .5s var(--ease) both; }
.ag-plans[hidden] { display: none; }
.ag-plan { display: flex; flex-direction: column; padding: 36px; border-inline-end: 1px solid var(--line); }
.ag-plan:last-child { border-inline-end: 0; }
.ag-plan.is-featured { background: var(--accent); color: var(--accent-ink); }
.ag-plan-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 28px; }
.ag-plan-name { font-size: 17px; font-weight: 600; }
.ag-plan-flag { font-size: 12.5px; font-weight: 600; padding: 5px 10px; background: var(--accent-ink); color: var(--accent); }
.ag-plan-price { font-size: clamp(44px, 4.4vw, 68px); font-weight: 500; letter-spacing: -.045em; line-height: 1; margin-top: 40px; text-align: start; }
.ag-rtl .ag-plan-price { text-align: end; }
.ag-plan-pay { font-size: 14.5px; color: var(--mute); margin-top: 10px !important; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.ag-plan.is-featured .ag-plan-pay { color: rgba(11, 11, 13, .7); border-color: rgba(11, 11, 13, .2); }
.ag-plan-list { display: grid; align-content: start; gap: 12px; padding-block: 26px 32px !important; flex: 1; }
.ag-plan-list li { position: relative; padding-inline-start: 26px; font-size: 15px; line-height: 1.5; }
.ag-plan-list li::before { content: "\f00c"; font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free"; font-weight: 400; position: absolute; inset-inline-start: 0; top: 1px; font-size: 13px; color: var(--accent); }
.ag-plan.is-featured .ag-plan-list li::before { color: var(--accent-ink); }
.ag-plan.is-featured .ag-btn { background: var(--accent-ink); color: var(--ink) !important; border-color: var(--accent-ink); }
.ag-plan.is-featured .ag-btn::after { background: var(--ink); }
.ag-plan.is-featured .ag-btn:hover { color: var(--accent-ink) !important; border-color: var(--ink); }
@media (max-width: 960px) {
    .ag-plans { grid-template-columns: 1fr; }
    .ag-plan { border-inline-end: 0; border-bottom: 1px solid var(--line); }
    .ag-plan:last-child { border-bottom: 0; }
}

/* ---------- contact ---------- */
.ag-contact-title { font-size: clamp(52px, 10vw, 184px); font-weight: 500; line-height: .92; letter-spacing: -.055em; margin-bottom: 56px !important; }
.ag-rtl .ag-contact-title { line-height: 1.2; letter-spacing: 0; font-weight: 600; }
.ag-contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; padding-top: 40px; border-top: 1px solid var(--line); }
.ag-contact-lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); margin-bottom: 36px !important; }
.ag-contact-list > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding-block: 16px; border-bottom: 1px solid var(--line); }
.ag-contact-list dt { color: var(--mute); font-size: 14.5px; }
.ag-contact-list dd { font-size: 16.5px; }
.ag-contact-list a:hover { color: var(--accent); }
.ag-rtl .ag-contact-list a[dir="ltr"] { text-align: end; display: inline-block; }
.ag-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; }
.ag-field { position: relative; }
.ag-field-full { grid-column: 1 / -1; }
.ag-field input, .ag-field textarea {
    width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0;
    color: var(--ink); font: inherit; font-size: 18px; padding: 30px 0 12px; outline: none; resize: vertical;
    transition: border-color .3s;
}
.ag-field textarea { min-height: 130px; }
.ag-field label { position: absolute; inset-inline-start: 0; top: 30px; color: var(--mute); font-size: 18px; pointer-events: none; transform-origin: 0 0; transition: transform .35s var(--ease), color .3s; }
.ag-rtl .ag-field label { transform-origin: 100% 0; }
.ag-field input:focus, .ag-field textarea:focus { border-color: var(--accent); }
.ag-field input:focus + label, .ag-field textarea:focus + label,
.ag-field input:not(:placeholder-shown) + label, .ag-field textarea:not(:placeholder-shown) + label { transform: translateY(-24px) scale(.74); color: var(--ink-2); }
.ag-field.is-bad input, .ag-field.is-bad textarea { border-color: #ff6b6b; }
.ag-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; flex-wrap: wrap; }
.ag-form-msg { font-size: 15px; color: var(--ink-2); max-width: 420px; }
.ag-form-msg.is-ok { color: #3ddc84; }
.ag-form-msg.is-err { color: #ff8b8b; }
.ag-form button[disabled] { opacity: .6; pointer-events: none; }
@media (max-width: 900px) {
    .ag-contact-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 560px) {
    .ag-form { grid-template-columns: 1fr; }
    .ag-form-foot .ag-btn { width: 100%; }
    .ag-contact-list > div { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- footer ---------- */
.ag-footer { margin-top: var(--gap); padding-top: var(--gap); border-top: 1px solid var(--line); overflow: hidden; }
.ag-footer-top { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; padding-bottom: 48px; }
.ag-footer-line { font-size: clamp(30px, 3.6vw, 54px); font-weight: 500; letter-spacing: -.04em; line-height: 1.08; max-width: 760px; }
.ag-rtl .ag-footer-line { letter-spacing: 0; line-height: 1.4; }
.ag-footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding-block: 40px; border-block: 1px solid var(--line); }
.ag-footer-cols h3 { font-size: 14px; font-weight: 500; color: var(--mute); margin-bottom: 16px !important; }
.ag-footer-cols a, .ag-footer-cols span { display: block; width: fit-content; padding-block: 4px; font-size: 16px; color: var(--ink-2); transition: color .3s; }
.ag-footer-cols a:hover { color: var(--ink); }
.ag-wordmark {
    font-size: clamp(64px, 17.5vw, 300px); font-weight: 600; letter-spacing: -.06em; line-height: 1; margin-bottom: -.12em;
    white-space: nowrap; text-align: center; padding-top: 40px;
    background: linear-gradient(180deg, var(--ink) 0%, rgba(242, 240, 235, .06) 92%); -webkit-background-clip: text; background-clip: text; color: transparent;
    font-family: "Inter Tight", system-ui, sans-serif; direction: ltr;
}
.ag-footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 28px 32px; font-size: 14px; color: var(--mute); }
.ag-totop:hover { color: var(--ink); }
@media (max-width: 640px) { .ag-footer-cols { grid-template-columns: 1fr 1fr; } .ag-footer-cols > div:last-child { grid-column: 1 / -1; } }

/* ---------- film modal (from partials/film-modal.php) sits above everything ---------- */
.ab-film-modal { z-index: 300 !important; }
.ab-film-video { border-radius: 0 !important; }
.ab-film-close { border-radius: 0 !important; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .ag-reveal, .ag-line > span, .ag-hero-fade, .ag-portrait { opacity: 1 !important; transform: none !important; transition: none !important; }
    .ag-marquee-track, .ag-logos-track, .ag-scroll-cue i { animation: none !important; }
    .ag-reel-frame { transform: none !important; }
    .ag-statement .w { color: var(--ink) !important; }
}

/* ---------- FAQ ---------- */
.ag-faq { border-top: 1px solid var(--line); }
.ag-faq-item { border-bottom: 1px solid var(--line); }
.ag-faq-item summary {
    display: grid; grid-template-columns: 90px minmax(0, 1fr) 40px; align-items: center; gap: 24px;
    padding: 28px 0; cursor: pointer; list-style: none;
}
.ag-faq-item summary::-webkit-details-marker { display: none; }
.ag-faq-num { font-family: var(--mono); font-size: 14px; color: var(--mute); }
.ag-faq-q { font-size: clamp(20px, 2.1vw, 30px); font-weight: 500; letter-spacing: -.025em; line-height: 1.25; transition: color .3s; }
.ag-rtl .ag-faq-q { letter-spacing: 0; line-height: 1.5; }
.ag-faq-item summary:hover .ag-faq-q { color: var(--accent); }
.ag-faq-icon { position: relative; justify-self: end; width: 40px; height: 40px; border: 1px solid var(--line-2); transition: background .35s, border-color .35s; }
.ag-faq-icon::before, .ag-faq-icon::after { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 1.5px; margin: -.75px 0 0 -7px; background: currentColor; transition: transform .45s var(--ease); }
.ag-faq-icon::after { transform: rotate(90deg); }
.ag-faq-item[open] .ag-faq-icon { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ag-faq-item[open] .ag-faq-icon::after { transform: rotate(0deg); }
.ag-faq-a { padding: 0 64px 32px 114px; }
.ag-rtl .ag-faq-a { padding: 0 114px 32px 64px; }
.ag-faq-a p { color: var(--ink-2); font-size: 17px; line-height: 1.7; max-width: 820px; }
@media (max-width: 760px) {
    .ag-faq-item summary { grid-template-columns: 40px minmax(0, 1fr) 36px; gap: 14px; padding: 22px 0; }
    .ag-faq-icon { width: 36px; height: 36px; }
    .ag-faq-a, .ag-rtl .ag-faq-a { padding: 0 0 24px 54px; }
    .ag-rtl .ag-faq-a { padding: 0 54px 24px 0; }
}
/* list sections that start right under a section head: the head's rule is enough */
.ag-head + .ag-faq, .ag-head + .ag-services { border-top: 0; }
