/* =====================================================================
   AI AUTOMATION AGENCY DUBAI (/ai-automation-agency-dubai, EN only)
   Page additions on top of pages/service.css (loaded after it).
     .ai-hero     hero extras: the live subtitle under the lead
     .ai-flow     hero moment: a Form → AI → CRM → WhatsApp pipeline strip;
                  nodes light up in turn and a pulse travels each wire (CSS only)
     .ai-intro    faded abstract-3D photo behind the deep statement band
     .ai-builds   added section: three "first build" tickets, each with a
                  mini pipeline that draws itself on scroll
     .ai-steps    faded light-streak photo behind the ink timeline
   No robots or mascots: the imagery is abstract 3D renders and light.
   ===================================================================== */

/* ---------- hero ---------- */
.ai-hero__sub { font-size: clamp(15.5px, 1.15vw, 17.5px); line-height: 1.55; font-weight: 500; max-width: 36em; color: color-mix(in oklab, var(--ink) 80%, var(--b2)); }
/* the sub-price under the fact label: own line (beats the kit's [data-w]:not([data-px="inline"]) inline-block, 0-2-0) */
.sv-fact .sv-fact__ref[data-w] { display: block; width: fit-content; margin-top: 3px; font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* pipeline strip (decorative, aria-hidden) */
.ai-flow { --n: clamp(40px, 4.2vw, 58px); position: relative; z-index: 3; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; margin-top: clamp(4px, .8vw, 10px); padding: clamp(14px, 1.8vw, 22px) clamp(6px, 1.4vw, 18px) clamp(12px, 1.6vw, 18px); border-radius: 22px; background: color-mix(in oklab, var(--ink) 90%, var(--b2)); color: var(--cream); box-shadow: 0 34px 56px -40px color-mix(in oklab, var(--ink) 85%, transparent); }
.ai-flow__node { position: relative; display: grid; justify-items: center; gap: 8px; min-width: 0; text-align: center; }
.ai-flow__ico { width: var(--n); height: var(--n); border-radius: 30%; display: grid; place-items: center; font-size: calc(var(--n) * .44); color: var(--cream); background: color-mix(in oklab, var(--cream) 9%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--cream) 22%, transparent); }
.ai-flow__lbl { font: 400 clamp(11px, 1vw, 14px)/1.15 var(--f-display); text-transform: uppercase; letter-spacing: .08em; color: color-mix(in oklab, var(--cream) 74%, var(--ink)); white-space: nowrap; }
.ai-flow__sub { font-size: 11.5px; font-weight: 600; line-height: 1.2; color: color-mix(in oklab, var(--cream) 50%, var(--ink)); white-space: nowrap; }
/* the wire to the next node, and the pulse that travels it (a dot drawn at the start of a wire-wide strip, then translated by its own width) */
.ai-flow__node:not(:last-child)::after { content: ""; position: absolute; top: calc(var(--n) / 2 - 1px); inset-inline-start: calc(50% + var(--n) / 2 + 8px); width: calc(100% - var(--n) - 16px); height: 2px; background: color-mix(in oklab, var(--cream) 20%, transparent); }
.ai-flow__node:not(:last-child)::before { content: ""; position: absolute; z-index: 1; top: calc(var(--n) / 2 - 5px); inset-inline-start: calc(50% + var(--n) / 2 + 8px); width: calc(100% - var(--n) - 16px); height: 10px; background: radial-gradient(circle at 5px 50%, var(--b2) 0 3.5px, color-mix(in oklab, var(--b2) 35%, transparent) 4px 5px, transparent 5.5px) no-repeat; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .ai-flow { animation: aiRise 1.1s .75s var(--ease) both; }
  .ai-flow__ico { animation: aiNode 5.2s calc(1.2s + var(--k, 0) * 1.3s) infinite; }
  .ai-flow__node:not(:last-child)::before { animation: aiPulse 5.2s calc(1.2s + var(--k, 0) * 1.3s + .55s) infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-flow__ico { background: var(--b2); color: var(--ink); box-shadow: none; }
  .ai-flow__node:not(:last-child)::after { background: var(--b2); }
}
@keyframes aiRise { from { transform: translateY(30px); opacity: 0; } }
@keyframes aiNode {
  0%, 4% { background: color-mix(in oklab, var(--cream) 9%, transparent); color: var(--cream); transform: none; }
  9%, 20% { background: var(--b2); color: var(--ink); transform: translateY(-3px) scale(1.08); }
  28%, 100% { background: color-mix(in oklab, var(--cream) 9%, transparent); color: var(--cream); transform: none; }
}
@keyframes aiPulse {
  0% { opacity: 0; translate: 0 0; }
  3% { opacity: 1; }
  13% { opacity: 1; translate: calc((100% - 10px) * var(--dir, 1)) 0; }
  15%, 100% { opacity: 0; translate: calc((100% - 10px) * var(--dir, 1)) 0; }
}
@media (max-width: 559px) { .ai-flow__sub { display: none; } .ai-flow__lbl { letter-spacing: .05em; } }

/* ---------- deep statement band: faded abstract-3D photo ---------- */
.ai-intro { overflow: clip; }
.ai-intro__photo { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.ai-intro__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; opacity: .26; mix-blend-mode: screen; -webkit-mask-image: radial-gradient(70% 80% at 92% 12%, #000 0, transparent 68%); mask-image: radial-gradient(70% 80% at 92% 12%, #000 0, transparent 68%); }
.ai-intro > .wrap { position: relative; z-index: 1; }

/* ---------- first-build tickets (added section, cream) ---------- */
.ai-builds__grid { display: grid; gap: 16px; }
.ai-build { --ln: 1; --c-bg: var(--paper); --c-fg: var(--ink); --c-fg2: var(--ink-2); --c-stroke: color-mix(in oklab, var(--ink) 22%, transparent); position: relative; display: grid; gap: 16px; align-content: start; padding: clamp(22px, 2.8vw, 36px); border-radius: var(--r-lg); background: var(--c-bg); color: var(--c-fg); box-shadow: 0 0 0 1px var(--line); overflow: clip; }
.ai-build:nth-child(2) { --c-bg: var(--deep); --c-fg: var(--cream); --c-fg2: var(--on-deep-2); --c-stroke: color-mix(in oklab, var(--cream) 28%, transparent); box-shadow: none; }
.ai-build:nth-child(3) { --c-bg: var(--ink); --c-fg: var(--cream); --c-fg2: color-mix(in oklab, var(--cream) 74%, var(--ink)); --c-stroke: color-mix(in oklab, var(--cream) 24%, transparent); box-shadow: none; }
.ai-build__n { position: absolute; top: -.06em; inset-inline-end: 14px; font: 400 clamp(84px, 9vw, 150px)/1 var(--f-num); color: transparent; -webkit-text-stroke: 1.5px var(--c-stroke); pointer-events: none; user-select: none; }
.ai-build__t { position: relative; font: 400 clamp(26px, 2.4vw, 38px)/1 var(--f-display); text-transform: var(--display-case); letter-spacing: var(--display-track); max-width: 12ch; padding-inline-end: 1.2em; }
.ai-build__flow { position: relative; display: grid; gap: 12px; margin: 0; padding: 0 0 0 28px; list-style: none; }
[dir="rtl"] .ai-build__flow { padding: 0 28px 0 0; }
.ai-build__flow::before { content: ""; position: absolute; top: 8px; bottom: 8px; inset-inline-start: 7px; width: 2px; background: var(--c-stroke); transform-origin: 50% 0; transform: scaleY(var(--ln)); }
.ai-build__flow li { --dot: 1; position: relative; font-size: 15.5px; line-height: 1.45; font-weight: 500; }
.ai-build__flow li::before { content: ""; position: absolute; top: 4px; inset-inline-start: -28px; width: 16px; height: 16px; border-radius: 50%; background: var(--b2); box-shadow: 0 0 0 4px var(--c-bg); transform: scale(var(--dot)); }
.ai-build__for { font-size: 15px; line-height: 1.55; color: var(--c-fg2); }
.ai-build__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.ai-build__meta span { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--c-stroke); font-size: 13px; font-weight: 650; color: var(--c-fg); }
.ai-build__meta span:first-child { background: var(--b2); color: var(--ink); box-shadow: none; }
@media (min-width: 900px) { .ai-builds__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- ink timeline: faded light streaks ---------- */
.ai-steps { overflow: clip; }
.ai-steps__photo { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.ai-steps__photo img { width: 100%; height: 100%; object-fit: cover; opacity: .16; mix-blend-mode: screen; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 25%, #000 75%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 25%, #000 75%, transparent 100%); }
.ai-steps > .wrap { position: relative; z-index: 1; }

/* ---------- results: the "AED 180K" figure is long for the 3-column ledger ---------- */
.sv-res__num--long { font-size: clamp(54px, 6.6vw, 108px); }

/* ---------- services ticket: the live "Explore <service>" label, kept as a small link to the FAQ (44px target) ---------- */
.sv-check__more { justify-self: start; display: inline-block; max-width: 100%; padding-block: 13px; font-size: 14px; font-weight: 650; line-height: 1.3; color: var(--b1-accent); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.sv-check__more i { display: inline-block; font-size: 13px; transition: transform .35s var(--ease); }
.sv-check__more:hover i { transform: translateX(calc(4px * var(--dir, 1))); }
.sv-check__end { white-space: nowrap; }
