/* ASN polish layer, on top of the original site.css.
   Keeps the site's layout, copy and motion. Adds:
   - code-drawn hero scenes for the inner pages (tools/site/hero_art.py), with intro, ambient motion and
     pointer parallax (assets/js/hero-art.js), replacing slow photos
   - the logo bar as a recurring brand mark (eyebrows, footer edge)
   - calmer details: 12px buttons, a floating header bar, a one-colour progress bar */

/* ---------- hero scenes ---------- */
.page-hero-media .ha { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ha-scene { transform-box: view-box; transform-origin: 70% 45%; animation: ha-in 2.2s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes ha-in { from { opacity: 0; transform: scale(1.07); } to { opacity: 1; transform: none; } }
.ha-paused *, .ha-paused { animation-play-state: paused !important; }

.ha-twinkle { animation: ha-twinkle 4.2s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
@keyframes ha-twinkle { from { opacity: 1; } to { opacity: .35; } }
.ha-drift { animation: ha-drift 26s ease-in-out infinite alternate; }
@keyframes ha-drift { to { transform: translate(-18px, 8px); } }
.ha-shoot { opacity: 0; animation: ha-shoot 11s 3s ease-in infinite; }
@keyframes ha-shoot {
  0% { opacity: 0; transform: translate(620px, 40px) rotate(24deg); }
  2% { opacity: 1; }
  9% { opacity: 0; transform: translate(1180px, 290px) rotate(24deg); }
  100% { opacity: 0; transform: translate(1180px, 290px) rotate(24deg); }
}
.ha-arcflow { animation: ha-dash 3s linear infinite; }
@keyframes ha-dash { to { stroke-dashoffset: -40; } }

.ha-breathe { animation: ha-breathe 7s ease-in-out infinite alternate; }
@keyframes ha-breathe { to { transform: translate(8px, -5px); } }
.ha-pulse { transform-box: fill-box; transform-origin: center; animation: ha-pulse 3.6s ease-out infinite; animation-delay: var(--d, 0s); }
@keyframes ha-pulse { 0% { transform: scale(.85); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
.ha-glint { animation: ha-glint 3.2s ease-in-out infinite alternate; }
@keyframes ha-glint { from { opacity: .45; } to { opacity: 1; } }
.ha-sway { transform-box: fill-box; transform-origin: 50% 100%; animation: ha-sway 5s ease-in-out infinite alternate; }
@keyframes ha-sway { from { transform: skewX(-2deg); } to { transform: skewX(2deg); } }

.ha-spin { transform-box: fill-box; transform-origin: center; animation: ha-spin var(--t, 60s) linear infinite; }
@keyframes ha-spin { to { transform: rotate(360deg); } }
.ha-sweep { transform-box: view-box; animation: ha-spin 12s linear infinite; }
.ha-streak { animation: ha-streak var(--s, 6s) linear infinite; animation-delay: var(--d, 0s); }
@keyframes ha-streak { 0% { transform: translateX(-260px); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(760px); opacity: 0; } }

.ha-ray { animation: ha-ray 8s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
@keyframes ha-ray { from { opacity: .45; } to { opacity: 1; } }
.ha-float { animation: ha-float 7s ease-in-out infinite alternate; }
@keyframes ha-float { to { transform: translateY(-14px); } }
.ha-rise { animation: ha-rise 13s linear infinite; animation-delay: var(--d, 0s); }
@keyframes ha-rise { 0% { transform: translate(0, 40px); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(26px, -220px); opacity: 0; } }

.ha-cloud { animation: ha-cloud 34s ease-in-out infinite alternate; }
@keyframes ha-cloud { to { transform: translateX(-60px); } }
.ha-sweepband { animation: ha-band 11s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes ha-band { 0% { transform: translateX(0); } 70%, 100% { transform: translateX(2200px); } }

.ha-glowpulse { animation: ha-glow 6s ease-in-out infinite alternate; }
@keyframes ha-glow { from { opacity: .82; } to { opacity: 1; } }
.ha-glitter { animation: ha-glitter 2.6s steps(6) infinite; }
@keyframes ha-glitter { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.ha-ripple { transform-box: fill-box; transform-origin: center; animation: ha-ripple 6.4s ease-out infinite; animation-delay: var(--d, 0s); }
@keyframes ha-ripple { 0% { transform: scale(.1); opacity: 0; } 15% { opacity: .9; } 100% { transform: scale(1.3); opacity: 0; } }
.ha-wave { animation: ha-wave 9s linear infinite; animation-delay: var(--d, 0s); }
@keyframes ha-wave { to { transform: translateX(-240px); } }
.ha-foam { animation: ha-glint 4s ease-in-out infinite alternate; }

/* Phones: keep each scene's focal point (x ≈ 70%) in frame instead of the centre crop */
@media (max-width: 760px) {
  .page-hero-media .ha { width: auto; max-width: none; height: 100%; aspect-ratio: 3 / 2; left: 50%; right: auto; transform: translateX(-66%); }
}

/* ---------- brand mark: the logo bar ---------- */
.eyebrow::before { content: ""; width: 18px; height: 4px; flex: none; background: linear-gradient(90deg, #2E3192 0 50%, #E31B23 50% 100%); }
.eyebrow--plain::before, .eyebrow--num::before { display: none; }
.progress span { background: #E31B23 !important; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #2E3192 0 50%, #E31B23 50% 100%); }

/* ---------- calmer controls ---------- */
.btn { border-radius: 12px; }
.btn--sm { border-radius: 11px; }
.site-header { top: 10px; left: 10px; right: 10px; border-radius: 14px; }
.site-header::before { border-radius: 14px; }
.nav-link { border-radius: 9px; }

@media (prefers-reduced-motion: reduce) {
  .ha *, .ha-scene { animation: none !important; }
  .ha-shoot, .ha-sweepband { display: none; }
}

/* Bright scenes (dawn, vineyard, sunset) keep their colour: the photo-era overlay only darkens the copy side */
.page-hero:has(.ha--engineering)::after, .page-hero:has(.ha--sustainability)::after, .page-hero:has(.ha--contact)::after {
  background:
    linear-gradient(90deg, rgba(6, 12, 32, .86) 0%, rgba(6, 12, 32, .62) 30%, rgba(6, 12, 32, .12) 58%, rgba(6, 12, 32, 0) 74%),
    linear-gradient(0deg, rgba(6, 12, 32, .8) 0%, rgba(6, 12, 32, 0) 36%);
}
@media (max-width: 760px) {
  .page-hero:has(.ha)::after { background: linear-gradient(0deg, rgba(6, 12, 32, .92) 0%, rgba(6, 12, 32, .7) 42%, rgba(6, 12, 32, .15) 72%, rgba(6, 12, 32, .05) 100%); }
}

/* ---------- per-scene overlays: tinted to each scene instead of one navy for all ---------- */
.page-hero:has(.ha)::after { --o: 6, 12, 32; background:
  linear-gradient(90deg, rgba(var(--o), .88) 0%, rgba(var(--o), .62) 32%, rgba(var(--o), .14) 60%, rgba(var(--o), 0) 76%),
  linear-gradient(0deg, rgba(var(--o), .86) 0%, rgba(var(--o), 0) 38%); }
.page-hero:has(.ha--performance)::after { --o: 6, 7, 18; }
.page-hero:has(.ha--engineering)::after { --o: 30, 14, 34; }
.page-hero:has(.ha--eco)::after { --o: 6, 18, 9; }
.page-hero:has(.ha--sustainability)::after { --o: 6, 26, 22; }
.page-hero:has(.ha--contact)::after { --o: 34, 14, 4; }
@media (max-width: 760px) {
  .page-hero:has(.ha)::after { background: linear-gradient(0deg, rgba(var(--o), .94) 0%, rgba(var(--o), .74) 44%, rgba(var(--o), .2) 74%, rgba(var(--o), .06) 100%); }
  .ha--eco .ha-float { display: none; }
}
/* fine film grain over every scene: hides gradient banding, adds a rendered feel */
.page-hero-media:has(.ha)::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* ---------- fluted glass: the scene seen through a pane of thick glass rods ----------
   Shading (.ha-flutes) is drawn in the SVG so it always lines up with the tubes. True refraction
   (filter #ha-tubes) runs where there is GPU headroom: larger screens with a fine pointer. */
.page-hero-media .ha { z-index: 0; }
@media (min-width: 900px) and (pointer: fine) {
  .ha-glass { filter: url(#ha-tubes); }
}
@media not all and (min-width: 900px) and (pointer: fine) {
  .ha-glass { filter: blur(9px); }
}
.page-hero-media:has(.ha)::after { opacity: .12; }

/* ---------- motion for the speed and telephoto scenes ---------- */
.ha-rush { transform-box: view-box; transform-origin: 1180px 450px; animation: ha-rush var(--s, 5s) cubic-bezier(.55, 0, .9, .4) infinite; animation-delay: var(--d, 0s); }
@keyframes ha-rush { 0% { transform: scale(.82); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1.32); opacity: 0; } }
.ha-haze { animation: ha-haze 7s ease-in-out infinite alternate; }
@keyframes ha-haze { to { transform: translateY(-12px); } }
.ha-ship { animation: ha-ship 46s linear infinite alternate; }
@keyframes ha-ship { to { transform: translateX(-70px); } }

/* ---------- one hero system for every inner page ----------
   Same height, same headline position (copy starts at a fixed distance below the nav, so a short
   or long intro never moves it), facts pinned to the bottom, one set of text colours. */
.page-hero { min-height: 100vh; min-height: 100svh; align-items: stretch; padding-top: calc(var(--nav-h) + clamp(64px, 15vh, 160px)); padding-bottom: clamp(32px, 4.5vw, 56px); }
.page-hero > .container { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px); }
.page-hero .meta-row { margin-top: auto; }
.page-hero h1 { font-size: clamp(3rem, 1.4rem + 4.6vw, 6.4rem); font-weight: 500; letter-spacing: -.045em; line-height: .96; color: #fff; }
.page-hero h1 em { color: #c9d5f2; font-weight: 600; }
.page-hero .lede { color: rgba(236, 240, 252, .8); font-size: clamp(1.02rem, .92rem + .35vw, 1.28rem); max-width: 38em; }
.page-hero .crumbs, .page-hero .crumbs a { color: rgba(236, 240, 252, .68); }
.page-hero .meta dt { color: rgba(236, 240, 252, .6); }
.page-hero .meta dd { color: #fff; }
.page-hero-copy { gap: clamp(18px, 2vw, 26px); }

/* phones: a clear step between headline and intro */
@media (max-width: 760px) {
  .page-hero { padding-top: calc(var(--nav-h) + 56px); }
  .page-hero h1 { font-size: clamp(2.9rem, 12.4vw, 3.6rem); line-height: .98; }
  .page-hero .lede { font-size: 1rem; line-height: 1.55; }
  .hero-title { font-size: clamp(2.9rem, 12.4vw, 3.6rem); }
  .hero-lede { font-size: 1rem; }
}

/* lightning: a faint resting bolt, a double flash every few seconds, the sky lighting with it */
.ha-bolt { opacity: .35; animation: ha-bolt 6.5s steps(1, end) infinite; }
@keyframes ha-bolt { 0%, 100% { opacity: .35; } 52% { opacity: 1; } 54% { opacity: .5; } 56% { opacity: 1; } 60% { opacity: .35; } }
.ha-flashglow { opacity: .45; animation: ha-flashglow 6.5s ease-out infinite; }
@keyframes ha-flashglow { 0%, 50%, 100% { opacity: .45; } 52% { opacity: 1; } 56% { opacity: .95; } 70% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .ha-bolt { opacity: .9; } .ha-flashglow { opacity: .7; } }

/* ---------- live-feedback round ---------- */
/* no shadow boxes behind hero copy: the scene overlays already carry legibility */
.page-hero-copy::before, .page-hero .meta-row::before { content: none !important; }
/* load: fade the scene in on the compositor instead of animating inside the glass filter */
.ha-scene { animation: none; }
.page-hero-media .ha { animation: ha-fade 1.4s ease-out both; }
@keyframes ha-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 760px) { .page-hero-media .ha { animation-name: ha-fade-m; } @keyframes ha-fade-m { from { opacity: 0; } to { opacity: 1; } } }
.page-hero:has(.ha--performance)::after { --o: 4, 10, 36; }

/* sub-nav: compact pills that tuck up when the header hides, so they cover less */
.subnav { top: calc(var(--nav-h) + 22px); transition: top .5s var(--ease); }
.site-header.is-hidden ~ main .subnav { top: 12px; }
.subnav-inner { padding: 3px; background: rgba(255, 255, 255, .72); }
.subnav a { height: 32px; padding: 0 13px; font-size: 13px; }

/* marquee: each product in its own colour, each one a link */
a.marquee-item { text-decoration: none; transition: opacity .3s; }
a.marquee-item em { color: var(--pc, var(--blue)); }
a.marquee-item:hover { opacity: .65; }
.marquee-item .pdot { width: 10px; height: 10px; border-radius: 50%; background: var(--pc); margin-right: 14px; flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--pc) 18%, transparent); }

/* home spotlight: say plainly that this is APEX-519 */
.spot-product { display: flex; align-items: baseline; gap: .28em; margin: 16px 0 4px; font-family: var(--f-display); font-weight: 700; font-size: clamp(3.2rem, 1.8rem + 5vw, 6.6rem); line-height: .9; letter-spacing: -.05em; color: #E31B23; }
.spot-product span { font-size: .42em; font-weight: 400; letter-spacing: -.02em; color: currentColor; opacity: .55; }

/* home hero: the molecules sit behind the same frosted fluted glass as the inner pages */
.hero .mol-canvas { filter: blur(3px) saturate(1.08); }
.hero-media::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .2) 0, rgba(0, 0, 0, .05) 4px, rgba(255, 255, 255, 0) 10px, rgba(255, 255, 255, .06) 14px, rgba(255, 255, 255, 0) 17px, rgba(0, 0, 0, 0) 36px, rgba(0, 0, 0, .14) 45px, rgba(255, 255, 255, .08) 48px); }

/* about: the NDP recognition, celebrated */
.ndp { position: relative; overflow: hidden; color: #fff; padding: clamp(72px, 9vw, 120px) 0;
  background: radial-gradient(55% 80% at 82% 30%, rgba(232, 194, 106, .2), rgba(232, 194, 106, 0) 60%), linear-gradient(160deg, #1a2478, #0a1242 70%); }
.ndp-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.ndp .eyebrow { color: #E8C26A; }
.ndp h2 { margin-top: 18px; font-family: var(--f-display); font-size: clamp(2.3rem, 1.4rem + 2.8vw, 4rem); font-weight: 500; line-height: 1; letter-spacing: -.045em; }
.ndp h2 em { font-style: normal; font-weight: 600; color: #E8C26A; }
.ndp p { margin-top: 20px; max-width: 36em; color: rgba(236, 240, 252, .8); }
.ndp p a { color: #fff; }
.ndp-years { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 20px); }
.ndp-year { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; text-align: center; gap: 4px;
  border: 1px solid rgba(232, 194, 106, .55); background: radial-gradient(circle at 35% 28%, rgba(255, 238, 196, .22), rgba(232, 194, 106, .06) 62%), rgba(255, 255, 255, .02);
  box-shadow: inset 0 0 0 7px rgba(232, 194, 106, .08), 0 24px 60px -30px rgba(232, 194, 106, .7); }
.ndp-year svg { width: 22px; height: 22px; margin: 0 auto; color: #E8C26A; }
.ndp-year b { font-size: clamp(1.5rem, .9rem + 2vw, 2.6rem); font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.ndp-year span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #E8C26A; }
.ndp-year::after { content: ""; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 42%, rgba(255, 240, 205, .28) 50%, transparent 58%); transform: translateX(-70%); animation: ndp-sheen 6s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes ndp-sheen { 0%, 62% { transform: translateX(-70%); } 100% { transform: translateX(70%); } }
@media (max-width: 760px) { .ndp-grid { grid-template-columns: 1fr; } }

/* footer: an ASN-coloured contour wave carries the page into the footer */
.site-footer { padding-top: calc(clamp(64px, 8vw, 112px) + clamp(40px, 5vw, 80px)); }
.ft-wave { position: absolute; top: 3px; left: 0; right: 0; height: clamp(80px, 9vw, 140px); pointer-events: none; }
.ft-wave svg { display: block; width: 100%; height: 100%; }
.ft-wave .w { stroke-dasharray: 2 9; animation: ha-dash 5s linear infinite; }

@media (prefers-reduced-motion: reduce) { .ndp-year::after, .ft-wave .w, .page-hero-media .ha { animation: none !important; } }
