/* ============================================================================
   ALDesign Group — Base & shared components
   Depends on tokens.css. Shared across portal + all sub-brand sites.
   ========================================================================== */

/* --- Reset ---------------------------------------------------------------- */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: var(--weight-reg);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img,svg,video { display:block; max-width:100%; height:auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul[role="list"] { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; border-radius: 2px; }

/* --- Headings ------------------------------------------------------------- */
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: var(--weight-bold);
  line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
p  { max-width: 64ch; }

/* --- Layout helpers ------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide { max-width: var(--container-wide); }
.section { padding-block: var(--section-y); }
.stack > * + * { margin-top: var(--space-6); }
.eyebrow { font-size: var(--step--1); font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-muted); }
.lede { font-size: var(--step-1); color: var(--n-800); max-width: 56ch; }
.muted { color: var(--text-muted); }
.accent-rule { height:2px; width:64px; background: var(--accent); border:0; }

/* --- Accessibility utilities --------------------------------------------- */
.visually-hidden { position:absolute!important; width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.skip-link { position:absolute; left:var(--space-4); top:-100px; z-index:var(--z-overlay);
  background:var(--accent); color:var(--on-accent); padding:.6rem 1rem; border-radius:var(--radius-sm);
  transition: top var(--dur-1) var(--ease-out); }
.skip-link:focus { top: var(--space-4); }

/* --- Buttons -------------------------------------------------------------- */
.btn { display:inline-flex; align-items:center; gap:.6em; padding:.85em 1.5em;
  border-radius:var(--radius-pill); font-weight:var(--weight-med); font-size:var(--step--1);
  letter-spacing:.02em; transition: transform var(--dur-1) var(--ease-out),
  background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }
.btn--primary { background:var(--accent); color:var(--on-accent); }
.btn--ghost { border:1px solid var(--border); color:var(--text); }
.btn--ghost:hover { border-color:var(--accent); color:var(--accent-ink); }
.btn:hover { transform: translateY(-2px); }
.btn .btn__arrow { transition: transform var(--dur-2) var(--ease-emph); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* --- Site header / nav (shared) ------------------------------------------ */
.site-header { position:fixed; inset:0 0 auto 0; z-index:var(--z-nav);
  display:flex; align-items:center; justify-content:space-between;
  padding: clamp(1rem,2.4vw,1.6rem) var(--gutter);
  transition: background var(--dur-2) var(--ease-out), backdrop-filter var(--dur-2); }
.site-header.is-scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); border-bottom: var(--hairline); }
.site-header__logo { font-family:var(--font-display); font-weight:700; font-size:1.25rem; letter-spacing:-.01em; }
.site-header__logo b { color: var(--accent); font-weight:700; }
.nav { display:flex; gap: clamp(1rem,2.5vw,2.5rem); align-items:center; }
.nav a { font-size:var(--step--1); color:var(--text-muted); position:relative; transition:color var(--dur-2) var(--ease-out); }
.nav a::after { content:""; position:absolute; left:0; bottom:-6px; height:2px; width:0; background:var(--accent); transition: width var(--dur-2) var(--ease-emph); }
.nav a:hover, .nav a[aria-current="page"] { color:var(--text); }
.nav a:hover::after, .nav a[aria-current="page"]::after { width:100%; }

/* --- Footer (shared) ------------------------------------------------------ */
.site-footer { border-top: var(--hairline); padding-block: var(--space-16) var(--space-8); }
.site-footer a:hover { color: var(--accent-ink); }

/* --- Page-transition curtain (B3: shared-element handoff in app.js) ------- */
.curtain { position:fixed; inset:0; z-index:var(--z-curtain); background:var(--accent);
  transform: scaleY(0); transform-origin: bottom; pointer-events:none; will-change:transform; }
/* transient clones injected by the B3 handoff (leave clone + arrive cover) */
.t-clone, .t-cover { pointer-events:none; }

/* --- Scroll-reveal base (JS toggles .is-in) ------------------------------ */
/* Hidden ONLY when JS is confirmed running (html.js set by app.js). If the
   script never loads, html.js is absent and content stays fully visible. */
html.js [data-reveal] { opacity:0; transform: translateY(28px); }
html.js [data-reveal].is-in { opacity:1; transform:none;
  transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-emph); }

/* ==========================================================================
   PROGRESSIVE ENHANCEMENT — total JS failure (no <noscript> needed beyond this)
   If JS never runs, [data-reveal] elements must still be fully visible.
   The portal also ships a <noscript> block as belt-and-braces.
   ========================================================================== */

/* --- Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation-duration:.001ms!important; animation-iteration-count:1!important;
    transition-duration:.001ms!important; scroll-behavior:auto!important; }
  [data-reveal] { opacity:1!important; transform:none!important; }
  .curtain, .t-clone, .t-cover { display:none!important; }
}

/* --- RTL readiness (Arabic layer) ---------------------------------------- */
[dir="rtl"] .btn .btn__arrow { transform: scaleX(-1); }
[dir="rtl"] .nav a::after { left:auto; right:0; }

/* --- Smooth scroll (Lenis) + parallax helpers ---------------------------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }
/* Parallax layers are GPU-composited; only transform/opacity ever animate. */
[data-parallax], [data-depth] { will-change: transform; }
[data-parallax-scene] { position: relative; }

/* --- Synthetic photo-depth scene (2.5D from a single flat image) ---------- */
/* A flat JPEG can't be auto-separated into real layers, so depth is faked:
   the photo is zoomed and drifts one way, a brand-tinted veil counter-drifts,
   and the headline drifts a third amount — the differential motion reads as
   parallax depth. JS-gated (needs [data-depth]); reduced-motion shows it static. */
.depthscene { position:relative; overflow:hidden; isolation:isolate; }
.depthscene__media { position:absolute; inset:0; z-index:-1; pointer-events:none; }
.depthscene__img {
  position:absolute; inset:-6%;            /* bleed so scale/drift never reveals an edge */
  width:112%; height:112%; object-fit:cover;
  transform: scale(1.12); transform-origin:center; }
.depthscene__veil {
  position:absolute; inset:-8%;
  background:
    radial-gradient(70% 60% at 70% 18%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 72%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 30%, transparent) 0%,
                            color-mix(in srgb, var(--bg) 62%, transparent) 60%,
                            var(--bg) 100%); }
.depthscene__scrim {                        /* keeps text AA over any photo region */
  position:absolute; inset:0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 78%, transparent) 0%,
                                     color-mix(in srgb, var(--bg) 40%, transparent) 48%,
                                     transparent 78%); }
@media (prefers-reduced-motion: reduce) {
  .depthscene__img { inset:0; width:100%; height:100%; transform:none; }
  .depthscene__veil { inset:0; }
}
@media (prefers-reduced-motion: reduce) {
  [data-parallax], [data-depth] { transform: none !important; will-change: auto; }
}

/* ==========================================================================
   Ambient site background ("atmos") - derived from CP intro 01 art.
   Injected once by app.js as the first <body> child. Fixed, behind all
   content (z-index:-1); html keeps a flat --bg fallback for no-JS.
   B1 restraint (Jun 28): reduced to a STATIC brand wash + vignette only.
   Removed the drifting hazes, pulsing horizon line, and particle canvas so
   the page is still at rest; motion now happens only on scroll/navigation.
   ========================================================================== */
.site-atmos { position:fixed; inset:0; z-index:-1; overflow:hidden; pointer-events:none;
  background:
    radial-gradient(120% 78% at 50% 118%, rgba(33,104,154,.15), transparent 60%),
    linear-gradient(180deg, #0B0D10 0%, #0E141A 56%, #070A0D 100%); }
.site-atmos__vig { position:absolute; inset:0; box-shadow:inset 0 0 200px 70px rgba(0,0,0,.5); }

/* ============================================================================
   B4/B6 POLISH — considered micro-details (restrained; no new ambient motion)
   ========================================================================== */
/* brand-tinted text selection — a "considered" detail both references have */
::selection { background: color-mix(in srgb, var(--accent) 38%, transparent); color: var(--text); }

/* in-prose links: visible affordance (does NOT touch nav / cards / buttons) */
.prose a, .pd-overview a, .lede a {
  color: var(--accent-ink);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em;
  text-decoration-color: color-mix(in srgb, var(--accent-ink) 45%, transparent);
  transition: text-decoration-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }
.prose a:hover, .pd-overview a:hover, .lede a:hover { text-decoration-color: var(--accent-ink); }

/* primary CTA: subtle tactility on hover (depth, not movement noise) */
.btn--primary { transition: transform var(--dur-2) var(--ease-emph),
  box-shadow var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out); }
.btn--primary:hover { box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
@media (prefers-reduced-motion: reduce){ .btn:hover { transform: none; } }
