/* Variables inherited from style.css */

body {
    background-color: var(--gta-dark);
    color: #fff;
    font-family: var(--gta-font);
    overflow-x: hidden;
}

/* Ultimate Pinned Architecture */
.ultimate-scroll-container {
    height: 2000vh;
    /* Doubled height for smoother timing (200vh per section) */
    position: relative;
    background: var(--gta-dark);
}

.scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.8s ease-in-out;
}

.scene.active {
    opacity: 1;
    pointer-events: auto;
}

.scene-bg {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    will-change: transform;
}

.scene-bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Maximum Contrast: Solid dark midnight overlay + Radial vignette + Noise */
    background: linear-gradient(rgba(2, 2, 5, 0.7), rgba(2, 2, 5, 0.7)),
        radial-gradient(circle at center, rgba(0, 31, 63, 0.3) 0%, rgba(2, 2, 5, 0.95) 100%),
        url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.85;
    pointer-events: none;
}

.scene-content {
    position: relative;
    z-index: 20;
    padding: 0 10%;
    width: 100%;
    text-align: center;
    will-change: transform, opacity, filter;
}

/* Reveal Styles (Linked to --reveal-progress) */
.reveal-left,
.reveal-right,
.reveal-center {
    opacity: var(--reveal-opacity, 0);
    filter: blur(calc(30px * (1 - var(--reveal-progress, 0))));
}

.reveal-left {
    transform: translateX(calc(-150px * (1 - var(--reveal-progress, 0))));
}

.reveal-right {
    transform: translateX(calc(150px * (1 - var(--reveal-progress, 0))));
}

.reveal-center {
    transform: translateY(calc(50px * (1 - var(--reveal-progress, 0)))) scale(calc(0.8 + (0.2 * var(--reveal-progress, 0))));
}

/* Typography Overhaul - Midnight Edition */
.gta-vi-title,
.gta-vi-title .cms-editable {
    font-size: clamp(5rem, 20vw, 15rem);
    font-weight: 900;
    line-height: 0.8;
    background: linear-gradient(to bottom, #fff 30%, var(--gta-teal) 70%, var(--gta-blue) 100%);
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    display: inline-block;
}

.gta-vi-title {
    margin: 0;
    filter: drop-shadow(0 0 40px rgba(0, 114, 255, 0.6));
}

.gta-sub-brand,
.gta-sub-brand .cms-editable {
    font-weight: 900;
    letter-spacing: 20px;
    font-size: 1.2rem;
    background: linear-gradient(90deg, #fff, var(--gta-teal), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.gta-sub-brand {
    margin: 0;
    transform: translateY(-20px);
    text-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

.main-title,
.main-title .cms-editable {
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: 900;
    background: linear-gradient(to right, #fff, var(--gta-teal));
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    display: inline-block;
}

.main-title {
    margin-top: 2rem;
}

.sub-title {
    font-size: 1.2rem;
    letter-spacing: 12px;
    color: var(--gta-teal);
    text-transform: uppercase;
    font-weight: 800;
}

.section-title,
.section-title .cms-editable {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    background: linear-gradient(to bottom, #fff 0%, var(--gta-blue) 100%);
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    display: inline-block;
}

.section-title {
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(0, 114, 255, 0.4));
}

.section-text {
    font-size: 1.4rem;
    max-width: 800px;
    margin: 0 auto;
    color: #ddd;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Inline CMS styles */
.cms-editable {
    position: relative;
    display: inline;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    -webkit-text-fill-color: inherit;
    background-clip: inherit;
    -webkit-background-clip: inherit;
}

.cms-editable:hover {
    outline: 1px dashed var(--gta-pink);
    border-radius: 4px;
}

.cms-edit-btn {
    position: absolute;
    top: -25px;
    left: 0;
    background: var(--gta-pink);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    z-index: 100;
    display: none;
    text-transform: uppercase;
    font-weight: bold;
}

.cms-editable:hover .cms-edit-btn {
    display: block;
}

/* Global Edit Mode CMS - Overhaul */
#cms-admin-toolbar {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    background: rgba(10, 10, 10, 0.9);
    padding: 10px 25px;
    border-radius: 50px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.cms-toolbar-title {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--gta-pink);
    letter-spacing: 2px;
}

.cms-toggle-btn {
    background: #333;
    color: white;
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cms-toggle-btn.active {
    background: #2ecc71;
}

/* Markers and High-Visibility */
.cms-editable {
    position: relative;
    cursor: default;
}

body.edit-mode .cms-editable {
    cursor: text;
    transition: all 0.2s;
}

.cms-pencil-icon {
    position: absolute;
    top: -15px;
    right: -20px;
    background: var(--gta-pink);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.5);
    z-index: 100;
    pointer-events: none;
}

body.edit-mode .cms-pencil-icon {
    display: flex;
}

body.edit-mode .cms-editable:hover {
    background: rgba(255, 0, 255, 0.1);
    box-shadow: 0 0 0 5px rgba(255, 0, 255, 0.1);
    border-radius: 4px;
}

/* Scroll Progress Indicator */
.scroll-progress-container {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 400px;
    text-align: center;
}

.scroll-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.scroll-progress-bar::after {
    content: "";
    display: block;
    width: var(--scroll-percent, 0%);
    height: 100%;
    background: linear-gradient(90deg, var(--gta-blue), var(--gta-teal));
    box-shadow: 0 0 15px var(--gta-teal);
    transition: width 0.1s ease-out;
}

.scroll-scene-indicator {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.scroll-scene-indicator span {
    color: var(--gta-teal);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

/* Marker for layers */
body.edit-mode .scene-content {
    pointer-events: auto !important;
}

body.edit-mode .scene-bg {
    filter: blur(10px) brightness(0.3);
}

body.edit-mode .scene {
    pointer-events: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

/* Toast Container from notification.js (styles moved here just in case) */
#toast-container {
    pointer-events: none;
}

/* Final CTA Enhancements */
.cta-group {
    display: flex;
    gap: 30px;
    /* Increased gap for frame buttons */
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

/* Header customization for home */
header.home-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    z-index: 1000;
    border: none;
    box-shadow: none;
}

/* --- GTA VI PREMIUM FRAME BUTTONS --- */
.btn-gta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #fff;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transition: all 0.3s ease;
    /* GTA Style Cut Corner */
    clip-path: polygon(0 0,
            100% 0,
            100% calc(100% - 15px),
            calc(100% - 15px) 100%,
            0 100%);
}

/* Gradient Border Effect using pseudo-element */
.btn-gta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2px;
    /* Border thickness */
    background: linear-gradient(45deg, var(--gta-pink), #fff, var(--gta-teal), var(--gta-blue));
    background-size: 300% 300%;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s;
}

/* Utilities */
.mt-4 {
    margin-top: 1.5rem;
}

/* Inner sheen */
.btn-gta::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: 1;
}

/* Hover Effects */
.btn-gta:hover {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-gta:hover::before {
    animation: frameGlow 3s linear infinite;
    background: linear-gradient(45deg, var(--gta-pink), var(--gta-teal), #fff, var(--gta-blue));
    background-size: 300% 300%;
}

.btn-gta:hover::after {
    left: 100%;
}

@keyframes frameGlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.btn-gta i {
    z-index: 20;
    color: var(--gta-teal);
    transition: 0.3s;
}

.btn-gta:hover i {
    color: #fff;
    transform: scale(1.1);
}

/* Accent Variation (Connexion vs Règlement) */
.btn-gta.accent::before {
    background: linear-gradient(45deg, var(--gta-blue), #fff, var(--gta-pink));
    background-size: 300% 300%;
}