/* Services page — layout & visual rhythm */

body.page-services {
    --svc-gap: 20px;
    --svc-radius: 18px;
}

body.page-services .section {
    padding: 88px 24px;
    position: relative;
}

body.page-services .page-hero {
    padding: 152px 24px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.page-services .page-hero-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 55% at 50% 0%, rgba(0, 153, 153, 0.18), transparent 52%),
        radial-gradient(ellipse 55% 45% at 85% 70%, rgba(51, 184, 184, 0.08), transparent 48%);
}

body.page-services .page-hero .section-container {
    position: relative;
    z-index: 1;
}

body.page-services .page-hero h1 {
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

body.page-services .page-hero-desc {
    font-size: 16px;
    line-height: 1.75;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

body.page-services .service-row {
    gap: 48px;
    align-items: center;
}

body.page-services .sr-img img {
    border-radius: var(--svc-radius);
}

/* Core service video blocks (#assembly, #fabrication) — same as about #story */
body.page-services .svc-media-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

body.page-services .sr-visual .story-image.story-media {
    width: 100%;
    height: 400px;
    max-height: 400px;
    min-height: 0;
    aspect-ratio: auto;
    display: block;
    padding: 0;
    background: var(--bg-2);
}

body.page-services .story-image.story-media::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 55%, rgba(7, 17, 29, 0.45) 100%);
    border-radius: inherit;
}

body.page-services .story-image.story-media .story-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    vertical-align: top;
}

body.page-services .story-image.story-media .story-watermark {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 10px;
    border-radius: 12px;
    background: rgba(7, 17, 29, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    user-select: none;
}

body.page-services .story-image.story-media .story-watermark img {
    width: 36px;
    height: 36px;
    min-height: 0;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.95;
}

body.page-services .story-image.story-media .story-watermark-brand {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--white);
    line-height: 1.2;
    white-space: nowrap;
    opacity: 1;
    padding: 0;
}

body.page-services .story-image.story-media .story-watermark-brand span {
    color: var(--primary-light);
}

body.page-services .story-image.story-media .svc-media-fallback {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    body.page-services .story-image.story-media .story-video {
        display: none;
    }

    body.page-services .story-image.story-media .svc-media-fallback {
        display: block;
    }
}

/* #assembly desktop: copy on top, two videos side by side below */
@media (min-width: 769px) {
    body.page-services #assembly .service-row--copy-top {
        display: flex;
        flex-direction: column;
        gap: 40px;
        align-items: stretch;
    }

    body.page-services #assembly .service-row--copy-top .sr-text,
    body.page-services #assembly .service-row--copy-top .sr-visual {
        width: 100%;
        max-width: none;
    }

    body.page-services #assembly .svc-media-stack {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        width: 100%;
    }

    body.page-services #assembly .svc-media-stack > .story-image.story-media {
        height: auto;
        max-height: none;
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 768px) {
    /* Mobile: same as other service rows — stacked videos, fixed frame height */
    body.page-services #assembly .svc-media-stack {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    body.page-services #assembly .svc-media-stack > .story-image.story-media {
        height: 280px;
        max-height: 280px;
        aspect-ratio: auto;
    }

    body.page-services .sr-visual .story-image.story-media {
        height: 280px;
        max-height: 280px;
    }

    body.page-services .story-image.story-media .story-watermark {
        right: 10px;
        bottom: 10px;
        padding: 6px 10px 6px 8px;
        gap: 8px;
    }

    body.page-services .story-image.story-media .story-watermark img {
        width: 28px;
        height: 28px;
    }

    body.page-services .story-image.story-media .story-watermark-brand {
        font-size: 11px;
    }

    body.page-services .section {
        padding: 64px 20px;
    }

    body.page-services .page-hero {
        padding: 128px 20px 56px;
    }

    body.page-services .service-row {
        gap: 28px;
    }
}
