/*
 * STORM public-page motion system.
 * Stronger Intelligence Archive-inspired movement: hard wipes, staged reveals,
 * visible scan telemetry, and restrained continuous depth.
 */
:root {
    --storm-motion-gold: #d2ad58;
    --storm-motion-green: #75c07d;
    --storm-motion-ink: #050806;
    --storm-motion-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --storm-motion-x: 50%;
    --storm-motion-y: 42%;
}

/* Page acquisition curtain: deliberately obvious, but short enough not to slow use. */
.storm-page-acquire {
    position: fixed;
    /* Keep page-entry motion below the persistent public navbar (z-index: 1000). */
    z-index: 900;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.storm-page-acquire::before,
.storm-page-acquire::after {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 51%;
    content: '';
    background:
        linear-gradient(rgba(210, 173, 88, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(210, 173, 88, 0.055) 1px, transparent 1px),
        #050806;
    background-size: 52px 52px;
    will-change: transform;
}

.storm-page-acquire::before { left: 0; }
.storm-page-acquire::after { right: 0; }

.storm-page-acquire__line {
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: var(--storm-motion-gold);
    box-shadow: 0 0 22px rgba(210, 173, 88, 0.72);
    transform: scaleY(0);
    transform-origin: center;
}

.storm-motion-live .storm-page-acquire::before {
    animation: storm-curtain-left 920ms var(--storm-motion-ease) 180ms forwards;
}

.storm-motion-live .storm-page-acquire::after {
    animation: storm-curtain-right 920ms var(--storm-motion-ease) 180ms forwards;
}

.storm-motion-live .storm-page-acquire__line {
    animation: storm-curtain-line 1050ms var(--storm-motion-ease) forwards;
}

/* CRT scan language from the pre-phase Intelligence Archive interface. */
.storm-motion-scan {
    position: fixed;
    /* Telemetry remains visible over page content without crossing the navbar layer. */
    z-index: 900;
    top: -4px;
    right: 0;
    left: 0;
    height: 2px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent 3%, rgba(117, 192, 125, 0.5) 35%, rgba(210, 173, 88, 0.75) 50%, rgba(117, 192, 125, 0.5) 65%, transparent 97%);
    box-shadow: 0 0 13px rgba(117, 192, 125, 0.22);
    opacity: 0;
}

.storm-motion-live .storm-motion-scan {
    animation: storm-page-scan 8s linear 1.2s infinite;
}

/* Scroll reveals travel far enough to be legible, with alternating direction. */
.storm-motion-ready [data-motion-reveal] {
    opacity: 0;
    clip-path: inset(0 0 30% 0);
    transform: translate3d(0, 64px, 0) scale(0.985);
    filter: blur(7px);
    transition:
        opacity 640ms ease,
        transform 980ms var(--storm-motion-ease),
        clip-path 980ms var(--storm-motion-ease),
        filter 760ms ease;
    transition-delay: calc(var(--storm-motion-index, 0) * 55ms);
    will-change: opacity, transform, clip-path;
}

.storm-motion-ready [data-motion-direction="left"] {
    clip-path: inset(0 22% 0 0);
    transform: translate3d(-88px, 0, 0) scale(0.985);
}

.storm-motion-ready [data-motion-direction="right"] {
    clip-path: inset(0 0 0 22%);
    transform: translate3d(88px, 0, 0) scale(0.985);
}

.storm-motion-ready [data-motion-reveal].is-motion-visible {
    opacity: 1;
    clip-path: inset(0);
    transform: none;
    filter: none;
}

/* HOME ------------------------------------------------------------------- */
.storm-motion-ready .command-hero__content > .command-eyebrow,
.storm-motion-ready .command-hero__content > .command-typing-title,
.storm-motion-ready .command-hero__content > .command-hero__lede,
.storm-motion-ready .command-hero__content > .command-actions,
.storm-motion-ready .command-hero__rail > div,
.storm-motion-ready .command-scroll-cue {
    opacity: 0;
    will-change: opacity, transform, clip-path;
}

.storm-motion-ready .command-hero__content > .command-eyebrow {
    clip-path: inset(0 100% 0 0);
    transform: translateY(-24px);
}

.storm-motion-ready .command-hero__content > .command-typing-title {
    clip-path: inset(100% 0 0 0);
    transform: translateY(72px) scale(0.92);
    filter: blur(9px);
}

.storm-motion-ready .command-hero__content > .command-hero__lede,
.storm-motion-ready .command-hero__content > .command-actions {
    transform: translateY(42px);
}

.storm-motion-ready .command-hero__rail > div {
    transform: translateY(100%);
}

.storm-motion-live .command-hero__content > .command-eyebrow,
.storm-motion-live .command-hero__content > .command-typing-title,
.storm-motion-live .command-hero__content > .command-hero__lede,
.storm-motion-live .command-hero__content > .command-actions,
.storm-motion-live .command-hero__rail > div,
.storm-motion-live .command-scroll-cue {
    opacity: 1;
    clip-path: inset(0);
    transform: none;
    filter: none;
    transition:
        opacity 650ms ease,
        transform 1050ms var(--storm-motion-ease),
        clip-path 1050ms var(--storm-motion-ease),
        filter 720ms ease;
}

.storm-motion-live .command-hero__content > .command-eyebrow { transition-delay: 1180ms; }
.storm-motion-live .command-hero__content > .command-typing-title { transition-delay: 1280ms; }
.storm-motion-live .command-hero__content > .command-hero__lede { transition-delay: 1540ms; }
.storm-motion-live .command-hero__content > .command-actions { transition-delay: 1660ms; }
.storm-motion-live .command-hero__rail > div:nth-child(1) { transition-delay: 1780ms; }
.storm-motion-live .command-hero__rail > div:nth-child(2) { transition-delay: 1870ms; }
.storm-motion-live .command-hero__rail > div:nth-child(3) { transition-delay: 1960ms; }
.storm-motion-live .command-hero__rail > div:nth-child(4) { transition-delay: 2050ms; }
.storm-motion-live .command-scroll-cue { transition-delay: 2140ms; }

.command-hero::before {
    position: absolute;
    z-index: 1;
    inset: 0;
    content: '';
    pointer-events: none;
    background: linear-gradient(105deg, transparent 25%, rgba(117, 192, 125, 0.035) 48%, transparent 70%);
    opacity: 0.78;
    transition: background-position 180ms ease;
}

.command-hero__grid { animation: storm-grid-drift 16s linear infinite; }
.command-hero__video.is-video-visible iframe { animation: storm-video-depth 15s ease-in-out infinite alternate; }

.command-section__header::after,
.media-section-label::after,
.recruitment-section-heading::after {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1150ms var(--storm-motion-ease) 180ms;
}

.is-motion-visible .command-section__header::after,
.is-motion-visible.media-video-archive .media-section-label::after,
.is-motion-visible.recruitment-process .recruitment-section-heading::after {
    transform: scaleX(1);
}

.command-unit-card__body,
.command-button,
.recruitment-action,
.media-video-card { position: relative; overflow: hidden; }

.command-unit-card__body::after,
.command-button::before,
.recruitment-action::before,
.media-video-card::before {
    position: absolute;
    z-index: 5;
    top: 0;
    bottom: 0;
    left: -48%;
    width: 38%;
    content: '';
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(235, 204, 133, 0.22), transparent);
    transform: skewX(-18deg);
    transition: left 720ms var(--storm-motion-ease);
}

.command-unit-card:hover .command-unit-card__body::after,
.command-unit-card:focus-within .command-unit-card__body::after,
.command-button:hover::before,
.command-button:focus-visible::before,
.recruitment-action:hover::before,
.recruitment-action:focus-visible::before,
.media-video-card:hover::before,
.media-video-card:focus-within::before { left: 115%; }

/* MEDIA ------------------------------------------------------------------ */
.storm-motion-ready .media-hero__classification,
.storm-motion-ready .media-hero__copy > *,
.storm-motion-ready .media-hero__stats,
.storm-motion-ready .media-reel {
    opacity: 0;
    will-change: opacity, transform, clip-path;
}

.storm-motion-ready .media-hero__classification {
    clip-path: inset(0 50% 0 50%);
    transform: translateY(-22px);
}

.storm-motion-ready .media-hero__copy > * { transform: translateX(-70px); }
.storm-motion-ready .media-hero__stats { transform: translateX(70px); }
.storm-motion-ready .media-reel {
    clip-path: inset(0 100% 0 0);
    transform: translateY(36px) scale(0.975);
}

.storm-motion-live .media-hero__classification,
.storm-motion-live .media-hero__copy > *,
.storm-motion-live .media-hero__stats,
.storm-motion-live .media-reel {
    opacity: 1;
    clip-path: inset(0);
    transform: none;
    transition:
        opacity 620ms ease,
        transform 920ms var(--storm-motion-ease),
        clip-path 1200ms var(--storm-motion-ease);
}

.storm-motion-live .media-hero__classification { transition-delay: 520ms; }
.storm-motion-live .media-hero__eyebrow { transition-delay: 650ms; }
.storm-motion-live .media-hero__copy h1 { transition-delay: 740ms; }
.storm-motion-live .media-hero__lede { transition-delay: 840ms; }
.storm-motion-live .media-hero__stats { transition-delay: 760ms; }
.storm-motion-live .media-reel { transition-delay: 900ms; }

.media-reel::before {
    position: absolute;
    z-index: 8;
    inset: 0 0 52px;
    content: '';
    pointer-events: none;
    background:
        radial-gradient(circle 440px at var(--storm-motion-x) var(--storm-motion-y), rgba(210, 173, 88, 0.12), transparent 68%),
        linear-gradient(180deg, transparent 0 47%, rgba(117, 192, 125, 0.24) 49.8%, rgba(210, 173, 88, 0.34) 50%, transparent 52%);
    background-size: auto, 100% 240%;
    opacity: 0.68;
    animation: storm-acquisition-scan 5.6s linear infinite;
}

.media-archive .media-item.is-active.is-motion-current {
    animation: storm-frame-lock 900ms var(--storm-motion-ease) both;
}

.media-archive .media-item.is-active.is-motion-current img {
    animation: storm-media-impact 1150ms var(--storm-motion-ease) both;
}

.media-archive .media-item.is-active.is-motion-current .media-overlay,
.media-archive .media-item.is-active.is-motion-current .media-badge,
.media-archive .media-item.is-active.is-motion-current .media-count {
    animation: storm-caption-rise 820ms var(--storm-motion-ease) 260ms both;
}

.media-reel__dots button.is-active::after { animation: storm-signal-pulse 1.5s ease-in-out infinite; }
.media-video-card > button img { transition: transform 700ms var(--storm-motion-ease), filter 400ms ease; }
.media-video-card:hover > button img,
.media-video-card:focus-within > button img { filter: saturate(0.95) brightness(0.92); transform: scale(1.06); }

/* CREATE APPLICATION ----------------------------------------------------- */
.storm-motion-ready .recruitment-intake__masthead,
.storm-motion-ready .recruitment-hero__content > *,
.storm-motion-ready .recruitment-hero__visual {
    opacity: 0;
    will-change: opacity, transform, clip-path;
}

.storm-motion-ready .recruitment-intake__masthead { clip-path: inset(0 50% 0 50%); }
.storm-motion-ready .recruitment-hero__content > * { transform: translateX(-76px); }
.storm-motion-ready .recruitment-hero__visual {
    clip-path: inset(0 0 0 100%);
    transform: translateX(90px) scale(0.95);
}

.storm-motion-live .recruitment-intake__masthead,
.storm-motion-live .recruitment-hero__content > *,
.storm-motion-live .recruitment-hero__visual {
    opacity: 1;
    clip-path: inset(0);
    transform: none;
    transition:
        opacity 620ms ease,
        transform 980ms var(--storm-motion-ease),
        clip-path 1150ms var(--storm-motion-ease);
}

.storm-motion-live .recruitment-intake__masthead { transition-delay: 500ms; }
.storm-motion-live .recruitment-kicker { transition-delay: 620ms; }
.storm-motion-live .recruitment-hero h1 { transition-delay: 720ms; }
.storm-motion-live .recruitment-hero__lead { transition-delay: 830ms; }
.storm-motion-live .recruitment-hero__actions { transition-delay: 940ms; }
.storm-motion-live .recruitment-criteria { transition-delay: 1050ms; }
.storm-motion-live .recruitment-hero__visual { transition-delay: 650ms; }

.recruitment-hero__visual::before {
    position: absolute;
    z-index: 2;
    right: 0;
    left: 0;
    height: 2px;
    content: '';
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(117, 192, 125, 0.9), rgba(210, 173, 88, 0.9), transparent);
    box-shadow: 0 0 22px rgba(117, 192, 125, 0.34);
    animation: storm-file-scan 4.8s ease-in-out infinite;
}

.recruitment-process__steps li,
.recruitment-comms__links a {
    opacity: 0;
    transform: translateY(46px);
    transition: opacity 560ms ease, transform 780ms var(--storm-motion-ease), border-color 220ms ease, background-color 220ms ease;
}

.is-motion-visible .recruitment-process__steps li,
.is-motion-visible .recruitment-comms__links a { opacity: 1; transform: none; }
.is-motion-visible .recruitment-process__steps li:nth-child(2),
.is-motion-visible .recruitment-comms__links a:nth-child(2) { transition-delay: 100ms; }
.is-motion-visible .recruitment-process__steps li:nth-child(3),
.is-motion-visible .recruitment-comms__links a:nth-child(3) { transition-delay: 200ms; }
.is-motion-visible .recruitment-process__steps li:nth-child(4) { transition-delay: 300ms; }

.recruitment-process__steps li:hover { z-index: 1; border-color: rgba(210, 173, 88, 0.48); transform: translateY(-7px); }
.recruitment-comms__links a b,
.recruitment-action i { transition: transform 240ms var(--storm-motion-ease); }
.recruitment-comms__links a:hover b,
.recruitment-comms__links a:focus-visible b,
.recruitment-action:hover i,
.recruitment-action:focus-visible i { transform: translateX(7px); }

@keyframes storm-curtain-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-104%); }
}

@keyframes storm-curtain-right {
    0% { transform: translateX(0); }
    100% { transform: translateX(104%); }
}

@keyframes storm-curtain-line {
    0% { opacity: 0; transform: scaleY(0); }
    25% { opacity: 1; transform: scaleY(1); }
    70% { opacity: 1; transform: scaleY(1); }
    100% { opacity: 0; transform: scaleY(0.15); }
}

@keyframes storm-page-scan {
    0% { top: -4px; opacity: 0; }
    4% { opacity: 0.72; }
    92% { opacity: 0.42; }
    100% { top: 100vh; opacity: 0; }
}

@keyframes storm-grid-drift { to { background-position: 128px 128px; } }

@keyframes storm-video-depth {
    from { transform: translate(-50%, -50%) scale(1.025); filter: brightness(0.92) saturate(0.92); }
    to { transform: translate(-50%, -50%) scale(1.085); filter: brightness(1.04) saturate(1.04); }
}

@keyframes storm-acquisition-scan {
    from { background-position: center, 0 -145%; }
    to { background-position: center, 0 245%; }
}

@keyframes storm-frame-lock {
    0% { clip-path: inset(0 100% 0 0); }
    100% { clip-path: inset(0); }
}

@keyframes storm-media-impact {
    0% { transform: scale(1.13); filter: blur(7px) brightness(0.48) saturate(0.45); }
    42% { filter: blur(0) brightness(0.88) saturate(0.8); }
    100% { transform: scale(1); filter: none; }
}

@keyframes storm-caption-rise {
    from { opacity: 0; transform: translateY(38px); }
    to { opacity: 1; transform: none; }
}

@keyframes storm-signal-pulse {
    50% { box-shadow: 0 0 0 7px rgba(239, 241, 235, 0.12), 0 0 14px rgba(210, 173, 88, 0.24); }
}

@keyframes storm-file-scan {
    0%, 10% { top: 0; opacity: 0; }
    18% { opacity: 0.92; }
    78% { opacity: 0.56; }
    90%, 100% { top: 100%; opacity: 0; }
}

@media (max-width: 768px) {
    .storm-motion-ready [data-motion-direction="left"],
    .storm-motion-ready [data-motion-direction="right"] {
        clip-path: inset(0 0 24% 0);
        transform: translate3d(0, 48px, 0) scale(0.985);
    }

    .storm-motion-ready .media-hero__copy > *,
    .storm-motion-ready .media-hero__stats,
    .storm-motion-ready .recruitment-hero__content > *,
    .storm-motion-ready .recruitment-hero__visual {
        transform: translateY(48px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .storm-motion-scan { display: none !important; }

    .storm-motion-live .storm-page-acquire::before,
    .storm-motion-live .storm-page-acquire::after {
        animation-duration: 520ms;
        animation-delay: 80ms;
    }

    .storm-motion-live .storm-page-acquire__line { animation-duration: 620ms; }

    .storm-motion-ready [data-motion-reveal],
    .storm-motion-ready .command-hero__content > *,
    .storm-motion-ready .command-hero__rail > div,
    .storm-motion-ready .command-scroll-cue,
    .storm-motion-ready .media-hero__classification,
    .storm-motion-ready .media-hero__copy > *,
    .storm-motion-ready .media-hero__stats,
    .storm-motion-ready .media-reel,
    .storm-motion-ready .recruitment-intake__masthead,
    .storm-motion-ready .recruitment-hero__content > *,
    .storm-motion-ready .recruitment-hero__visual,
    .recruitment-process__steps li,
    .recruitment-comms__links a {
        transition-duration: 360ms !important;
    }

    .command-hero__grid,
    .command-hero__video.is-video-visible iframe,
    .media-reel::before,
    .media-reel__dots button.is-active::after,
    .recruitment-hero__visual::before { animation: none !important; }

    .media-archive .media-item.is-active.is-motion-current { animation-duration: 480ms; }
    .media-archive .media-item.is-active.is-motion-current img { animation-duration: 580ms; }

    .command-unit-card__body::after,
    .command-button::before,
    .recruitment-action::before,
    .media-video-card::before { display: none; }
}
