/* ==========================================================================
   AER TECH — v2 motion & photography layer
   ========================================================================== */

/* ---------- Smooth scroll (Lenis) ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Intro loader ---------- */
.loader { position: fixed; inset: 0; z-index: 1000; background: var(--dark); color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; pointer-events: none; }
.loader__logo { position: absolute; top: 40px; left: 48px; height: 64px; width: auto; }
.loader__num { font-size: clamp(4rem, 14vw, 12rem); font-weight: 800; letter-spacing: -0.06em; line-height: .9; font-variant-numeric: tabular-nums; }
.loader__num span { color: var(--accent); }
.loader__label { display: flex; justify-content: space-between; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-on-dark); margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border-dark); }
.loader__bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--accent); }
html:not(.has-loader) .loader { display: none; }

/* ---------- Scroll progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; transform-origin: 0 50%; transform: scaleX(0); background: var(--accent); pointer-events: none; }

/* ---------- HERO v2 (photo + airflow canvas) ---------- */
.hero--photo { display: flex; flex-direction: column; }
.hero__main { position: relative; z-index: 3; display: flex; align-items: center; width: 100%; min-height: min(100svh, 960px); }
.hero__bg { position: absolute; inset: -6% 0 0 0; z-index: 0; }
.hero__bg img { width: 100%; height: 106%; object-fit: cover; animation: kenburns 28s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.04) translate3d(0,0,0); } to { transform: scale(1.16) translate3d(-2%, -1.5%, 0); } }
.hero__shade { position: absolute; inset: 0; z-index: 1; background:
  linear-gradient(90deg, rgba(7,26,54,.97) 0%, rgba(7,26,54,.86) 38%, rgba(7,26,54,.45) 70%, rgba(7,26,54,.7) 100%),
  linear-gradient(0deg, rgba(7,26,54,1) 0%, rgba(7,26,54,0) 35%); }
.hero__air { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.hero--photo .hero__grid-bg { z-index: 2; opacity: .6; }
.hero--photo .hero__inner { z-index: 3; width: 100%; }
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.hero h1 .w > span { display: inline-block; will-change: transform; }
.hero-visual--glass { background: rgba(7, 26, 54, .55); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-color: rgba(255,255,255,.14); }

/* ---------- Trusted by (above the client marquee) ---------- */
.trusted { position: relative; z-index: 3; padding: 40px 0 36px; }
.trusted__title { position: relative; max-width: 560px; padding-top: 26px; margin-bottom: 14px; font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; text-transform: uppercase; color: #fff; }
.trusted__title::before { content: ""; position: absolute; left: 0; top: 0; width: 48px; height: 3px; background: var(--accent); }
.trusted__lead { max-width: 520px; margin: 0; font-size: 18px; color: var(--text-on-dark); }

/* ---------- Marquee (client logos) ---------- */
.marquee { position: relative; z-index: 3; overflow: hidden; color: #fff; padding: 18px 0 72px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; width: max-content; animation: marquee 42s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.client { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; }
.client__logo { display: inline-flex; align-items: center; gap: 12px; height: 68px; padding: 0 24px; background: #fff; border-radius: var(--radius-sm); }
.client__logo img { display: block; height: var(--h, 36px); width: auto; }
.client__logo b { font-size: 13px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: var(--dark); white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Scroll-lit statement ---------- */
.statement { font-size: clamp(1.75rem, 3.6vw, 3.1rem); font-weight: 700; line-height: 1.22; letter-spacing: -0.03em; max-width: 1080px; margin: 0; }
.statement .sw { color: #C5CDD8; transition: color .2s linear; }
.statement .sw.on { color: var(--text); }
.statement .sw.red.on { color: var(--accent); }
.no-gsap .statement .sw { color: var(--text); }

/* ---------- Solutions hover list with sticky image ---------- */
.sol-list { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.sol-list__items { border-top: 1px solid var(--border); }
.sol-item { position: relative; display: grid; grid-template-columns: 48px 1fr 44px; gap: 18px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.sol-item::before { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--accent); transition: width .5s var(--ease); }
.sol-item.is-active::before, .sol-item:hover::before { width: 100%; }
.sol-item__num { font-size: 13px; font-weight: 600; color: #A9B4C4; font-variant-numeric: tabular-nums; }
.sol-item h3 { font-size: clamp(1.15rem, 1.7vw, 1.5rem); margin: 0; transition: color .3s, transform .4s var(--ease); }
.sol-item p { margin: 6px 0 0; font-size: 14.5px; color: var(--text-muted); max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s var(--ease), opacity .4s; }
.sol-item.is-active h3 { color: var(--primary); transform: translateX(6px); }
.sol-item.is-active p { max-height: 80px; opacity: 1; }
.sol-item__go { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--primary); transition: all .35s var(--ease); }
.sol-item__go .ico { width: 18px; height: 18px; }
.sol-item.is-active .sol-item__go { background: var(--accent); border-color: var(--accent); color: #fff; transform: rotate(-45deg); }
.sol-list__media { position: sticky; top: calc(var(--header-h) + 32px); aspect-ratio: 4 / 4.4; border-radius: 22px; overflow: hidden; background: var(--dark); }
.sol-list__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.12); transition: opacity .7s var(--ease), transform 1.4s var(--ease); }
.sol-list__media img.is-active { opacity: 1; transform: scale(1); }
.sol-list__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(7,26,54,.85)); }
.sol-list__caption { position: absolute; left: 28px; right: 28px; bottom: 26px; z-index: 1; color: #fff; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.sol-list__caption b { font-size: 22px; letter-spacing: -0.02em; }
.sol-list__caption small { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-on-dark); margin-bottom: 4px; }
.chip-spec { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(8px); font-size: 12.5px; font-weight: 600; white-space: nowrap; }

/* ---------- Parallax stats band ---------- */
.band { position: relative; overflow: hidden; color: #fff; padding: 140px 0; background: var(--dark); }
.band__bg { position: absolute; inset: -18% 0; }
.band__bg img { width: 100%; height: 100%; object-fit: cover; }
.band::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(7,26,54,.88), rgba(7,26,54,.72) 50%, rgba(7,26,54,.92)); }
.band > .container { position: relative; z-index: 2; }
.band h2 { color: #fff; max-width: 760px; }
.band-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 56px; border-top: 1px solid rgba(255,255,255,.18); }
.band-stat { padding: 32px 28px 0 0; }
.band-stat b { display: block; font-size: clamp(2.4rem, 4.6vw, 4.2rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.band-stat b span { color: var(--accent); }
.band-stat small { display: block; margin-top: 12px; font-size: 14.5px; color: var(--text-on-dark); }

/* ---------- Horizontal industries ---------- */
.hscroll { overflow: hidden; }
.hscroll__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 44px; }
.hscroll__track { display: flex; gap: 20px; padding-left: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))); padding-right: var(--gutter); width: max-content; will-change: transform; }
.no-gsap .hscroll__track, .hscroll--native .hscroll__track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 8px; }
.no-gsap .hscroll__track::-webkit-scrollbar, .hscroll--native .hscroll__track::-webkit-scrollbar { display: none; }
.ind-card { position: relative; flex: none; width: clamp(280px, 30vw, 400px); aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden; color: #fff; scroll-snap-align: start; isolation: isolate; }
.ind-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease); }
.ind-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7,26,54,.15) 0%, rgba(7,26,54,.35) 45%, rgba(7,26,54,.95) 100%); transition: background-color .5s; }
.ind-card:hover img { transform: scale(1.08); }
.ind-card:hover::before { background-color: rgba(11,44,87,.35); }
.ind-card__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px; }
.ind-card__num { position: absolute; top: 24px; left: 28px; font-size: 13px; font-weight: 600; letter-spacing: .1em; color: rgba(255,255,255,.75); }
.ind-card__icon { position: absolute; top: 18px; right: 18px; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; transition: background-color .35s, transform .5s var(--ease); }
.ind-card:hover .ind-card__icon { background: var(--accent); border-color: var(--accent); transform: rotate(-45deg); }
.ind-card h3 { color: #fff; font-size: 24px; margin-bottom: 8px; }
.ind-card p { margin: 0; color: rgba(255,255,255,.78); font-size: 14.5px; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s var(--ease), opacity .4s; }
.ind-card:hover p, .ind-card:focus-visible p { max-height: 90px; opacity: 1; }
.hscroll__progress { height: 2px; background: var(--border-dark); margin-top: 36px; position: relative; overflow: hidden; }
.hscroll__progress i { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Process line drawing ---------- */
.process__line { position: absolute; left: 0; right: 0; top: 27px; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); z-index: 0; }
.no-gsap .process__line { transform: scaleX(1); }
.process__step { z-index: 1; }

/* ---------- Photo media (projects, details, news) ---------- */
.project__media img.photo, .detail__media img.photo, .news-card__media img.photo { filter: saturate(.9) contrast(1.02); }
.project__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(7,26,54,.45)); pointer-events: none; }
.detail__media { box-shadow: 0 30px 60px -30px rgba(7,26,54,.35); }
.detail__badge { position: absolute; left: 20px; bottom: 20px; z-index: 2; display: flex; gap: 8px; flex-wrap: wrap; color: #fff; }
.img-reveal { clip-path: inset(0 0 0 0 round 20px); }
.has-gsap .img-reveal { clip-path: inset(12% 12% 12% 12% round 20px); }

/* Page hero with photo */
.page-hero--photo { min-height: 460px; display: flex; align-items: flex-end; }
.page-hero--photo .page-hero__bg { position: absolute; inset: -10% 0; z-index: 0; }
.page-hero--photo .page-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero--photo::before { z-index: 1; background-color: transparent; }
.page-hero--photo .page-hero__shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(7,26,54,.96) 0%, rgba(7,26,54,.82) 45%, rgba(7,26,54,.4) 100%), linear-gradient(0deg, rgba(7,26,54,.9), transparent 60%); }
.page-hero--photo::after { z-index: 1; }
.page-hero--photo .page-hero__inner { z-index: 2; width: 100%; padding-top: 110px; }

/* Industry page cards with photo */
.card--photo { padding: 0; overflow: hidden; }
.card--photo .card__photo { position: relative; aspect-ratio: 16 / 8; overflow: hidden; }
.card--photo .card__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.card--photo:hover .card__photo img { transform: scale(1.06); }
.card--photo .card__photo .card__icon { position: absolute; left: 24px; bottom: -26px; margin: 0; background: #fff; z-index: 1; }
.card--photo .card__inner { padding: 44px 32px 32px; display: flex; flex-direction: column; flex: 1; }

/* Spotlight + tilt */
.spot { position: relative; overflow: hidden; }
.spot::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(11,44,87,.08), transparent 45%); }
.section--dark .spot::after, .section--primary .spot::after, .industry.spot::after { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.1), transparent 45%); }
.spot:hover::after { opacity: 1; }
[data-tilt] { transform-style: preserve-3d; will-change: transform; }
.btn[data-magnetic] { will-change: transform; }

/* CTA with photo */
.cta-band--photo { background: var(--dark); }
.cta-band--photo .cta-band__bg { position: absolute; inset: 0; z-index: 0; }
.cta-band--photo .cta-band__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.cta-band--photo::before { z-index: 0; }
.cta-band--photo > :not(.cta-band__bg) { z-index: 1; }

/* Split photo (services / about) */
.photo-frame { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3.2; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-frame__tag { position: absolute; left: 20px; bottom: 20px; }

@media (max-width: 1024px) {
  .sol-list { grid-template-columns: 1fr; gap: 32px; }
  .sol-list__media { position: relative; top: 0; aspect-ratio: 16 / 10; order: -1; }
  .band-stats { grid-template-columns: repeat(2, 1fr); }
  .band { padding: 100px 0; }
  .hscroll__head { flex-direction: column; align-items: flex-start; gap: 20px; }
}
@media (max-width: 680px) {
  .loader { padding: 24px; }
  .loader__logo { top: 24px; left: 24px; }
  .hero--photo { min-height: 0; }
  .hero__shade { background: linear-gradient(180deg, rgba(7,26,54,.85), rgba(7,26,54,.95)); }
  .band-stat { padding-right: 12px; }
  .ind-card { width: 78vw; }
  .ind-card p { max-height: 90px; opacity: 1; }
  .page-hero--photo { min-height: 380px; }
  .sol-item { grid-template-columns: 36px 1fr 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__bg img, .marquee__track { animation: none !important; }
  .statement .sw { color: var(--text) !important; }
}
@keyframes spin { to { transform: rotate(360deg); } }
.card--photo .card__photo .card__icon { bottom: 18px; left: 18px; }
.card--photo .card__inner { padding-top: 30px; }
