/* ==========================================================================
   ESDESIRE V2 — SHARED BASE
   Tokens, reset, frame, scrollbar, transitions
   Loaded on EVERY page via master-v2.blade.php
   ========================================================================== */

/* ── Reset & Tokens ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --v2-black: #000;
    --v2-white: #fff;
    --v2-gray-100: #f5f5f5;
    --v2-gray-200: #e5e5e5;
    --v2-gray-400: #a3a3a3;
    --v2-gray-500: #737373;
    --v2-gray-700: #404040;
    --v2-gray-800: #262626;
    --v2-gray-900: #171717;

    /* Brand palette — priority: green > purple > blue */
    --v2-green: #80b737;
    --v2-purple: #8b4486;
    --v2-blue: #118bbd;

    /* Semantic aliases */
    --v2-accent: var(--v2-green);
    --v2-accent-2: var(--v2-purple);
    --v2-accent-3: var(--v2-blue);

        --v2-max-w: 1600px;
    --v2-nav-h: 72px;
    --v2-font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --v2-font-head: 'Outfit', sans-serif;
    --v2-font-serif: 'Georgia', 'Times New Roman', serif;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--v2-blue) var(--v2-black);
}

html::-webkit-scrollbar,
body.v2::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

html::-webkit-scrollbar-track,
body.v2::-webkit-scrollbar-track {
    background: var(--v2-black);
}

html::-webkit-scrollbar-thumb,
body.v2::-webkit-scrollbar-thumb {
    background: var(--v2-blue);
    border-radius: 0 !important;
}

html::-webkit-scrollbar-corner,
body.v2::-webkit-scrollbar-corner {
    background: var(--v2-black);
}

body.v2 {
    background: var(--v2-black);
    color: var(--v2-white);
    font-family: var(--v2-font);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

body.v2:not(.v2-page-ready) {
    overflow: hidden;
}

.v2-main-shell {
    display: block;
    flex: 1 0 auto;
    width: 100%;
}

.v2-cookie-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 10040;
    max-width: 980px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(180deg, rgba(18, 18, 18, 0.96), rgba(8, 8, 8, 0.98)),
        rgba(0, 0, 0, 0.96);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
    transition: opacity 0.28s ease, visibility 0.28s ease, transform 0.28s ease;
}

.v2-cookie-banner.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.v2-cookie-banner.is-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
}

.v2-cookie-banner-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px;
}

.v2-cookie-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 720px;
}

.v2-cookie-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.56);
}

.v2-cookie-title {
    font-family: var(--v2-font-head);
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.35;
    color: var(--v2-white);
}

.v2-cookie-text {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
}

.v2-cookie-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    flex-shrink: 0;
    width: 220px;
}

.v2-cookie-btn {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    overflow: hidden;
    min-width: 220px;
    min-height: 54px;
    justify-content: center;
    padding: 16px 20px;
    border: 1px solid transparent;
    box-shadow: none !important;
    outline: none;
    background: transparent;
    transition: none;
}

.v2-cookie-btn-fill {
    position: absolute;
    inset: 0;
    transform-origin: left center;
    transform: scaleX(1);
    pointer-events: none;
}

.v2-cookie-btn-label {
    position: relative;
    z-index: 1;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.v2-cookie-btn.v2-btn--ghost,
.v2-cookie-btn.v2-btn--ghost:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: transparent;
    color: var(--v2-black);
}

.v2-cookie-btn.v2-btn--ghost .v2-cookie-btn-fill {
    background: rgba(255, 255, 255, 0.9);
}

.v2-cookie-btn.v2-btn--ghost .v2-cookie-btn-label {
    color: var(--v2-black);
}

.v2-cookie-btn.v2-btn--blue,
.v2-cookie-btn.v2-btn--blue:hover {
    border-color: var(--v2-blue);
    background: transparent;
    color: var(--v2-white);
    box-shadow: none !important;
}

.v2-cookie-btn.v2-btn--blue .v2-cookie-btn-fill {
    background: var(--v2-blue);
}

.v2-cookie-btn.v2-btn--blue .v2-cookie-btn-label {
    color: var(--v2-white);
}

.v2-btn--blue {
    border-color: var(--v2-blue);
    background: var(--v2-blue);
    color: var(--v2-white);
}

.v2-btn--blue:hover {
    border-color: var(--v2-blue);
    background: transparent;
    color: var(--v2-blue);
}

@media (max-width: 860px) {
    .v2-cookie-banner-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .v2-cookie-actions {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .v2-cookie-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .v2-cookie-banner-inner {
        padding: 18px;
    }

    .v2-cookie-actions {
        flex-direction: column;
    }

    .v2-cookie-btn {
        width: 100%;
    }
}

/* ==========================================================================
   V2 PAGE LOADER
   ========================================================================== */
.v2-page-loader {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at 16% 18%, rgba(128, 183, 55, 0.18), transparent 28%),
        radial-gradient(circle at 84% 22%, rgba(139, 68, 134, 0.2), transparent 30%),
        radial-gradient(circle at 52% 82%, rgba(17, 139, 189, 0.18), transparent 32%),
        linear-gradient(180deg, rgba(5, 5, 5, 0.98), rgba(0, 0, 0, 0.94));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.v2-page-loader.is-hiding {
    opacity: 0;
    visibility: hidden;
}

.v2-page-loader.is-hidden {
    display: none;
}

.v2-page-loader-core {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    width: min(100%, 420px);
    padding: 34px 32px 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
        rgba(8, 8, 8, 0.86);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(0) scale(1);
    transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.v2-page-loader.is-hiding .v2-page-loader-core {
    opacity: 0;
    transform: translateY(-18px) scale(0.96);
}

.v2-page-loader-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.74);
}

.v2-page-loader-kicker::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--v2-green), var(--v2-blue));
    box-shadow: 0 0 18px rgba(128, 183, 55, 0.45);
    animation: v2LoaderPulseDot 1.3s ease-in-out infinite;
}

.v2-page-loader-wordmark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.v2-page-loader-wordmark strong {
    display: block;
    font-family: var(--v2-font-head);
    font-size: clamp(2.2rem, 6vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 0.95;
    color: var(--v2-white);
}

.v2-page-loader-wordmark span {
    display: block;
    width: min(220px, 62vw);
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--v2-green), var(--v2-purple) 52%, var(--v2-blue));
    background-size: 200% 100%;
    box-shadow: 0 0 24px rgba(17, 139, 189, 0.24);
    animation: v2LoaderSweep 1.8s linear infinite;
}

.v2-page-loader-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
}

.v2-page-loader-bar {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    transform-origin: center bottom;
    animation: v2LoaderBar 1s ease-in-out infinite;
}

.v2-page-loader-bar--green {
    background: linear-gradient(180deg, rgba(128, 183, 55, 1), rgba(128, 183, 55, 0.28));
}

.v2-page-loader-bar--purple {
    background: linear-gradient(180deg, rgba(139, 68, 134, 1), rgba(139, 68, 134, 0.28));
    animation-delay: 0.15s;
}

.v2-page-loader-bar--blue {
    background: linear-gradient(180deg, rgba(17, 139, 189, 1), rgba(17, 139, 189, 0.28));
    animation-delay: 0.3s;
}

.v2-page-loader-copy {
    max-width: 260px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.7;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.58);
}

@keyframes v2LoaderPulseDot {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.82;
    }
    50% {
        transform: scale(1.18);
        opacity: 1;
    }
}

@keyframes v2LoaderSweep {
    from { background-position: 0% 50%; }
    to { background-position: 200% 50%; }
}

@keyframes v2LoaderBar {
    0%, 100% {
        height: 14px;
        opacity: 0.48;
    }
    50% {
        height: 48px;
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .v2-page-loader {
        padding: 18px;
    }

    .v2-page-loader-core {
        padding: 28px 22px 24px;
        border-radius: 22px;
        gap: 16px;
    }

    .v2-page-loader-kicker {
        font-size: 10px;
        letter-spacing: 0.14em;
    }

    .v2-page-loader-bars {
        min-height: 44px;
        gap: 8px;
    }

    .v2-page-loader-bar {
        width: 13px;
    }

    .v2-page-loader-copy {
        max-width: 220px;
        font-size: 11px;
        letter-spacing: 0.1em;
    }
}

/* Global particle canvas */
.v2-particle-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

body.v2 a { color: inherit; text-decoration: none; }
body.v2 img { max-width: 100%; display: block; }
body.v2 button { font-family: inherit; cursor: pointer; }

body.v2 button,
body.v2 [type='button'],
body.v2 [type='submit'],
body.v2 [type='reset'],
body.v2 .v2-btn,
body.v2 .v2-form-submit,
body.v2 .v2-theme-toggle,
body.v2 .v2-lang-btn,
body.v2 .v2-filter-btn,
body.v2 .page-link,
body.v2 a.v2-nav-hosting {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body.v2 button:focus,
body.v2 button:focus-visible,
body.v2 button:active,
body.v2 [type='button']:focus,
body.v2 [type='button']:focus-visible,
body.v2 [type='button']:active,
body.v2 [type='submit']:focus,
body.v2 [type='submit']:focus-visible,
body.v2 [type='submit']:active,
body.v2 [type='reset']:focus,
body.v2 [type='reset']:focus-visible,
body.v2 [type='reset']:active,
body.v2 .v2-btn:focus,
body.v2 .v2-btn:focus-visible,
body.v2 .v2-btn:active,
body.v2 .v2-form-submit:focus,
body.v2 .v2-form-submit:focus-visible,
body.v2 .v2-form-submit:active,
body.v2 .v2-theme-toggle:focus,
body.v2 .v2-theme-toggle:focus-visible,
body.v2 .v2-theme-toggle:active,
body.v2 .v2-lang-btn:focus,
body.v2 .v2-lang-btn:focus-visible,
body.v2 .v2-lang-btn:active,
body.v2 .v2-filter-btn:focus,
body.v2 .v2-filter-btn:focus-visible,
body.v2 .v2-filter-btn:active,
body.v2 .page-link:focus,
body.v2 .page-link:focus-visible,
body.v2 .page-link:active,
body.v2 a.v2-nav-hosting:focus,
body.v2 a.v2-nav-hosting:focus-visible,
body.v2 a.v2-nav-hosting:active {
    outline: none !important;
    box-shadow: none !important;
}

/* ── Frame (max-width wrapper) ── */
.v2-frame {
    width: 100%;
    max-width: var(--v2-max-w);
    margin: 0 auto;
    padding: 0 48px;
}

@media (max-width: 768px) {
    .v2-frame { padding: 0 24px; }
}

@media (max-width: 480px) {
    .v2-frame { padding: 0 18px; }
}

/* ==========================================================================
   V2-BTN — Reusable filled button with arrow icon
   ========================================================================== */
.v2-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--v2-white);
    text-decoration: none;
    transition: color 0.35s ease;
}

.v2-btn-text {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: color 0.35s ease;
}

.v2-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 13px;
    border-radius: 2px;
    border: 2px solid transparent;
    background: transparent;
    transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease, transform 0.35s ease;
}

/* ── Green variant ── */
.v2-btn--green .v2-btn-icon { background: var(--v2-green); color: var(--v2-white); }
.v2-btn--green:hover .v2-btn-icon { background: transparent; border-color: var(--v2-green); color: var(--v2-green); transform: translateX(2px); }
.v2-btn--green:hover .v2-btn-text { color: var(--v2-green); }

/* ── Purple variant ── */
.v2-btn--purple .v2-btn-icon { background: var(--v2-purple); color: var(--v2-white); }
.v2-btn--purple:hover .v2-btn-icon { background: transparent; border-color: var(--v2-purple); color: var(--v2-purple); transform: translateX(2px); }
.v2-btn--purple:hover .v2-btn-text { color: var(--v2-purple); }

/* ── Blue variant ── */
.v2-btn--blue .v2-btn-icon { background: var(--v2-blue); color: var(--v2-white); }
.v2-btn--blue:hover .v2-btn-icon { background: transparent; border-color: var(--v2-blue); color: var(--v2-blue); transform: translateX(2px); }
.v2-btn--blue:hover .v2-btn-text { color: var(--v2-blue); }

/* ── Small variant ── */
.v2-btn--sm .v2-btn-text { font-size: 13px; }
.v2-btn--sm .v2-btn-icon { width: 28px; height: 28px; font-size: 11px; }

/* ==========================================================================
   SCROLLBAR
   ========================================================================== */
body.v2::-webkit-scrollbar {
    width: 8px;
}

body.v2::-webkit-scrollbar-track {
    background: var(--v2-black);
}

body.v2::-webkit-scrollbar-thumb {
    background: var(--v2-gray-700);
    border-radius: 4px;
}

body.v2::-webkit-scrollbar-thumb:hover {
    background: var(--v2-gray-500);
}

/* ==========================================================================
   GLOBAL TRANSITIONS
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .v2-page-loader {
        transition: none;
    }
}
