/* Al Saeed visual polish layer — keeps all existing content and images, upgrades the look */
:root{--ap-navy:#0e2444;--ap-orange:#f47b20;--ap-orange2:#ffad61;--ap-teal:#0e7c7b;--ap-ease:cubic-bezier(.22,1,.36,1);--ap-shadow:0 18px 50px -28px rgba(7,27,55,.45);--ap-shadow-h:0 30px 70px -30px rgba(7,27,55,.55)}

/* Photos fill their frames instead of floating in grey boxes */
.ae-discovery-card img,.ae-story-scenes img,.ae-story-photo img,.ae-identity figure img,.ae-story-film img{object-fit:cover !important;width:100% !important;height:100% !important;transition:transform .9s var(--ap-ease),filter .6s}
.ae-discovery-card,.ae-story-photo,.ae-identity figure,.ae-story-scenes a{overflow:hidden}
.ae-discovery-card img,.ae-story-photo img{height:auto !important;aspect-ratio:16/10;max-height:none !important}

/* Discovery cards */
.ae-discovery-card{border-radius:22px !important;box-shadow:var(--ap-shadow);transition:transform .45s var(--ap-ease),box-shadow .45s var(--ap-ease),border-color .3s !important;border:1px solid rgba(14,36,68,.08) !important;background:#fff !important}
.ae-discovery-card:hover{transform:translateY(-8px);box-shadow:var(--ap-shadow-h);border-color:rgba(244,123,32,.45) !important}
.ae-discovery-card:hover img,.ae-story-photo:hover img,.ae-story-scenes a:hover img{transform:scale(1.07)}

/* Section titles: animated accent underline */
main#app section h2{position:relative}
main#app section h2::after{content:"";display:block;width:64px;height:4px;border-radius:4px;margin-top:12px;background:linear-gradient(90deg,var(--ap-orange),var(--ap-orange2));transform-origin:right;transform:scaleX(0);transition:transform 1s var(--ap-ease) .2s}
html[dir=ltr] main#app section h2::after{transform-origin:left}
main#app section.ap-in h2::after,main#app section h2.ap-in::after{transform:scaleX(1)}
.ae-lifecycle h2::after,.ae-lifecycle h1::after{display:none !important}

/* Buttons */
.ae-btn-primary,.ae-btn.ae-btn-primary{background:linear-gradient(135deg,#f47b20,#e2571a) !important;border:0 !important;box-shadow:0 12px 26px -12px rgba(226,87,26,.65);transition:transform .25s var(--ap-ease),box-shadow .25s !important}
.ae-btn-primary:hover{transform:translateY(-2px);box-shadow:0 18px 34px -12px rgba(226,87,26,.75)}
.ae-btn{transition:transform .25s var(--ap-ease),box-shadow .25s,background .25s !important}
.ae-btn:hover{transform:translateY(-2px)}

/* Clients: uniform tiles, colour on hover */
.ae-story-client-rail li{border-radius:18px !important;transition:transform .35s var(--ap-ease),box-shadow .35s !important;background:#fff !important}
.ae-story-client-rail li:hover{transform:translateY(-5px);box-shadow:var(--ap-shadow)}
.ae-story-client-rail li img{filter:grayscale(1) opacity(.8);transition:filter .4s}
.ae-story-client-rail li:hover img{filter:none}

/* Reviews cards */
.sa-rev-card{transition:transform .4s var(--ap-ease),box-shadow .4s !important}
.sa-rev-card:hover{transform:translateY(-6px);box-shadow:0 26px 60px -30px rgba(0,0,0,.55)}

/* Identity panel: never show a broken image box */
.ae-identity figure{background:radial-gradient(circle at 30% 25%,rgba(244,123,32,.25),transparent 55%),linear-gradient(135deg,#123c6d,#0e2444) !important;border-radius:0}
.ae-identity figure img.ap-broken{display:none !important}

/* Media + CTA */
.ae-story-photo,.ae-story-film{border-radius:20px !important;box-shadow:var(--ap-shadow);transition:transform .45s var(--ap-ease),box-shadow .45s !important}
.ae-story-photo:hover,.ae-story-film:hover{transform:translateY(-6px);box-shadow:var(--ap-shadow-h)}
.ae-f-cta,.ae-cta-card{background:radial-gradient(800px 260px at 85% 0%,rgba(244,123,32,.22),transparent 60%),linear-gradient(120deg,#0e2444,#123c6d 55%,#0e7c7b) !important}

/* Scroll reveal */
.ap-reveal{opacity:0;transform:translateY(34px);transition:opacity .9s var(--ap-ease),transform .9s var(--ap-ease)}
.ap-reveal.ap-in{opacity:1;transform:none}
.ap-stagger>.ap-reveal:nth-child(2){transition-delay:.08s}.ap-stagger>.ap-reveal:nth-child(3){transition-delay:.16s}.ap-stagger>.ap-reveal:nth-child(4){transition-delay:.24s}.ap-stagger>.ap-reveal:nth-child(5){transition-delay:.32s}.ap-stagger>.ap-reveal:nth-child(6){transition-delay:.4s}

/* Hero: slow Ken-Burns on the background photo + floating scroll cue */
@keyframes apKen{from{transform:scale(1)}to{transform:scale(1.08)}}
.ae-lifecycle img{animation:apKen 18s ease-in-out infinite alternate}
.ae-lifecycle{overflow:hidden}

/* Dark mode keeps contrast */
html.dark .ae-discovery-card,[data-theme=dark] .ae-discovery-card,html.dark .ae-story-client-rail li,[data-theme=dark] .ae-story-client-rail li{background:#122a49 !important;border-color:rgba(255,255,255,.08) !important}

@media (prefers-reduced-motion:reduce){.ap-reveal{opacity:1;transform:none;transition:none}.ae-lifecycle img{animation:none}main#app section h2::after{transform:scaleX(1);transition:none}}

/* ===== HRP-style layer (Al Saeed colours) ===== */
/* Floating glass navbar */
#hdr{background:transparent !important;box-shadow:none !important;border:0 !important;padding:10px 16px 0 !important}
#hdr .hdr-in{background:rgba(255,255,255,.86) !important;-webkit-backdrop-filter:blur(16px) saturate(1.4);backdrop-filter:blur(16px) saturate(1.4);border:1px solid rgba(14,36,68,.08);border-radius:20px;box-shadow:0 14px 40px -24px rgba(7,27,55,.45);max-width:1280px;margin:0 auto}
/* Soft colour glows in the page background */
body{isolation:isolate}
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(520px 380px at 92% 12%,rgba(244,123,32,.10),transparent 70%),radial-gradient(560px 420px at 4% 58%,rgba(14,124,123,.09),transparent 70%),radial-gradient(480px 360px at 80% 96%,rgba(18,60,109,.08),transparent 70%)}
/* Pill kickers above section titles */
.ae-kicker,.sa-next-kicker,.ae-media-eyebrow{display:inline-flex !important;align-items:center;gap:6px;width:auto !important;padding:6px 14px !important;border-radius:999px !important;background:rgba(244,123,32,.10) !important;border:1px solid rgba(244,123,32,.28) !important;color:#d9621a !important;font-weight:600 !important;font-size:13px !important}
.ae-kicker::before,.sa-next-kicker::before,.ae-media-eyebrow::before{content:"";width:7px;height:7px;border-radius:50%;background:#f47b20;box-shadow:0 0 0 4px rgba(244,123,32,.18)}
/* Pill buttons with gradient */
.ae-btn,.ae-lc-primary,.ae-lc-secondary,.ae-text-link{border-radius:999px !important}
.ae-lc-primary{background:linear-gradient(135deg,#f47b20,#e2571a) !important;box-shadow:0 14px 30px -14px rgba(226,87,26,.7)}
.ae-btn-ghost,.ae-lc-secondary{backdrop-filter:blur(6px)}
/* Rounded cards everywhere */
.ae-tile,.ae-sys,.ae-lib-item,.sa-success-card,.sa-issuer-card,.ae-path,.ae-cc{border-radius:22px !important;transition:transform .45s var(--ap-ease),box-shadow .45s var(--ap-ease) !important}
.ae-tile:hover,.ae-sys:hover,.ae-lib-item:hover,.sa-success-card:hover,.sa-issuer-card:hover,.ae-path:hover,.ae-cc:hover{transform:translateY(-6px);box-shadow:var(--ap-shadow-h)}
.ae-tile img,.ae-path img,.sa-success-card img{transition:transform .9s var(--ap-ease)}
.ae-tile:hover img,.ae-path:hover img,.sa-success-card:hover img{transform:scale(1.06)}
/* Reveal with soft blur, like HRP */
.ap-reveal{filter:blur(6px)}
.ap-reveal.ap-in{filter:none}
html.dark #hdr .hdr-in,[data-theme=dark] #hdr .hdr-in{background:rgba(10,24,45,.82) !important;border-color:rgba(255,255,255,.08)}
@media (max-width:760px){#hdr{padding:6px 8px 0 !important}#hdr .hdr-in{border-radius:16px}}

/* ===== v3: nsqapp / ia.edu.sa / bakkah inspired touches ===== */
/* Hero: animated tech grid + brand glows over the existing photo */
.ae-lifecycle{position:relative}
.ae-lifecycle::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:1;background:linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px) 0 0/56px 56px,linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px) 0 0/56px 56px,radial-gradient(600px 300px at 85% 15%,rgba(244,123,32,.22),transparent 70%),radial-gradient(500px 300px at 10% 90%,rgba(14,124,123,.25),transparent 70%);animation:apGrid 22s linear infinite;mask-image:linear-gradient(180deg,#000 60%,transparent)}
@keyframes apGrid{to{background-position:0 56px,56px 0,0 0,0 0}}
.ae-lifecycle h1{background:linear-gradient(90deg,#fff 0%,#ffd2a8 45%,#fff 90%);background-size:220% 100%;-webkit-background-clip:text;background-clip:text;color:transparent !important;animation:apShine 7s linear infinite}
@keyframes apShine{0%{background-position:200% 0}100%{background-position:-200% 0}}
/* Gradient CTA like ia.edu.sa, in Al Saeed orange → gold */
.ae-lc-primary,.ae-btn-primary{background:linear-gradient(110deg,#f47b20 0%,#e2571a 45%,#c9a227 100%) !important;background-size:180% 100% !important;transition:background-position .5s,transform .25s,box-shadow .25s !important}
.ae-lc-primary:hover,.ae-btn-primary:hover{background-position:100% 0 !important}
/* Dark feature blocks (reviews / CTA) get glowing edge like ia.edu.sa */
#sa-next-reviews,.ae-f-cta{position:relative;overflow:hidden}
#sa-next-reviews::before{content:"";position:absolute;inset:-1px;border-radius:inherit;pointer-events:none;background:radial-gradient(500px 220px at 90% 0%,rgba(244,123,32,.25),transparent 70%),radial-gradient(500px 260px at 0% 100%,rgba(14,124,123,.25),transparent 70%)}
/* Review cards: rating chip */
.sa-rev-card{border-top:3px solid #f47b20 !important}
/* Back-to-top + reading progress */
.ap-top{position:fixed;bottom:96px;left:24px;z-index:60;width:46px;height:46px;border-radius:50%;border:0;cursor:pointer;background:#0e2444;color:#fff;box-shadow:0 14px 30px -12px rgba(7,27,55,.6);display:flex;align-items:center;justify-content:center;opacity:0;transform:translateY(16px);pointer-events:none;transition:.35s var(--ap-ease)}
.ap-top.on{opacity:1;transform:none;pointer-events:auto}
.ap-top:hover{background:#f47b20}
html[dir=ltr] .ap-top{left:auto;right:24px}
/* Section spacing rhythm */
main#app section.wrap{scroll-margin-top:96px}
@media (prefers-reduced-motion:reduce){.ae-lifecycle::after,.ae-lifecycle h1{animation:none}}
