/* ========================================
   STAGE 4 — THE PACT (Progressive Text Reveal)
   Block 0 blur-to-clear on scroll, then block progression
   ======================================== */

.pact-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Accent glow behind content area */
.pact-container::before {
    content: '';
    position: absolute;
    top: 40%;
    left: 50%;
    width: 500px;
    height: 500px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: pactGlow 5s ease-in-out infinite;
}

@keyframes pactGlow {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* --- Floating particles (subtle background) --- */
.pact-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.pact-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(201,168,76,0.3);
    box-shadow: 0 0 6px rgba(201,168,76,0.2);
    animation: pactFloat linear infinite;
}

.pact-particle:nth-child(1) { left: 12%; top: 20%; animation-duration: 14s; animation-delay: 0s; }
.pact-particle:nth-child(2) { left: 80%; top: 35%; animation-duration: 18s; animation-delay: -4s; width: 3px; height: 3px; }
.pact-particle:nth-child(3) { left: 25%; top: 70%; animation-duration: 16s; animation-delay: -8s; }
.pact-particle:nth-child(4) { left: 72%; top: 65%; animation-duration: 20s; animation-delay: -12s; width: 3px; height: 3px; }
.pact-particle:nth-child(5) { left: 45%; top: 15%; animation-duration: 15s; animation-delay: -3s; width: 3px; height: 3px; }
.pact-particle:nth-child(6) { left: 60%; top: 80%; animation-duration: 17s; animation-delay: -7s; }

@keyframes pactFloat {
    0%, 100% { transform: translate(0, 0); opacity: 0; }
    10% { opacity: 0.7; }
    50% { transform: translate(25px, -50px); opacity: 0.3; }
    90% { opacity: 0.7; }
}

/* --- HUD pill (top-left, like services) --- */
.pact-hud {
    position: absolute;
    left: 16px;
    top: 16px;
    z-index: 30;
    pointer-events: none;
}

.pact-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: rgba(10,10,10,0.6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.pact-hud-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.pact-hud-title {
    font-family: var(--font-head);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text);
}

/* --- Corner accent brackets (decorative) --- */
.pact-corner {
    position: absolute;
    width: 36px;
    height: 36px;
    border-color: rgba(201,168,76,0.4);
    border-style: solid;
    border-width: 0;
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
    opacity: 0;
    transform: scale(0.8);
}

.pact-active .pact-corner {
    opacity: 1;
    transform: scale(1);
}

.pact-corner.tl {
    top: -24px;
    left: -24px;
    border-top-width: 1.5px;
    border-left-width: 1.5px;
}

.pact-corner.br {
    bottom: -24px;
    right: -24px;
    border-bottom-width: 1.5px;
    border-right-width: 1.5px;
}

/* --- Pact Blocks (base transition) --- */
.pact-block {
    position: absolute;
    text-align: center;
    max-width: 700px;
    padding: 0 30px;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

/* --- Unique entrance per block --- */

/* Block 0: handled by JS (blur + translateY) */
.pact-block[data-pact="0"] {
    transition: opacity 0.7s ease;
}

/* Block 1: Scale up from small */
.pact-block[data-pact="1"] {
    transform: scale(0.85);
    transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Block 2: Slide from left */
.pact-block[data-pact="2"] {
    transform: translateX(-60px);
    transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Block 3: Slide from right */
.pact-block[data-pact="3"] {
    transform: translateX(60px);
    transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Block 4: Rise up with scale */
.pact-block[data-pact="4"] {
    transform: translateY(40px) scale(0.9);
    transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Active state — resets all transforms */
.pact-block.pact-active {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
    pointer-events: auto;
}

/* Block 0: "Let's Make It Clear" — rises from bottom + blur clears via JS */
.pact-clear {
    font-family: var(--font-head);
    font-size: clamp(2.2rem, 6vw, 4rem);
    letter-spacing: 3px;
    color: white;
    line-height: 1.3;
    /* Initial state: blurred + pushed down (set by CSS, no transition yet) */
    filter: blur(20px);
    transform: translateY(60px);
}

/* Transition enabled by JS after initial state is set */
.pact-clear.animated {
    transition: filter 0.8s ease-out, transform 0.8s ease-out;
}

/* Scroll hint below the blurred text */
.pact-scroll-hint {
    margin-top: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: opacity 0.5s ease;
}

.pact-scroll-hint span {
    font-family: var(--font-tech);
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
}

.pact-scroll-arrow {
    width: 14px;
    height: 14px;
    border-right: 1px solid rgba(255,255,255,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    transform: rotate(45deg);
    animation: pactScrollBounce 2.5s ease-in-out infinite;
}

@keyframes pactScrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.3; }
    50% { transform: rotate(45deg) translateY(5px); opacity: 0.7; }
}

/* Block 1: "It's a Pact!" — gradient declaration */
.pact-declaration {
    font-family: var(--font-head);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: 3px;
    background: linear-gradient(135deg, var(--accent), #fff, var(--accent));
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Accent divider line */
.pact-divider {
    width: 140px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 28px auto;
    box-shadow: 0 0 8px rgba(201,168,76,0.3);
}

/* Animated divider — grows from center when block is active */
.pact-active .pact-divider {
    animation: dividerGrow 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes dividerGrow {
    from { width: 0; opacity: 0; }
    to { width: 140px; opacity: 1; }
}

/* Section labels */
.pact-section-label {
    font-family: var(--font-tech);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 24px;
}

/* Manifesto text */
.pact-text {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2.2vw, 1.3rem);
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    font-weight: 300;
}

.pact-text strong {
    color: white;
    font-weight: 500;
}

.pact-text-italic {
    font-style: italic;
    color: var(--dim);
    margin-top: 30px;
}

/* Block 4: Partnership large text */
.pact-declaration-small {
    font-family: var(--font-head);
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 3px;
    background: linear-gradient(135deg, var(--accent), #fff, var(--accent));
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease-in-out infinite;
    margin-bottom: 20px;
}

/* Mic active: accent shifts to red */
.pact-block.mic-active .pact-section-label {
    color: var(--holo-red);
}

.pact-block.mic-active .pact-declaration,
.pact-block.mic-active .pact-declaration-small {
    background: linear-gradient(135deg, var(--holo-red), #fff, var(--holo-red));
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
}

.pact-block.mic-active .pact-hud-dot {
    background: var(--holo-red);
    box-shadow: 0 0 10px var(--holo-red);
}

/* --- Progress Dots (bottom center) --- */
.pact-progress {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.pact-dot {
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    font: inherit;
    color: inherit;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.pact-dot.active {
    width: 18px;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(201, 168, 76, 0.4);
}

/* ========================================
   MOBILE
   ======================================== */
@media (max-width: 768px) {
    .pact-block {
        padding: 0 20px;
    }

    .pact-hud { left: 12px; top: 12px; }
    .pact-pill { padding: 7px 12px; }
    .pact-hud-title { font-size: 10px; }

    .pact-progress {
        bottom: 20px;
    }

    .pact-text {
        font-size: 1.05rem;
    }

    .pact-clear {
        font-size: clamp(2rem, 6vw, 3rem);
    }

    .pact-declaration {
        font-size: clamp(2rem, 6vw, 3.5rem);
    }

    .pact-declaration-small {
        font-size: clamp(1.7rem, 5vw, 2.8rem);
    }

    .pact-section-label {
        font-size: 12px;
    }

    .pact-corner { display: none; }
}

/* ========================================
   NARROW VIEWPORT — ≤ 374px
   ======================================== */
@media (max-width: 374px) {
    .pact-block { padding: 0 12px; }
    .pact-hud { left: 8px; top: 8px; }
    .pact-pill { padding: 4px 8px; }
    .pact-hud-title { font-size: 8px; letter-spacing: 1.5px; }
    .pact-clear { font-size: 1.4rem; }
    .pact-declaration { font-size: 1.8rem; letter-spacing: 0.04em; }
    .pact-declaration-small { font-size: 1.3rem; }
    .pact-text { font-size: 0.85rem; line-height: 1.45; }
    .pact-section-label { font-size: 9px; letter-spacing: 2px; }
    .pact-progress { gap: 8px; bottom: 16px; }
    .pact-dot { width: 6px; height: 6px; }
    .pact-dot.active { width: 16px; }
}
