/* Page hero: the top of every page except the homepage.

   <section class="ph">
     {{scene:pagehero}}                      backdrop: glows + signal-field canvas
     <div class="ph-chips">…</div>           optional floating chips (desktop only)
     <div class="container ph-inner">…</div> badge, .tag, h1.ph-title[data-decode], .ph-lede, .ph-cta
   </section> */

/* a gentle dusk: navy sky on top, a faint pink and peach glow low down, fading into the page */
.ph { position: relative; isolation: isolate; overflow: clip; text-align: center; padding: clamp(52px, 8vw, 108px) 0 clamp(52px, 7vw, 92px); background: radial-gradient(42% 30% at 50% 90%, rgba(252, 115, 77, .2), transparent 72%), radial-gradient(78% 42% at 50% 94%, rgba(201, 120, 196, .26), transparent 72%), radial-gradient(70% 70% at 18% 0%, rgba(11, 28, 74, .9), transparent 70%), linear-gradient(180deg, #050A1E 0%, #071233 42%, #0C1C52 76%, #16205C 100%); }
.ph.ph-tight { padding-bottom: clamp(28px, 4vw, 48px); }

/* backdrop */
.ph-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: clip; }
:not(.ph) > .ph-bg { position: relative; height: 70vh; background: radial-gradient(42% 30% at 50% 90%, rgba(252, 115, 77, .2), transparent 72%), radial-gradient(78% 42% at 50% 94%, rgba(201, 120, 196, .26), transparent 72%), radial-gradient(70% 70% at 18% 0%, rgba(11, 28, 74, .9), transparent 70%), linear-gradient(180deg, #050A1E 0%, #071233 42%, #0C1C52 76%, #16205C 100%); } /* scene-test page */
.ph-canvas { position: absolute; inset: 0; width: 100%; height: 100%; transform: translate3d(0, calc(var(--sy, 0) * 70px), 0); }
.ph-glow { position: absolute; border-radius: 50%; filter: blur(72px); will-change: transform; }
.ph-glow-a { width: min(46vw, 620px); height: min(34vw, 440px); left: -10%; top: -44%; background: rgba(54, 173, 224, .2); animation: ph-drift-a 18s ease-in-out infinite alternate; }
.ph-glow-b { width: min(40vw, 540px); height: min(30vw, 400px); right: -8%; bottom: -24%; background: rgba(201, 120, 196, .2); animation: ph-drift-b 22s ease-in-out infinite alternate; }
/* the last strip melts the warm glow into the page colour so the next section joins without a seam */
.ph-fade { position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(180deg, rgba(5, 10, 30, 0) 0%, rgba(5, 10, 30, .35) 45%, var(--bg) 100%); }
@keyframes ph-drift-a { to { transform: translate3d(18%, 22%, 0) scale(1.15); } }
@keyframes ph-drift-b { to { transform: translate3d(-22%, -18%, 0) scale(1.2); } }

/* copy */
.ph-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.ph .tag { justify-content: center; margin-bottom: 18px; }
.ph .tag::after { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .7; }
.ph-title { font-size: clamp(2.25rem, 5.1vw, 4rem); font-weight: 600; line-height: 1.03; letter-spacing: -.03em; color: var(--ink); margin: 0 auto .42em; max-width: 17ch; text-wrap: balance; }
.ph-title .grad { padding-bottom: .12em; margin-bottom: -.12em; display: inline; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ph-title .grad .w { background: linear-gradient(100deg, #fff 0%, #fff 38%, var(--peach) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .12em; margin-bottom: -.12em; }
.ph-lede { font-size: clamp(1.02rem, 1.35vw, 1.2rem); line-height: 1.6; color: var(--ink-2); max-width: 52ch; margin: 0 auto; text-wrap: pretty; }
.ph-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: clamp(22px, 2.6vw, 32px); }
.ph-note { display: inline-flex; align-items: center; gap: 9px; margin: 18px 0 0; font-family: var(--f-mono); font-size: .68rem; letter-spacing: 0; color: var(--ink-3); }
.ph-note i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 22%, transparent); animation: fx-pulse 1.6s ease-in-out infinite; }
.ph-notes { list-style: none; margin: clamp(20px, 2.4vw, 28px) 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; font-family: var(--f-mono); font-size: .7rem; letter-spacing: 0; color: var(--ink-2); }
.ph-notes li { display: inline-flex; align-items: center; gap: 8px; }
.ph-notes svg { width: 15px; height: 15px; color: var(--mint); stroke-width: 2.25; }

/* page icon badge above the eyebrow */
.ph-badge { position: relative; width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 22px; color: var(--sky-3); background: linear-gradient(180deg, #fff 30%, #DCEFFA); box-shadow: 0 16px 40px -8px rgba(54, 173, 224, .45), 0 0 0 1px rgba(255, 255, 255, .5), inset 0 -2px 0 rgba(2, 151, 222, .12); }
.ph-badge svg { width: 26px; height: 26px; }
.ph-badge::before, .ph-badge::after { content: ""; position: absolute; inset: -9px; border-radius: 26px; border: 1px solid color-mix(in srgb, var(--sky) 32%, transparent); }
.ph-badge::after { inset: -9px; animation: ph-badge-ring 2.8s var(--e-out) infinite; }
.js .ph-badge.in svg path { stroke-dasharray: 1; animation: ph-draw 1.1s var(--e-out) .25s backwards; }
@keyframes ph-badge-ring { 0% { transform: scale(.82); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes ph-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* floating chips: the broadcast wave "delivers" to each one as it passes */
.ph-chips { position: absolute; inset: 0; pointer-events: none; display: none; }
.ph-chip { position: absolute; translate: calc(var(--px, 0) * var(--d, 1) * -18px) calc(var(--py, 0) * var(--d, 1) * -12px + var(--sy, 0) * var(--d, 1) * -46px); }
.ph-chip b { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; font-size: .86rem; font-weight: 500; line-height: 1; color: var(--ink); white-space: nowrap; background: rgba(11, 22, 56, .58); border: 1px solid var(--line-2); box-shadow: 0 14px 36px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06); -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%); animation: ph-bob var(--t, 7s) ease-in-out infinite; }
.ph-chip i { position: relative; width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-light); transition: background .4s ease, color .4s ease; }
.ph-chip i svg { width: 16px; height: 16px; }
.ph-chip i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--mint); opacity: 0; }
.ph-chip.ph-ping i { animation: ph-pop .7s var(--e-spring); background: color-mix(in srgb, var(--mint) 24%, transparent); color: var(--mint); }
.ph-chip.ph-ping i::after { animation: ph-ring .9s ease-out; }
@keyframes ph-bob { 0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); } 50% { transform: translateY(-9px) rotate(var(--rot, 0deg)); } }
@keyframes ph-pop { 0% { transform: scale(.8); } 100% { transform: scale(1); } }
@keyframes ph-ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(2.4); } }
@media (min-width: 1240px) { .ph-chips { display: block; } }
@media (min-width: 1240px) and (max-width: 1339px) { .ph-chip:nth-child(n+3) { display: none; } } /* the lower pair needs wider gutters */

@media (max-width: 860px) {
  .ph-badge { width: 52px; height: 52px; border-radius: 16px; margin-bottom: 18px; }
  .ph-badge svg { width: 23px; height: 23px; }
  .ph-cta { width: 100%; }
  .ph-notes { gap: 8px 16px; font-size: .66rem; }
}
@media (max-width: 520px) {
  .ph-cta .btn { flex: 1 1 100%; }
  .ph-title { max-width: 14ch; }
}
@media (prefers-reduced-motion: reduce) {
  .ph-glow, .ph-chip b, .ph-note i, .ph-badge::after, .js .ph-badge.in svg path { animation: none; }
  .ph-badge::after { opacity: 0; }
  .ph-canvas, .ph-chip { transform: none; translate: none; }
}
