@keyframes hero-enter {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ambient-shift {
    0%, 100% { transform: translate3d(-4%, -2%, 0) scale(1); }
    50% { transform: translate3d(8%, 7%, 0) scale(1.12); }
}

@keyframes orbit-spin {
    to { transform: rotate(360deg); }
}

@keyframes orbit-label-spin {
    to { transform: rotate(-360deg); }
}

@keyframes core-breathe {
    50% { box-shadow: 0 0 0 34px rgba(212, 175, 55, .04), 0 0 60px rgba(212, 175, 55, .22); }
}

@keyframes card-float {
    0%, 100% { transform: translateY(0) rotate(.15deg); }
    50% { transform: translateY(-14px) rotate(-.15deg); }
}

@keyframes hero-pan {
    0%, 100% { background-size: 105%; }
    50% { background-size: 112%; }
}

.hero-copy > *,
.os-hero-grid > div:first-child > *,
.page-hero .container > * {
    opacity: 0;
    animation: hero-enter .85s cubic-bezier(.22, 1, .36, 1) forwards;
}

.hero-copy > *:nth-child(2),
.os-hero-grid > div:first-child > *:nth-child(2),
.page-hero .container > *:nth-child(2) { animation-delay: 100ms; }
.hero-copy > *:nth-child(3),
.os-hero-grid > div:first-child > *:nth-child(3),
.page-hero .container > *:nth-child(3) { animation-delay: 190ms; }
.hero-copy > *:nth-child(4),
.os-hero-grid > div:first-child > *:nth-child(4) { animation-delay: 280ms; }

.hero-card,
.os-orbit {
    animation: hero-enter 1s .22s cubic-bezier(.22, 1, .36, 1) both;
}

.hero-home .hero-card {
    animation: hero-enter 1s .22s cubic-bezier(.22, 1, .36, 1) both,
               card-float 5s 1.3s ease-in-out infinite;
}

.hero-home {
    animation: hero-pan 16s ease-in-out infinite;
}

.hero-home,
.page-hero,
.os-hero {
    background-position: center calc(50% + var(--parallax-y, 0px));
    overflow: hidden;
    position: relative;
}

.os-hero::after {
    content: '';
    position: absolute;
    width: 520px;
    height: 520px;
    right: -120px;
    top: -220px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(23, 107, 224, .25), transparent 68%);
    filter: blur(10px);
    animation: ambient-shift 12s ease-in-out infinite;
}

.motion-reveal {
    opacity: 0;
    transform: translateY(38px) scale(.985);
    transition: opacity .8s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.22, 1, .36, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

.motion-reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.service-card {
    transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transition: transform .22s ease, box-shadow .35s ease, border-color .35s ease;
    will-change: transform;
}

.service-card:hover {
    border-color: rgba(23, 107, 224, .28);
    box-shadow: 0 24px 55px rgba(13, 27, 42, .12);
}

.os-orbit::before {
    content: '';
    position: absolute;
    inset: 20px;
    border: 1px dashed rgba(255, 255, 255, .16);
    border-radius: 50%;
    animation: orbit-spin 24s linear infinite;
}

.os-visual { text-align: center; }

.orbit-items {
    position: absolute;
    inset: 0;
    animation: orbit-spin 14s linear infinite;
}

.orbit-items .orbit-item {
    animation: orbit-label-spin 14s linear infinite;
}

.os-orbit.is-paused .orbit-items,
.os-orbit.is-paused .orbit-item,
.os-orbit.is-paused::before {
    animation-play-state: paused;
}

.orbit-motion-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 24px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background .2s ease, transform .2s ease;
}

.orbit-motion-toggle:hover { background: rgba(255, 255, 255, .16); transform: translateY(-2px); }
.motion-icon { min-width: 14px; color: var(--gold); }

.orbit-core { animation: core-breathe 3.6s ease-in-out infinite; }
.orbit-item { transition: background .3s ease; }

.button { overflow: hidden; position: relative; }
.button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.28) 48%, transparent 70%);
    transform: translateX(-130%);
    transition: transform .7s ease;
}
.button:hover::after { transform: translateX(130%); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
    .motion-reveal { opacity: 1; transform: none; }
}

@media (max-width: 700px) {
    .service-card { transform: none; }
    .os-hero::after { width: 360px; height: 360px; }
}

.video-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.video-section::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(110deg, rgba(7, 20, 33, .9), rgba(13, 27, 42, .58));
    pointer-events: none;
}

.section-video {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .88;
    pointer-events: none;
}

.video-section > .container {
    position: relative;
    z-index: 2;
}

.video-section-os::before {
    background: linear-gradient(110deg, rgba(7, 20, 33, .9), rgba(13, 27, 42, .7));
}

.video-section-os .section-video {
    opacity: .72;
    filter: saturate(.85) contrast(1.08);
}

.hero-home.video-section::before {
    background:
        linear-gradient(105deg, rgba(7, 20, 33, .96) 0%, rgba(13, 27, 42, .84) 47%, rgba(13, 27, 42, .48) 100%),
        linear-gradient(20deg, rgba(212, 175, 55, .18), transparent 58%);
}

.shared-video-hero::before {
    background: linear-gradient(110deg, rgba(7, 20, 33, .84), rgba(13, 27, 42, .34));
}

.shared-video-hero .section-video {
    opacity: .98;
    filter: saturate(1.12) contrast(1.08);
}

.shared-video-section::before {
    background: linear-gradient(110deg, rgba(7, 20, 33, .74), rgba(13, 27, 42, .4));
}

.shared-video-section .section-video {
    opacity: .92;
    filter: saturate(1.12) contrast(1.1);
}

@media (prefers-reduced-motion: reduce) {
    .section-video { display: none; }
}

.video-story-section {
    background: #fff;
}

.video-story-grid {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 64px;
    align-items: center;
}

.video-story-copy h2 {
    margin: 10px 0 20px;
    font-family: "Playfair Display", serif;
    font-size: clamp(36px, 4.5vw, 56px);
    line-height: 1.1;
}

.video-story-copy p:not(.eyebrow) {
    color: var(--muted);
    font-size: 18px;
}

.video-frame {
    padding: 8px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, .62);
    border-radius: 26px;
    background: var(--ink);
    box-shadow: 0 28px 70px rgba(13, 27, 42, .18);
}

.feature-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 19px;
    background: var(--ink);
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

@media (max-width: 850px) {
    .video-story-grid { grid-template-columns: 1fr; gap: 35px; }
}
