/* BASE STYLES */
body {
    font-family: var(--font-main);
    background-color: #ffffff;
    color: var(--color-text-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
}

img {
    color: transparent;
}

img.is-loaded {
    color: inherit;
}

/* ==========================================
   BUTTON SYSTEM
   ========================================== */
.btn-primary, .btn-secondary {
    height: 44px;
    padding: 0 1.75rem 2px 1.75rem;
    border-radius: 999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: 
        background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
    background-color: var(--ruby-main);
    color: var(--color-text-light);
}

.btn-secondary {
    background-color: rgba(184, 29, 36, 0.12);
    color: var(--color-text-light);
    border: 1px solid rgba(184, 29, 36, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

@media (hover: hover) {
    .btn-primary:hover {
        background-color: var(--ruby-hover);
        border-color: rgba(255, 255, 255, 0.25);
    }

    .btn-secondary:hover {
        background-color: rgba(184, 29, 36, 0.28);
        border-color: var(--ruby-hover);
    }
}


.btn-primary:active {
    background-color: var(--ruby-active);
}

.btn-secondary:active {
    background-color: rgba(184, 29, 36, 0.4);
}

/* ==========================================
   INTERACTIVE SUBSCRIBE WIDGET
   ========================================== */
.subscribe-widget {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 44px;
    width: 100%;
    max-width: 220px;
    flex-shrink: 0;
    border-radius: 999px;
    background-color: var(--ruby-main);
    color: var(--color-text-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) {
    .subscribe-widget:not(.is-active):not(.is-success):hover {
        background-color: var(--ruby-hover);
        box-shadow: 0 6px 20px var(--ruby-glow);
        transform: translateY(-2px);
    }
}

.sw-trigger {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1rem;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sw-form {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 0 4px 0 20px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(15px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sw-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    width: 100%;
}

.sw-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}


.sw-hp {
    display: none !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

.sw-submit {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.sw-submit:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.sw-success {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: 500;
}

/* --- STATE ANIMATIONS --- */

.subscribe-widget.is-active {
    width: 320px;
    max-width: 320px;
    background-color: var(--color-bg-slate);
    border-color: rgba(255, 255, 255, 0.2);
}

.subscribe-widget.is-active .sw-trigger,
.subscribe-widget.is-success .sw-trigger {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-15px);
}

.subscribe-widget.is-active .sw-form {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.subscribe-widget.is-success {
    background-color: #10b981;
    border-color: #10b981;
    max-width: 180px;
}

.subscribe-widget.is-success .sw-form {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-15px);
}

.subscribe-widget.is-success .sw-success {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

@keyframes sw-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.subscribe-widget.is-error {
    animation: sw-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    border-color: #ef4444 !important; /* Soft Red Alert */
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4) !important;
}


/* ==========================================
   SKELETON SHIMMER & FADE SYSTEM
   ========================================== */
@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #121212 0%, #222222 50%, #121212 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 2.8s infinite ease-in-out;
}

.skeleton-light {
    background: linear-gradient(90deg, #e5e5ea 0%, #f2f2f7 50%, #e5e5ea 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 2.8s infinite ease-in-out;
}

[data-fade-group] img,
img[data-fade-single] {
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

[data-fade-group].is-loaded img,
img[data-fade-single].is-loaded {
    opacity: 1;
}

/* --- Analytics Cookie Banner --- */
.cookie-consent-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 820px;
    background: rgba(18, 18, 22, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 16px 24px;
    z-index: 9999;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.cookie-consent-bar[hidden] {
    display: none !important;
}

.cookie-consent-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-consent-text {
    font-size: 0.88rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.cookie-consent-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 8px 18px !important;
    font-size: 0.82rem !important;
    border-radius: 8px !important;
    cursor: pointer;
    white-space: nowrap;
}



/* ==========================================
   SCROLL REVEAL SYSTEM
   ========================================== */

.reveal-el {
    opacity: 0;
    transform: translateY(30px);
    transition: 
        opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-el.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
    .reveal-el {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* ==========================================
   BREAKPOINT ADJUSTMENTS
   ========================================== */
@media (max-width: 734px) {
    .btn-primary, .btn-secondary, .sw-trigger {
        font-size: 0.95rem;
        padding: 0 1.25rem 2px 1.25rem;
    }

    /*Footer*/
        .site-footer {
        padding: 3rem 1.25rem 2rem 1.25rem;
    }

    .footer-tier-1 {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .footer-tier-3 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .footer-col {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .footer-col-toggle {
        cursor: pointer;
        padding: 0.9rem 0;
    }

    .footer-col-toggle .chevron-icon {
        display: block;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .footer-col.is-open .chevron-icon {
        transform: rotate(180deg);
    }

    .footer-col-list {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
        padding-bottom: 0;
    }

    .footer-col.is-open .footer-col-list {
        max-height: 320px;
        opacity: 1;
        padding-bottom: 1rem;
    }

    .footer-tier-4 {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .cookie-consent-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .cookie-consent-actions {
        width: 100%;
        justify-content: flex-end;
    }

}