:root {
    --landing-ivory: #fff4d6;
    --landing-gold: #d8b86a;
    --landing-navy: #061b30;
}

.product-deck-page {
    position: relative;
    height: 100svh;
    min-height: 600px;
    overflow: hidden;
    color: var(--landing-ivory);
    background: var(--landing-navy);
}

.deck-header {
    position: absolute;
    inset: 0 0 auto;
    z-index: 20;
    min-height: 92px;
    height: auto;
    padding: 16px clamp(22px, 4vw, 64px);
    color: var(--landing-ivory);
    background: linear-gradient(180deg, rgba(3, 19, 36, .9), rgba(3, 19, 36, .54) 72%, transparent);
    border: 0;
    backdrop-filter: blur(8px);
}

.deck-header .product-brand,
.deck-header nav > a,
.deck-header .header-contact-panel > summary,
.deck-header .product-language {
    color: var(--landing-ivory);
}

.deck-header .product-brand img {
    width: 118px;
    filter: brightness(0) invert(94%) sepia(18%) saturate(484%) hue-rotate(337deg) brightness(109%) contrast(104%) drop-shadow(0 2px 12px rgba(0, 0, 0, .38));
}

.deck-header .product-brand span {
    max-width: 190px;
    color: #ead9ad;
    text-shadow: 0 1px 12px rgba(0, 0, 0, .5);
}

.product-deck {
    height: 100svh;
    min-height: 600px;
    background:
        linear-gradient(100deg, rgba(2, 17, 34, .94) 0%, rgba(5, 32, 57, .8) 50%, rgba(7, 41, 69, .56) 100%),
        url('/static/images/editorial-header-landscape.png') center / cover no-repeat;
}

.deck-slide[data-slide="0"],
.deck-slide[data-slide="1"],
.deck-security {
    padding-top: clamp(118px, 15vh, 156px);
    padding-bottom: 72px;
}

.deck-footer {
    position: absolute;
    inset: auto 0 0;
    z-index: 18;
    color: rgba(232, 223, 202, .78);
    background: linear-gradient(0deg, rgba(3, 18, 34, .84), transparent);
}

/* Landing actions echo the editorial gold underline and glitter used by the
   Portfolio and Project controls inside the authenticated workspace. */
.product-header .landing-entry-link,
.deck-actions .landing-entry-link {
    position: relative;
    min-height: 42px;
    padding: 8px 3px 12px;
    overflow: visible;
    color: #f1dfb7;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-weight: 700;
    text-shadow: 0 1px 12px rgba(0, 0, 0, .34);
}

.product-header .landing-entry-link::after,
.deck-actions .landing-entry-link::after {
    position: absolute;
    right: 0;
    bottom: 3px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #9d7e42, #f3d995 48%, #fff8e8 52%, #b99550);
    box-shadow: 0 0 8px rgba(243, 217, 149, .36);
    content: "";
    transition: box-shadow .2s ease, transform .2s ease;
}

.product-header .landing-entry-link::before,
.deck-actions .landing-entry-link::before {
    position: absolute;
    z-index: 2;
    top: 0;
    right: -12px;
    width: 18px;
    height: 14px;
    background:
        radial-gradient(circle at 18% 68%, #c8aa6a 0 1px, transparent 1.7px),
        radial-gradient(circle at 58% 18%, #fff7e7 0 1.3px, transparent 1.9px),
        radial-gradient(circle at 84% 72%, #c8aa6a 0 .9px, transparent 1.5px);
    content: "";
    opacity: 0;
    transform: scale(.4) rotate(-12deg);
    animation: landing-entry-sparkle 1.6s ease-out .35s both;
    pointer-events: none;
}

.product-header .landing-entry-link:hover,
.product-header .landing-entry-link:focus-visible,
.deck-actions .landing-entry-link:hover,
.deck-actions .landing-entry-link:focus-visible {
    color: var(--landing-ivory);
    background: transparent;
}

.product-header .landing-entry-link:hover::after,
.product-header .landing-entry-link:focus-visible::after,
.deck-actions .landing-entry-link:hover::after,
.deck-actions .landing-entry-link:focus-visible::after {
    box-shadow: 0 0 15px rgba(243, 217, 149, .72);
    transform: scaleX(1.04);
}

.product-header .landing-entry-link:hover::before,
.product-header .landing-entry-link:focus-visible::before,
.deck-actions .landing-entry-link:hover::before,
.deck-actions .landing-entry-link:focus-visible::before {
    animation: landing-entry-sparkle-hover .72s ease-out both;
}

@keyframes landing-entry-sparkle {
    0%, 30%, 100% { opacity: 0; transform: scale(.4) rotate(-12deg); }
    57% { opacity: 1; transform: scale(1) rotate(0); }
    72% { opacity: .35; transform: scale(.65) rotate(8deg); }
}

@keyframes landing-entry-sparkle-hover {
    0%, 100% { opacity: 0; transform: scale(.4) rotate(-12deg); }
    48% { opacity: 1; transform: scale(1) rotate(0); }
}

@media (min-width: 1001px) and (max-width: 1320px) {
    .deck-header nav > :not(.landing-entry-link) { display: none; }
    .deck-header nav { gap: 28px; }
}

@media (max-width: 1000px) {
    .deck-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "brand language" "actions actions";
        gap: 8px 16px;
        padding: 12px 20px 10px;
    }

    .deck-header .product-brand { grid-area: brand; }
    .deck-header .product-language { grid-area: language; justify-self: end; }
    .deck-header nav {
        grid-area: actions;
        display: flex;
        justify-content: flex-end;
        gap: 22px;
    }
    .deck-header nav > :not(.landing-entry-link) { display: none; }
    .deck-header .landing-entry-link { min-height: 34px; padding-block: 4px 10px; }

    .deck-slide[data-slide="0"],
    .deck-slide[data-slide="1"],
    .deck-security {
        padding-top: 142px;
    }
}

@media (max-width: 620px) {
    .product-deck-page,
    .product-deck { min-height: 560px; }
    .deck-header { padding-inline: 14px; }
    .deck-header .product-brand img { width: 114px; }
    .deck-header .product-brand span { display: none; }
    .deck-header nav { justify-content: flex-start; gap: 24px; }
    .deck-header .landing-entry-link { font-size: 10px; }
    .deck-slide[data-slide="0"],
    .deck-slide[data-slide="1"],
    .deck-security {
        padding-top: 132px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-header .landing-entry-link::before,
    .deck-actions .landing-entry-link::before { animation: none; display: none; }
}

/* Keep mobile copy above the footer; the page-number toolbar is desktop-only. */
@media (max-width: 1000px) {
    .product-deck-page {
        display: flex;
        flex-direction: column;
        height: 100svh;
        height: 100dvh;
        min-height: 0;
    }

    .deck-header,
    .deck-footer {
        position: relative;
        inset: auto;
        flex: 0 0 auto;
    }

    .product-deck {
        display: grid;
        grid-template-rows: minmax(0, 1fr);
        flex: 1 1 0;
        height: auto;
        min-height: 0;
    }

    .deck-slide[data-slide="0"],
    .deck-slide[data-slide="1"],
    .deck-security {
        position: relative;
        inset: auto;
        grid-area: 1 / 1;
        display: none;
        min-height: 0;
        min-width: 0;
        grid-template-rows: none;
        grid-auto-rows: max-content;
        align-content: start;
        padding: 24px 20px;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior-y: contain;
        scroll-padding-block: 20px;
    }

    .deck-slide.is-active { display: grid; }

    .deck-controls {
        display: none;
    }

    .deck-footer {
        height: auto;
        min-height: 30px;
        padding-block: 6px calc(6px + env(safe-area-inset-bottom, 0px));
        background: var(--landing-navy);
    }

    .deck-service-strip { grid-template-columns: minmax(0, 1fr); }
    .deck-service-strip .product-contact-links {
        position: static;
        width: 100%;
        margin-top: 10px;
        overflow-wrap: anywhere;
    }
}

/* Only the first two phone slides: use available height for section spacing,
   preserving type, the header and security slide. Details remain scrollable. */
@media (max-width: 620px) {
    .deck-slide[data-slide="0"],
    .deck-slide[data-slide="1"] {
        padding: 10px 20px;
        gap: 8px;
    }
    .deck-slide[data-slide="0"] { grid-template-rows: max-content minmax(max-content, 1fr); }
    .deck-slide[data-slide="1"] { grid-template-rows: max-content minmax(max-content, 1fr) max-content; }
    .deck-capabilities,
    .deck-feature-grid { align-self: stretch; align-content: space-around; }
    .deck-hero-copy .eyebrow,
    .deck-second-heading .eyebrow { margin-bottom: 6px; }
    .deck-lede,
    .deck-second-heading > p:last-child { margin-top: 8px; }
    .deck-actions { margin-top: 6px; }
    .deck-capabilities article,
    .deck-feature-grid article { min-height: 0; padding-block: 6px; }
    .deck-capabilities h2,
    .deck-feature-grid h3 { margin-block: 5px; }
    .deck-service-strip { padding-block: 4px; gap: 4px; }
    .deck-service-strip div:first-child { gap: 3px; }
}

@media (max-width: 620px) and (max-height: 700px) {
    .deck-slide[data-slide="0"],
    .deck-slide[data-slide="1"] { padding-block: 6px; gap: 4px; }
    .deck-capabilities article,
    .deck-feature-grid article { padding-block: 2px; }
}
