/* ===================================================================
   Service packages page: video (includes/service-packages/pages/video.php)

   Loaded after css/pages/service-packages.css on /services/video-packages/ only.
   - Hero variant `reel`   (sections/hero/reel.php)
   - Output types section  (sections/custom/vd-outputs.php)
   =================================================================== */

/* ---------- Hero variant: reel ---------- */

.pp-vd-reel {
    position: relative;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 12px 0;
}

.pp-vd-reel__phone {
    position: relative;
    width: min(300px, 100%);
    padding: 11px;
    border-radius: 44px;
    background: linear-gradient(155deg, #2A4868 0%, #0E2238 55%, #081626 100%);
    border: 1px solid var(--white-20);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.35) inset,
        0 40px 90px rgba(0, 0, 0, 0.5),
        0 0 120px var(--primary-bright-alpha-20);
    transform: perspective(1400px) rotateY(-8deg) rotateZ(1deg);
}

.pp-vd-reel__notch {
    position: absolute;
    top: 20px;
    left: 50%;
    z-index: 3;
    width: 84px;
    height: 22px;
    border-radius: 999px;
    background: #050D17;
    transform: translateX(-50%);
}

.pp-vd-reel__screen {
    position: relative;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    border-radius: 34px;
    background: #0B1A2B;
    isolation: isolate;
}

/* CSS poster: shown without JS, with reduced motion, before playback and on a load error. */
.pp-vd-reel__mock {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 70% at 80% 10%, var(--primary-bright-alpha-35), transparent 60%),
        radial-gradient(90% 60% at 10% 95%, rgba(214, 170, 76, 0.28), transparent 60%),
        linear-gradient(170deg, #17385A 0%, #0E2238 55%, #081626 100%);
}

.pp-vd-reel__glow {
    position: absolute;
    inset: 22% 18% auto;
    height: 38%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 255, 255, 0.16), transparent);
}

.pp-vd-reel__play-glyph {
    position: absolute;
    top: 41%;
    left: 50%;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid var(--white-30);
    background: var(--white-10);
    transform: translate(-50%, -50%);
}

/* With JS the real play/pause button takes over from the decorative glyph. */
.pp-vd-reel.is-ready .pp-vd-reel__play-glyph {
    display: none;
}

.pp-vd-reel__play-glyph::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 54%;
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent var(--white);
    transform: translate(-50%, -50%);
}

.pp-vd-reel__lines {
    position: absolute;
    right: 18px;
    bottom: 64px;
    left: 18px;
    display: grid;
    gap: 8px;
}

.pp-vd-reel__lines i {
    display: block;
    height: 9px;
    border-radius: 999px;
    background: var(--white-30);
}

.pp-vd-reel__lines i:last-child {
    width: 62%;
    background: var(--white-20);
}

/* Edit timeline: three clips and a playhead. */
.pp-vd-reel__timeline {
    position: absolute;
    right: 18px;
    bottom: 26px;
    left: 18px;
    display: flex;
    gap: 4px;
    height: 18px;
    direction: ltr;
}

.pp-vd-reel__timeline i {
    flex: 3;
    border-radius: 5px;
    background: var(--brand-primary-bright);
    opacity: 0.85;
}

.pp-vd-reel__timeline i:nth-child(2) {
    flex: 2;
    background: var(--brand-gold);
}

.pp-vd-reel__timeline i:nth-child(3) {
    flex: 4;
    background: #7EA6D8;
}

.pp-vd-reel__timeline b {
    position: absolute;
    top: -6px;
    bottom: -6px;
    left: 0;
    width: 2px;
    border-radius: 2px;
    background: var(--white);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    animation: pp-vd-playhead 6s linear infinite;
}

@keyframes pp-vd-playhead {
    from { left: 0; }
    to { left: 100%; }
}

.pp-vd-reel__video {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: transparent;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.pp-vd-reel.is-started .pp-vd-reel__video {
    opacity: 1;
}

.pp-vd-reel.is-failed .pp-vd-reel__video {
    display: none;
}

.pp-vd-reel__toggle {
    position: absolute;
    top: 52px;
    left: 14px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--white-30);
    border-radius: 50%;
    background: rgba(8, 22, 38, 0.55);
    color: var(--white);
    cursor: pointer;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.pp-vd-reel__toggle[hidden] {
    display: none;
}

.pp-vd-reel__toggle:hover {
    background: rgba(8, 22, 38, 0.8);
    transform: scale(1.06);
}

/* Focus ring: the shared two-tone ring (white outline + navy halo inside the dark hero). */

/* Play triangle; two pause bars while playing. */
.pp-vd-reel__toggle-icon {
    width: 0;
    height: 0;
    margin-left: 3px;
    border-style: solid;
    border-width: 7px 0 7px 12px;
    border-color: transparent transparent transparent currentColor;
}

.pp-vd-reel.is-playing .pp-vd-reel__toggle-icon {
    width: 12px;
    height: 14px;
    margin-left: 0;
    border: 0;
    border-right: 4px solid currentColor;
    border-left: 4px solid currentColor;
}

/* While the video plays over the mock, the timeline under it can rest. */
.pp-vd-reel.is-started .pp-vd-reel__timeline b {
    animation-play-state: paused;
}

.pp-vd-reel__chips {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pp-vd-reel__chip {
    position: absolute;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--white-25);
    border-radius: 999px;
    background: rgba(14, 34, 56, 0.72);
    color: var(--white);
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: pp-vd-float 7s ease-in-out infinite;
}

.pp-vd-reel__chip::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-gold);
}

.pp-vd-reel__chip--1 {
    top: 14%;
    right: 4%;
}

.pp-vd-reel__chip--2 {
    top: 48%;
    left: 2%;
    animation-delay: -2.3s;
}

.pp-vd-reel__chip--2::before {
    background: var(--brand-primary-bright);
}

.pp-vd-reel__chip--3 {
    right: 8%;
    bottom: 12%;
    animation-delay: -4.6s;
}

.pp-vd-reel__chip--3::before {
    background: #7EE2A0;
}

@keyframes pp-vd-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ---------- Output types (sections/custom/vd-outputs.php) ---------- */

.pp-vd-outputs {
    padding: 80px 0;
    background: var(--white);
}

.pp-vd-outputs__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pp-vd-output {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px 22px 20px;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: var(--surface-5);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.pp-vd-output:hover {
    transform: translateY(-4px);
    border-color: var(--primary-bright-alpha-40);
    box-shadow: 0 16px 36px var(--shadow-08);
}

/* A 9:16 frame for the icon, echoing the phone in the hero. */
.pp-vd-output__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 56px;
    border-radius: 12px;
    background: var(--brand-ink);
    color: var(--brand-gold);
}

.pp-vd-output__title {
    margin: 6px 0 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--brand-ink);
}

.pp-vd-output__text {
    flex: 1;
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.85;
    color: var(--text-muted-2);
}

.pp-vd-output__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    padding-top: 14px;
    margin-top: 4px;
    border-top: 1px dashed var(--border-soft);
}

.pp-vd-output__label {
    font-size: 0.875rem;
    color: var(--text-muted-3);
}

.pp-vd-output__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pp-vd-output__tag {
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--primary-bright-alpha-12);
    color: var(--pp-accent-text);
    font-size: 0.875rem;
    font-weight: 700;
}

.pp-vd-output__tag.is-popular {
    background: var(--brand-ink);
    color: var(--white);
}

.pp-vd-output__from {
    flex-basis: 100%;
    font-size: 0.875rem;
    color: var(--text-muted-3);
}

.pp-vd-output__from strong {
    color: var(--brand-ink);
    font-weight: 800;
}

.pp-vd-outputs__more {
    margin: 32px 0 0;
    text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
    .pp-vd-reel__phone {
        transform: none;
    }

    .pp-vd-outputs__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .pp-vd-reel {
        padding: 0;
    }

    .pp-vd-reel__phone {
        width: min(230px, 64vw);
        padding: 8px;
        border-radius: 34px;
    }

    .pp-vd-reel__screen {
        border-radius: 27px;
    }

    .pp-vd-reel__notch {
        top: 15px;
        width: 64px;
        height: 17px;
    }

    .pp-vd-reel__play-glyph {
        width: 52px;
        height: 52px;
    }

    /* Chips leave the phone and wrap in a row underneath. */
    .pp-vd-reel__chips {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        margin-top: 18px;
    }

    .pp-vd-reel__chip {
        position: static;
        padding: 7px 12px;
        font-size: 0.8rem;
        animation: none;
    }

    .pp-vd-outputs {
        padding: 48px 0;
    }

    .pp-vd-outputs__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .pp-vd-output {
        padding: 20px 18px 18px;
    }

    .pp-vd-output:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pp-vd-reel__timeline b,
    .pp-vd-reel__chip {
        animation: none;
    }

    .pp-vd-reel__video,
    .pp-vd-reel__toggle,
    .pp-vd-output {
        transition: none;
    }

    .pp-vd-reel__toggle:hover,
    .pp-vd-output:hover {
        transform: none;
    }
}
