/* =========================================
   PHASE 19: THE SOVEREIGN (TRILLION DOLLAR)
   "Structural Integrity & Functional Perfection"
   ========================================= */

/* 1. LAYOUT FOUNDATION (The Engine) */
.proof-section {
    position: relative;
    background: transparent;
    padding: 12rem 0;
    overflow: visible;
    z-index: 10;
}

.infinity-deck-container {
    position: relative;
    width: 100%;
    max-width: 1300px;
    height: 700px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 2500px;
    /* Deep perspective for Sovereign feel */
    z-index: 20;
}

/* SIDE CONTROLS (Retina Precision) */
.deck-control-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Retina hairline */
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
    z-index: 100;
}

.deck-control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.btn-left {
    left: 2rem;
}

.btn-right {
    right: 2rem;
}

.control-icon {
    width: 20px;
    height: 20px;
    stroke: #fff;
    stroke-width: 1.2px;
    opacity: 0.5;
}

.deck-control-btn:hover .control-icon {
    opacity: 1;
}

/* 2. THE VIEWPORT & TRACK */
.deck-viewport {
    width: 420px;
    height: 560px;
    position: relative;
    overflow: visible;
    /* Cards overflow vertically */
    z-index: 10;
}

.deck-track {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    will-change: transform;
}

/* 3. THE CARD ARCHITECTURE */
.deck-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity, filter;

    /* Transition tuning: Heavy 1s glide */
    transition:
        transform 1s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.8s ease,
        filter 0.8s ease;

    /* Default hidden state (behind) */
    transform: translate3d(0, 100px, -400px) rotateX(15deg);
}

/* ACTIVE STATE (The Authority) */
.deck-card.active {
    opacity: 1;
    z-index: 50;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) rotateX(0deg);
    filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.8));
}

/* PREV/NEXT (The Context) */
.deck-card.prev {
    opacity: 0.1;
    z-index: 40;
    filter: blur(10px);
    transform: translate3d(0, -180px, -400px) scale(0.9);
}

.deck-card.next {
    opacity: 0.1;
    z-index: 40;
    filter: blur(10px);
    transform: translate3d(0, 180px, -400px) scale(0.9);
}

.deck-card.hidden {
    opacity: 0;
    z-index: 0;
}

/* 4. CARD BODY (Adaptive Frost) */
.monolith-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 32px;
    /* Precision hardware radius */
    background: rgba(12, 12, 12, 0.88);
    /* Deep slate-black */
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* 1px Retina */
    backdrop-filter: blur(40px) saturate(1.8);
    /* Apple-standard frost */
}

/* High-Impact Sheen (Subtle diagonal) */
.monolith-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.05) 0%,
            transparent 40%,
            rgba(255, 255, 255, 0.02) 60%,
            transparent 100%);
    z-index: 5;
    pointer-events: none;
}

/* 5. INTERIOR CONTENT (The Sovereign Layout) */
.monolith-content {
    position: relative;
    z-index: 20;
    height: 100%;
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* TOP: Minimal Labeling */
.monolith-badge {
    align-self: flex-start;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
}

/* CENTER: Hero Metric */
.metric-group-hero {
    margin-top: auto;
}

.metric-value-huge {
    font-family: 'Inter', sans-serif;
    font-size: 6.5rem;
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: #fff;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.metric-label {
    margin-top: 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: -0.01em;
}

/* BOTTOM: Sovereign Grid */
.card-bottom-row {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.bottom-stat {
    display: flex;
    flex-direction: column;
}

.stat-lbl {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 6px;
}

.stat-val {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}


/* 6. BACKGROUND ASSETS */
.cinema-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.6;
    filter: brightness(0.7) contrast(1.1) saturate(1.2);
    transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.deck-card.active:hover .cinema-bg {
    transform: scale(1.05);
    /* Proximity reaction */
}

.cinema-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.6) 80%,
            rgba(0, 0, 0, 0.9) 100%);
}

/* =========================================
   UNIVERSAL RESPONSIVENESS SYSTEM
   All Real Devices: Apple Watch → 8K
   ========================================= */

/* -------------------------------------------------------------------------- */
/*                    APPLE WATCH & ULTRA-SMALL (<320px)                      */
/* -------------------------------------------------------------------------- */
@media (max-width: 319px) {
    .proof-section {
        padding: 6rem 0;
    }

    .infinity-deck-container {
        max-width: 100%;
        height: 420px;
        padding: 0 1rem;
    }

    .deck-viewport {
        width: 100%;
        max-width: 280px;
        height: 400px;
        margin: 0 auto;
    }

    .deck-control-btn {
        width: 36px;
        height: 36px;
    }

    .btn-left {
        left: 0.5rem;
    }

    .btn-right {
        right: 0.5rem;
    }

    .control-icon {
        width: 14px;
        height: 14px;
    }

    .monolith-content {
        padding: 2rem 1.5rem;
    }

    .monolith-badge {
        font-size: 0.5rem;
        padding: 4px 10px;
    }

    .metric-value-huge {
        font-size: 3.5rem;
    }

    .metric-label {
        font-size: 0.85rem;
    }

    .card-bottom-row {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }

    .stat-val {
        font-size: 0.9rem;
    }

    .stat-lbl {
        font-size: 0.55rem;
    }
}

/* -------------------------------------------------------------------------- */
/*                         MOBILE PHONES (320px - 480px)                      */
/* -------------------------------------------------------------------------- */
@media (min-width: 320px) and (max-width: 480px) {
    .proof-section {
        padding: 8rem 0;
    }

    .infinity-deck-container {
        max-width: 100%;
        height: 480px;
        padding: 0 1.5rem;
    }

    .deck-viewport {
        width: 100%;
        max-width: 320px;
        height: 450px;
        margin: 0 auto;
    }

    .deck-control-btn {
        width: 40px;
        height: 40px;
    }

    .btn-left {
        left: 0.8rem;
    }

    .btn-right {
        right: 0.8rem;
    }

    .control-icon {
        width: 16px;
        height: 16px;
    }

    .monolith-content {
        padding: 2.5rem 2rem;
    }

    .monolith-badge {
        font-size: 0.55rem;
        padding: 5px 12px;
    }

    .metric-value-huge {
        font-size: 4.5rem;
    }

    .metric-label {
        font-size: 0.95rem;
    }

    .card-bottom-row {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .stat-val {
        font-size: 0.95rem;
    }
}

/* -------------------------------------------------------------------------- */
/*                       LARGE MOBILE (481px - 767px)                         */
/* -------------------------------------------------------------------------- */
@media (min-width: 481px) and (max-width: 767px) {
    .proof-section {
        padding: 10rem 0;
    }

    .infinity-deck-container {
        max-width: 100%;
        height: 540px;
        padding: 0 2rem;
    }

    .deck-viewport {
        width: 100%;
        max-width: 380px;
        height: 500px;
        margin: 0 auto;
    }

    .deck-control-btn {
        width: 44px;
        height: 44px;
    }

    .btn-left {
        left: 1rem;
    }

    .btn-right {
        right: 1rem;
    }

    .monolith-content {
        padding: 3rem 2.5rem;
    }

    .monolith-badge {
        font-size: 0.6rem;
    }

    .metric-value-huge {
        font-size: 5.5rem;
    }

    .metric-label {
        font-size: 1rem;
    }

    .card-bottom-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* -------------------------------------------------------------------------- */
/*                       TABLETS PORTRAIT (768px - 1024px)                    */
/* -------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1024px) {
    .infinity-deck-container {
        max-width: 600px;
        height: 620px;
    }

    .deck-viewport {
        width: 380px;
        height: 520px;
    }

    .deck-control-btn {
        width: 48px;
        height: 48px;
    }

    .btn-left {
        left: 1.5rem;
    }

    .btn-right {
        right: 1.5rem;
    }

    .monolith-content {
        padding: 3.2rem 2.8rem;
    }

    .metric-value-huge {
        font-size: 6rem;
    }
}

/* -------------------------------------------------------------------------- */
/*                    DESKTOP STANDARD (1025px - 1440px)                      */
/* -------------------------------------------------------------------------- */
@media (min-width: 1025px) and (max-width: 1440px) {

    /* Optimal default - no changes needed */
    .infinity-deck-container {
        max-width: 1300px;
    }

    .deck-viewport {
        width: 420px;
        height: 560px;
    }
}

/* -------------------------------------------------------------------------- */
/*                     LARGE DESKTOP (1441px - 1920px)                        */
/* -------------------------------------------------------------------------- */
@media (min-width: 1441px) and (max-width: 1920px) {
    .infinity-deck-container {
        max-width: 1400px;
        height: 750px;
    }

    .deck-viewport {
        width: 460px;
        height: 600px;
    }

    .deck-control-btn {
        width: 56px;
        height: 56px;
    }

    .control-icon {
        width: 22px;
        height: 22px;
    }

    .monolith-content {
        padding: 4rem 3.5rem;
    }

    .metric-value-huge {
        font-size: 7rem;
    }

    .metric-label {
        font-size: 1.15rem;
    }

    .stat-val {
        font-size: 1.15rem;
    }
}

/* -------------------------------------------------------------------------- */
/*                        2K MONITORS (1921px - 2560px)                       */
/* -------------------------------------------------------------------------- */
@media (min-width: 1921px) and (max-width: 2560px) {
    .infinity-deck-container {
        max-width: 1600px;
        height: 800px;
    }

    .deck-viewport {
        width: 500px;
        height: 650px;
    }

    .deck-control-btn {
        width: 60px;
        height: 60px;
    }

    .control-icon {
        width: 24px;
        height: 24px;
    }

    .monolith-content {
        padding: 4.5rem 4rem;
    }

    .monolith-badge {
        font-size: 0.7rem;
        padding: 7px 16px;
    }

    .metric-value-huge {
        font-size: 8rem;
    }

    .metric-label {
        font-size: 1.25rem;
    }

    .stat-val {
        font-size: 1.25rem;
    }

    .stat-lbl {
        font-size: 0.7rem;
    }
}

/* -------------------------------------------------------------------------- */
/*                        4K MONITORS (2561px - 3840px)                       */
/* -------------------------------------------------------------------------- */
@media (min-width: 2561px) and (max-width: 3840px) {
    .infinity-deck-container {
        max-width: 1800px;
        height: 900px;
    }

    .deck-viewport {
        width: 560px;
        height: 720px;
    }

    .deck-control-btn {
        width: 68px;
        height: 68px;
    }

    .btn-left {
        left: 3rem;
    }

    .btn-right {
        right: 3rem;
    }

    .control-icon {
        width: 28px;
        height: 28px;
    }

    .monolith-content {
        padding: 5rem 4.5rem;
    }

    .monolith-badge {
        font-size: 0.75rem;
        padding: 8px 18px;
    }

    .metric-value-huge {
        font-size: 9rem;
    }

    .metric-label {
        font-size: 1.35rem;
    }

    .card-bottom-row {
        gap: 2rem;
        margin-top: 2.5rem;
        padding-top: 2.5rem;
    }

    .stat-val {
        font-size: 1.35rem;
    }

    .stat-lbl {
        font-size: 0.75rem;
    }
}

/* -------------------------------------------------------------------------- */
/*                       8K & ULTRA-WIDE (3841px+)                            */
/* -------------------------------------------------------------------------- */
@media (min-width: 3841px) {
    .proof-section {
        max-width: 2400px;
        margin: 0 auto;
    }

    .infinity-deck-container {
        max-width: 2000px;
        height: 1000px;
    }

    .deck-viewport {
        width: 640px;
        height: 840px;
    }

    .deck-control-btn {
        width: 80px;
        height: 80px;
    }

    .btn-left {
        left: 4rem;
    }

    .btn-right {
        right: 4rem;
    }

    .control-icon {
        width: 32px;
        height: 32px;
        stroke-width: 1.5px;
    }

    .monolith-card {
        border-radius: 40px;
    }

    .monolith-content {
        padding: 6rem 5rem;
    }

    .monolith-badge {
        font-size: 0.8rem;
        padding: 8px 20px;
    }

    .metric-value-huge {
        font-size: 11rem;
    }

    .metric-label {
        font-size: 1.5rem;
    }

    .card-bottom-row {
        gap: 2.5rem;
        margin-top: 3rem;
        padding-top: 3rem;
    }

    .stat-val {
        font-size: 1.5rem;
    }

    .stat-lbl {
        font-size: 0.8rem;
    }
}

/* -------------------------------------------------------------------------- */
/*                      LANDSCAPE MOBILE ADJUSTMENTS                          */
/* -------------------------------------------------------------------------- */
@media (max-height: 500px) and (orientation: landscape) {
    .infinity-deck-container {
        height: 380px;
    }

    .deck-viewport {
        height: 350px;
    }

    .monolith-content {
        padding: 2rem 2.5rem;
    }

    .metric-value-huge {
        font-size: 4rem;
    }

    .card-bottom-row {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

/* -------------------------------------------------------------------------- */
/*                          PRINT OPTIMIZATION                                */
/* -------------------------------------------------------------------------- */
@media print {
    .deck-control-btn {
        display: none !important;
    }

    .infinity-deck-container {
        height: auto;
        page-break-inside: avoid;
    }

    .deck-card:not(.active) {
        display: none;
    }

    .deck-card.active {
        position: relative;
        opacity: 1;
        transform: none !important;
        filter: none !important;
    }
}