/* ============================================
   Next Song AI - Production Stylesheet
   ============================================

   Table of Contents:
   1. Design Tokens (CSS Variables)
   2. Reset & Base Styles
   3. Utility Classes
   4. Components
   5. Layout Components
   6. Section Styles
   7. Responsive Design
   ============================================ */

/* ============================================
   1. DESIGN TOKENS
   ============================================ */
:root {
    /* === Colors === */
    --color-primary: #8021FF;
    --color-primary-dark: #4D10AB;
    --color-background: #180D3A;
    --color-accent: #CDEB77;
    --color-white: #FFFFFF;
    --color-grey-dark: #2D234C;
    --color-grey-neutral: #9691A6;
    --color-error: #EA4335;

    /* === Typography === */
    --font-primary: 'DM Sans', sans-serif;
    --font-secondary: 'Inter', var(--font-primary);

    /* Font Sizes */
    --text-xs: 14px;
    --text-sm: 16px;
    --text-base: 18px;
    --text-md: 20px;
    --text-lg: 24px;
    --text-xl: 32px;
    --text-2xl: 48px;
    --text-3xl: 76px;

    /* Font Weights */
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Letter Spacing */
    --tracking-tight: 0.018em;
    --tracking-normal: 0.032em;
    --tracking-wide: 0.046em;
    --tracking-wider: 0.048em;

    /* === Spacing === */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 40px;
    --space-2xl: 56px;
    --space-3xl: 72px;

    /* Page Margins */
    --page-margin: 211px;
    --page-margin-md: 100px;
    --page-margin-sm: 50px;
    --page-margin-xs: 20px;

    /* === Border Radius === */
    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 25px;
    --radius-2xl: 40px;
    --radius-full: 100px;

    /* === Shadows === */
    --shadow-sm: 0 4px 20px rgba(205, 235, 119, 0.3);
    --shadow-md: 0 20px 60px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 25px 80px rgba(0, 0, 0, 0.5);
    --shadow-glow: inset 0 0 15px rgba(255, 255, 255, 0.25);

    /* === Transitions === */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s ease;

    /* === Effects === */
    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-blur: blur(27.5px);

    /* === Z-Index Scale === */
    --z-base: 0;
    --z-above: 1;
    --z-modal: 100;
    --z-dialog: 200;
}

/* ============================================
   2. RESET & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: linear-gradient(to bottom left, var(--color-primary-dark), var(--color-background));
    color: var(--color-white);
    min-height: 100vh;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   3. UTILITY CLASSES
   ============================================ */

/* --- Text Utilities --- */
.text-bold {
    font-weight: var(--font-semibold);
}

.text-accent {
    color: var(--color-accent);
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

/* --- Layout Utilities --- */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.items-end {
    align-items: flex-end;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-xs {
    gap: var(--space-xs);
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.gap-xl {
    gap: var(--space-xl);
}

/* --- Glassmorphism Effect --- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.glass-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: var(--shadow-glow);
    pointer-events: none;
}

/* ============================================
   4. COMPONENTS
   ============================================ */

/* --- Navigation Bar --- */
.nav-bar {
    position: absolute;
    top: 58px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 195px;
    height: 56px;
    padding: 10px 5px 10px 30px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

.nav-bar__glow {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.nav-bar__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-bar__logo-img {
    height: 43.119px;
    width: auto;
}

.nav-bar__cta {
    padding: 10px 11px 10px 20px;
    justify-content: center;
    align-items: center;
    display: flex;
    gap: 6px;
    background: var(--color-accent);
    color: var(--color-background);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: 0.3s ease all;
    border-radius: 8px;
    box-shadow: 0 0 14px 0 rgba(255, 255, 255, 0.10) inset;
    backdrop-filter: blur(10px);
}

.nav-bar__cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    right: 50%;
    bottom: 0;
    opacity: 0;
    background-color: rgba(255, 255, 255, 0.5);
    z-index: -1;
    transition: 0.4s ease all;
}

.nav-bar__cta:hover::before,
.nav-bar__cta:focus-visible::before {
    left: 0;
    right: 0;
    opacity: 1;
}

.nav-bar__cta:active {
    transform: scale(0.95);
}

.nav-bar__arrow {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Responsive adjustments for nav bar */
@media (max-width: 768px) {
    .nav-bar {
        gap: 20px;
        padding: 8px 5px 8px 15px;
        left: 20px;
        right: 20px;
        transform: none;
        width: auto;
    }

    .nav-bar__logo-img {
        height: 22px;
    }

    .nav-bar__cta {
        padding: 8px 10px 8px 14px;
        font-size: var(--text-sm);
    }

    .nav-bar__cta span {
        display: none;
    }

    .nav-bar__arrow {
        width: 20px;
        height: 20px;
    }
}

/* --- Primary Button --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-tight);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: 0.3s ease all;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    right: 50%;
    bottom: 0;
    opacity: 0;
    background-color: rgba(255, 255, 255, 0.5);
    z-index: -1;
    transition: 0.4s ease all;
}

.btn:hover::before,
.btn:focus-visible::before {
    left: 0;
    right: 0;
    opacity: 1;
}

.btn:hover,
.btn:focus-visible {
    transform: scale(1.03);
}

.btn:active {
    transform: scale(0.95);
}

.btn:focus {
    outline: none;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-background);
    border-radius: 10px;
    padding: 12px 32px;
    min-width: 250px;
    height: 44px;
}

.btn-primary:hover,
.btn-primary:focus {
    color: var(--color-background);
}

.btn-primary--large {
    min-width: 314px;
    height: 50px;
    padding: 14px 21px;
}

.btn-primary--square {
    border-radius: 10px;
}

/* --- Outline Button --- */
.btn-outline {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-sm);
    padding: 14px 21px;
    min-width: 314px;
    height: 50px;
    text-decoration: none;
}

.btn-outline:hover,
.btn-outline:focus {
    background: rgba(205, 235, 119, 0.1);
    color: var(--color-accent);
}

/* --- Link CTA --- */
.link-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-tight);
    color: var(--color-accent);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.link-cta:hover {
    opacity: 0.8;
}

.link-cta svg {
    color: var(--color-accent);
}

/* --- Social Button --- */
.social-btn {
    width: 77px;
    height: 77px;
    border-radius: 50%;
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: 0.3s ease all;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: var(--color-accent);
    border-radius: 50%;
    z-index: -1;
    transition: 0.4s ease all;
    transform: translate(-50%, -50%);
}

.social-btn:hover::before,
.social-btn:focus::before {
    width: 100%;
    height: 100%;
}

.social-btn:hover,
.social-btn:focus {
    color: var(--color-background);
}

.social-btn:active {
    transform: scale(0.9);
}

.social-btn--filled {
    background: var(--color-white);
    color: var(--color-background);
}

.social-btn--filled::before {
    background-color: var(--color-primary);
}

.social-btn--filled:hover,
.social-btn--filled:focus {
    color: var(--color-background);
}

/* --- QR Code Box --- */
.qr-code {
    width: 202px;
    height: 202px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 10px;
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

/* --- Dialog / Modal --- */
.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(24, 13, 58, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-dialog);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.dialog-overlay[hidden] {
    display: none;
}

.dialog {
    position: relative;
    width: 90%;
    max-width: 720px;
    min-height: 540px;
    /* Fixed minimum height to prevent layout shifts */
    border-radius: var(--radius-2xl);
    padding: 60px 48px 48px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.dialog::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: inherit;
    z-index: -1;
}

.dialog__close {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    z-index: 2;
}

.dialog__close::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: rgba(90, 75, 120, 1);
    border-radius: 40px 40px 0 0;
    z-index: -1;
}

.dialog__close svg {
    transition: transform 0.2s ease;
}

.dialog__close:hover svg {
    transform: scale(1.2);
}

.dialog__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    text-align: center;
}

.dialog__title {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--color-white);
    margin: 0;
    line-height: 1;
}

.dialog__qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.dialog__label {
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 12px;
    font-weight: var(--font-regular);
    padding: 5px 16px;
    border-radius: var(--radius-full);
    line-height: 1.5;
}

.dialog__instruction {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-white);
    margin: 0;
    max-width: 333px;
    line-height: 1.04;
}

.dialog__qr-code {
    width: 234px;
    height: 234px;
    background: var(--color-background);
    border-radius: var(--radius-lg);
    padding: 10px;
    margin: var(--space-sm) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.dialog__qr-code img,
.dialog__qr-code canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.dialog__qr-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog__qr-loading[hidden] {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-accent);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.dialog__expires {
    font-size: 12px;
    font-weight: var(--font-regular);
    color: var(--color-white);
    min-height: 18px;
    /* Reserve space to prevent layout shift */
}

.dialog__refresh {
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    color: var(--color-white);
    margin: 0;
}

.dialog__refresh-link {
    color: var(--color-accent);
    font-weight: var(--font-semibold);
    text-decoration: none;
}

.dialog__refresh-link:hover {
    text-decoration: underline;
}

.dialog__description {
    font-size: var(--text-md);
    font-weight: var(--font-regular);
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    max-width: 480px;
}

.dialog__actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    width: 100%;
    max-width: 320px;
}

.btn-primary--outline {
    background: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
}

.btn-primary--outline:hover,
.btn-primary--outline:focus-visible {
    background: var(--color-accent);
    color: var(--color-background);
}

/* ============================================
   5. LAYOUT COMPONENTS
   ============================================ */

/* --- Page Container --- */
.page-container {
    width: 100%;
    position: relative;
}

/* --- Section Base --- */
.section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.section__bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

/* --- Section Typography --- */
.section__title {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-wider);
    line-height: 1;
    color: var(--color-white);
    margin-bottom: 28px;
}

.section__body {
    font-size: var(--text-xl);
    font-weight: var(--font-regular);
    letter-spacing: var(--tracking-normal);
    line-height: 1.09;
    color: var(--color-white);
    max-width: 860px;
}

/* --- Header Links --- */
.back-btn {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(-4px);
}

.header-links {
    position: absolute;
    top: 75px;
    right: var(--page-margin);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-link {
    font-family: 'Inter', var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--color-white);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.header-link:hover {
    opacity: 0.8;
}

/* --- Language Toggle --- */
.language-toggle {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.language-toggle__btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: 'Inter', var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--color-white);
    transition: opacity var(--transition-fast);
}

.language-toggle__btn:hover {
    opacity: 0.8;
}

.language-toggle__arrow {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.language-toggle__btn[aria-expanded="true"] .language-toggle__arrow {
    transform: rotate(180deg);
}

.language-toggle__dropdown {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    padding: 8px 0;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.language-toggle__dropdown.open {
    display: flex;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-regular);
    color: var(--color-white);
    transition: all var(--transition-fast);
    white-space: nowrap;
    width: 100%;
    text-align: right;
}

.lang-btn:hover {
    transform: scale(1.15);
}

.lang-btn.active {
    font-weight: var(--font-bold);
    color: var(--color-accent);
}

/* ============================================
   6. SECTION STYLES
   ============================================ */

/* === Hero Section === */
.section-hero {
    height: 150vh;
}

.hero__content {
    position: absolute;
    top: 50%;
    left: var(--page-margin);
    transform: translateY(-100%);
    max-width: 800px;
}

.hero__headline {
    font-size: var(--text-3xl);
    font-weight: var(--font-medium);
    line-height: 1;
    letter-spacing: var(--tracking-wide);
    color: var(--color-white);
    margin: 0;
}

.hero__emphasis {
    font-size: var(--text-3xl);
    font-weight: var(--font-semibold);
    line-height: 0.92;
    letter-spacing: var(--tracking-wide);
    color: var(--color-white);
    margin: 0 0 var(--space-lg) 0;
}

.hero__body {
    font-size: var(--text-xl);
    font-weight: var(--font-regular);
    letter-spacing: var(--tracking-normal);
    line-height: 1.2;
    color: var(--color-white);
    margin-bottom: var(--space-xl);
}

/* Hero QR Code Block */
.hero__qr-block {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    max-width: 503px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.10);
    padding: 20px;
}

.hero__qr-code {
    flex-shrink: 0;
    width: 133px;
    height: 133px;
    border-radius: 16px;
    overflow: hidden;
    background: white;
}

.hero__qr-code img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__qr-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.hero__qr-title {
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
    color: var(--color-accent);
    line-height: 1.4;
    margin: 0;
}

.hero__qr-subtitle {
    font-size: var(--text-lg);
    font-weight: var(--font-regular);
    color: var(--color-white);
    line-height: 1.2;
    margin: 0;
}

/* === Innovative Section === */
.section-innovative {
    height: 200vh;
}

.innovative__content {
    position: absolute;
    top: 120px;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0 var(--space-md);
}

.innovative__content .section__body {
    margin: 0 auto;
}

.innovative__content .btn-outline {
    margin-top: 40px;
}

.innovative__content .link-cta {
    margin-top: var(--space-md);
}

/* === Download Row === */
.download-row {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80vh;
    display: flex;
    align-items: center;
}

.download__content {
    flex: 1;
    padding-left: var(--page-margin);
    padding-right: var(--space-md);
    max-width: 50%;
}

.download__content .section__title {
    text-align: left;
    max-width: 697px;
}

.download__content .section__body {
    text-align: left;
    max-width: 572px;
    margin: 0 0 var(--space-2xl) 0;
}

/* === Carousel === */
.carousel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--space-xl);
    min-height: 750px;
    transform-style: preserve-3d;
}

.carousel__inputs {
    display: none;
}

.carousel__cards {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 700px;
}

.carousel__card {
    position: absolute;
    width: 60%;
    height: auto;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    margin: auto;
    transition: transform var(--transition-normal), opacity var(--transition-normal), filter var(--transition-normal);
    cursor: pointer;
    border-radius: var(--radius-xl);
    overflow: visible;
    background: rgba(255, 255, 255, 0.1);
    filter: blur(6px);
}

/* Active Card - Remove Blur */
#card-1:checked~.carousel__cards #store-1,
#card-2:checked~.carousel__cards #store-2,
#card-3:checked~.carousel__cards #store-3,
#card-4:checked~.carousel__cards #store-4 {
    filter: blur(0);
}

.carousel__card img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    object-fit: contain;
}

/* Carousel States - Card 1 Active */
#card-1:checked~.carousel__cards #store-1 {
    transform: translateX(0) translateY(-50%) scale(1);
    opacity: 1;
    z-index: 3;
}

#card-1:checked~.carousel__cards #store-2 {
    transform: translateX(40%) translateY(-50%) scale(0.7);
    opacity: 0.6;
    z-index: 2;
}

#card-1:checked~.carousel__cards #store-3 {
    transform: translateX(60%) translateY(-50%) scale(0.5);
    opacity: 0.3;
    z-index: 1;
}

#card-1:checked~.carousel__cards #store-4 {
    transform: translateX(75%) translateY(-50%) scale(0.35);
    opacity: 0.15;
    z-index: 0;
}

/* Carousel States - Card 2 Active */
#card-2:checked~.carousel__cards #store-1 {
    transform: translateX(-40%) translateY(-50%) scale(0.7);
    opacity: 0.6;
    z-index: 2;
}

#card-2:checked~.carousel__cards #store-2 {
    transform: translateX(0) translateY(-50%) scale(1);
    opacity: 1;
    z-index: 3;
}

#card-2:checked~.carousel__cards #store-3 {
    transform: translateX(40%) translateY(-50%) scale(0.7);
    opacity: 0.6;
    z-index: 2;
}

#card-2:checked~.carousel__cards #store-4 {
    transform: translateX(60%) translateY(-50%) scale(0.5);
    opacity: 0.3;
    z-index: 1;
}

/* Carousel States - Card 3 Active */
#card-3:checked~.carousel__cards #store-1 {
    transform: translateX(-60%) translateY(-50%) scale(0.5);
    opacity: 0.3;
    z-index: 1;
}

#card-3:checked~.carousel__cards #store-2 {
    transform: translateX(-40%) translateY(-50%) scale(0.7);
    opacity: 0.6;
    z-index: 2;
}

#card-3:checked~.carousel__cards #store-3 {
    transform: translateX(0) translateY(-50%) scale(1);
    opacity: 1;
    z-index: 3;
}

#card-3:checked~.carousel__cards #store-4 {
    transform: translateX(40%) translateY(-50%) scale(0.7);
    opacity: 0.6;
    z-index: 2;
}

/* Carousel States - Card 4 Active */
#card-4:checked~.carousel__cards #store-1 {
    transform: translateX(-75%) translateY(-50%) scale(0.35);
    opacity: 0.15;
    z-index: 0;
}

#card-4:checked~.carousel__cards #store-2 {
    transform: translateX(-60%) translateY(-50%) scale(0.5);
    opacity: 0.3;
    z-index: 1;
}

#card-4:checked~.carousel__cards #store-3 {
    transform: translateX(-40%) translateY(-50%) scale(0.7);
    opacity: 0.6;
    z-index: 2;
}

#card-4:checked~.carousel__cards #store-4 {
    transform: translateX(0) translateY(-50%) scale(1);
    opacity: 1;
    z-index: 3;
}

/* === Legal Title Section === */
.section-hero--legal {
    position: relative;
    height: 100vh;
    min-height: 800px;
    overflow: visible;
}

.section-hero--legal .section__bg {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    width: auto;
    height: 200vh;
    max-width: 100%;
    object-fit: contain;
    object-position: right top;
}

.section-hero--legal .legal-title {
    position: absolute;
    top: 50%;
    left: var(--page-margin);
    transform: translateY(-50%);
    z-index: 1;
    text-align: left !important;
}

.legal-title {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
    text-align: left;
}

.legal-title__date {
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: var(--font-regular);
    line-height: 32px;
    letter-spacing: 0.018px;
    color: var(--color-accent);
    margin: 0;
    text-align: left;
}

.legal-title__heading {
    font-family: var(--font-primary);
    font-size: 76px;
    font-weight: var(--font-medium);
    line-height: 75px;
    letter-spacing: 0.076px;
    color: var(--color-white);
    margin: 0;
    white-space: pre-wrap;
    text-align: left !important;
}

.legal-title__heading span {
    display: block;
    text-align: left !important;
}

/* === Legal Content Section === */
.section-legal-content {
    padding: var(--space-3xl) var(--page-margin);
    background: transparent;
    margin-top: 20vh;
}

.legal-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    max-width: 1200px;
}

.legal-block {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.legal-block__title {
    font-family: var(--font-primary);
    font-size: var(--text-xl);
    font-weight: var(--font-regular);
    line-height: 35px;
    letter-spacing: 0.032px;
    color: var(--color-white);
    margin: 0;
}

.legal-block__text {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    line-height: 22px;
    color: var(--color-white);
    margin: 0;
}

/* === Contact Page Overrides === */
.contact-page .section-hero--legal {
    height: 100vh;
    min-height: 500px;
}

.contact-page .section-hero--legal .legal-title {
    gap: var(--space-sm);
}

.contact-page .section-legal-content {
    margin-top: 0;
    padding-top: var(--space-lg);
    padding-bottom: var(--space-2xl);
}

.contact-page .contact-email-btn {
    align-self: flex-start;
    min-width: 314px;
    width: 314px;
    margin-top: var(--space-sm);
}

.legal-block__list {
    list-style: none;
    padding: 0;
    margin: var(--space-sm) 0 0 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.legal-block__list-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-xs);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    line-height: 22px;
    color: var(--color-white);
}

.legal-block__check {
    flex-shrink: 0;
    margin-top: -2px;
}

/* --- Legal List (simple bullets) --- */
.legal-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    margin-left: var(--space-md);
    list-style: disc;
}

.legal-list li {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    line-height: 1.6;
    color: var(--color-white);
}

.legal-list li::marker {
    color: var(--color-accent);
}

/* --- Legal Cards Grid --- */
.legal-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-top: var(--space-lg);
}

.legal-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-xl);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    text-decoration: none;
    transition: all 0.3s ease;
}

.legal-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-accent);
    transform: translateY(-4px);
}

.legal-card__icon {
    color: var(--color-accent);
}

.legal-card__title {
    font-family: var(--font-primary);
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-white);
    margin: 0;
}

.legal-card__description {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.5;
}

.legal-card__link {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--color-accent);
    margin-top: auto;
}

/* --- Numbered List --- */
.legal-numbered-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: legal-counter;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.legal-numbered-list__item {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    counter-increment: legal-counter;
}

.legal-numbered-list__title {
    font-family: var(--font-primary);
    font-size: var(--text-lg);
    font-weight: var(--font-regular);
    line-height: 22px;
    letter-spacing: 0.024px;
    color: var(--color-white);
}

.legal-numbered-list__title::before {
    content: counter(legal-counter) ". ";
    font-weight: var(--font-regular);
}

.legal-numbered-list__text {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    line-height: 22px;
    color: var(--color-white);
    margin: 0;
    padding-left: 36px;
}

/* === Footer Section === */
.section-footer {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: var(--space-xl);
    padding: var(--space-3xl) 0 0 0;
    overflow: hidden;
}

.section-footer .section__bg {
    top: auto;
    bottom: 0;
    object-position: bottom;
}

/* --- Install Banner --- */
.install-banner {
    margin: auto 140px var(--space-xl) 140px;
    padding: var(--space-xl) var(--space-3xl);
    border-radius: var(--radius-2xl);
    z-index: var(--z-above);
}

.install-banner__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}

.install-banner__text {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.install-banner__title {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-wider);
    line-height: 1;
    color: var(--color-white);
    margin: 0;
}

.install-banner__body {
    font-size: var(--text-xl);
    font-weight: var(--font-regular);
    letter-spacing: var(--tracking-normal);
    line-height: 1.1;
    color: var(--color-white);
    margin: 0;
}

.install-banner__body .rating {
    font-weight: var(--font-semibold);
    color: var(--color-accent);
}

.install-banner__body .star-icon {
    margin: 0 4px;
    vertical-align: middle;
    display: inline-block;
}

/* --- Footer Content --- */
.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: var(--space-xl) var(--page-margin);
    z-index: var(--z-above);
}

.footer__logo {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.footer__logo-img {
    height: 84px;
    width: auto;
}

.footer__tagline {
    font-size: var(--text-md);
    font-weight: var(--font-light);
    color: var(--color-white);
    letter-spacing: 0.02em;
    margin: 0;
}

.footer__social {
    display: flex;
    gap: var(--space-md);
}

/* --- Footer Bottom --- */
.footer__bottom {
    display: flex;
    align-items: center;
    padding: var(--space-xl) var(--page-margin);
    position: relative;
    z-index: var(--z-above);
}

.footer__contact-btn {
    display: inline-flex;
    min-width: auto;
    width: auto;
}

.footer__links {
    display: flex;
    gap: var(--space-xl);
    margin-left: 80px;
}

.footer__link {
    font-family: var(--font-secondary);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--color-white);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.footer__link:hover {
    opacity: 0.8;
}

.footer__copyright {
    margin-left: auto;
    font-size: var(--text-base);
    font-weight: var(--font-light);
    color: var(--color-accent);
    letter-spacing: var(--tracking-tight);
}

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-background);
    text-decoration: none;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(205, 235, 119, 0.4);
}

.back-to-top:active {
    transform: scale(0.95);
}

/* ============================================
   7. RESPONSIVE DESIGN
   ============================================ */

/* --- Large Desktop (max-width: 1400px) --- */
@media (max-width: 1400px) {
    :root {
        --page-margin: var(--page-margin-md);
    }

    .hero__content {
        left: var(--page-margin-md);
    }

    .download__content {
        padding-left: var(--page-margin-md);
    }

    .footer__content {
        padding: var(--space-xl) var(--page-margin-md);
    }

    .footer__bottom {
        padding: var(--space-xl) var(--page-margin-md);
    }

    .install-banner {
        margin-left: var(--page-margin-md);
        margin-right: var(--page-margin-md);
    }

    .install-banner__content {
        padding: 0 var(--space-sm);
    }

    .language-toggle {
        right: var(--page-margin-md);
    }
}

/* --- Tablet (max-width: 1200px) --- */
@media (max-width: 1200px) {
    :root {
        --text-3xl: 56px;
        --text-2xl: 36px;
        --text-xl: 24px;
    }

    .section-hero--legal .legal-title {
        top: 350px;
        left: var(--page-margin-sm);
    }

    .legal-title__heading {
        font-size: 56px;
        line-height: 60px;
    }

    .section-legal-content {
        padding: var(--space-2xl) var(--page-margin-sm);
    }

    .legal-block__title {
        font-size: var(--text-lg);
    }

    .legal-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .download-row {
        flex-direction: column;
        height: auto;
        padding: 60px 0;
    }

    .download__content {
        max-width: 100%;
        padding: 0 var(--page-margin-sm);
        text-align: center;
    }

    .download__content .section__title,
    .download__content .section__body {
        text-align: center;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .carousel {
        padding: var(--space-xl) var(--space-md);
    }

    .carousel__cards {
        max-width: 400px;
        height: 450px;
    }

    .footer__content {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xl);
        padding: 60px var(--page-margin-sm);
    }

    .footer__social {
        align-self: flex-start;
    }

    .footer__bottom {
        flex-wrap: wrap;
        gap: var(--space-md);
        padding: var(--space-xl) var(--page-margin-sm);
    }

    .footer__links {
        margin-left: 0;
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .footer__copyright {
        margin-left: 0;
        order: 4;
        width: 100%;
        text-align: center;
    }

    .footer__contact-btn {
        order: 1;
    }

    .install-banner {
        margin-left: var(--page-margin-sm);
        margin-right: var(--page-margin-sm);
        padding: var(--space-xl);
    }

    .install-banner__content {
        flex-direction: column;
        gap: 30px;
        padding: 0;
    }

    .install-banner__text {
        text-align: center;
    }

    .qr-code {
        width: 160px;
        height: 160px;
    }
}

/* --- Mobile (max-width: 768px) --- */
@media (max-width: 768px) {
    :root {
        --text-3xl: 40px;
        --text-2xl: 28px;
        --text-xl: 18px;
        --text-base: 16px;
    }

    .section-hero--legal .legal-title {
        top: 200px;
        left: var(--page-margin-xs);
    }

    .legal-title__heading {
        font-size: 40px;
        line-height: 48px;
    }

    .legal-title__date {
        font-size: 14px;
    }

    .section-legal-content {
        padding: var(--space-xl) var(--page-margin-xs);
    }

    .legal-block__title {
        font-size: var(--text-base);
        line-height: 28px;
    }

    .legal-block__text {
        font-size: var(--text-sm);
        line-height: 20px;
    }

    .legal-block__list-item {
        font-size: var(--text-sm);
        line-height: 20px;
    }

    .legal-cards {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .legal-card {
        padding: var(--space-lg);
    }

    .legal-card__icon svg {
        width: 36px;
        height: 36px;
    }

    .legal-card__title {
        font-size: var(--text-lg);
    }

    .legal-numbered-list__title {
        font-size: var(--text-base);
    }

    .legal-numbered-list__text {
        font-size: var(--text-sm);
        padding-left: 24px;
    }

    .language-toggle {
        top: var(--space-md);
        right: var(--space-md);
    }

    .hero__content {
        left: var(--space-md);
        right: var(--space-md);
        transform: translateY(-80%);
    }

    .hero__qr-block {
        flex-direction: column;
        text-align: center;
        max-width: 100%;
        padding: var(--space-md);
    }

    .hero__qr-code {
        width: 100px;
        height: 100px;
    }

    .hero__qr-title {
        font-size: var(--text-base);
    }

    .hero__qr-subtitle {
        font-size: var(--text-sm);
    }

    .btn-primary {
        font-size: var(--text-sm);
        min-width: 200px;
    }

    .btn-outline {
        font-size: var(--text-sm);
        min-width: 200px;
    }

    .download__content {
        padding: 0 var(--page-margin-xs);
    }

    .carousel {
        padding: var(--space-md);
        min-height: 400px;
    }

    .carousel__cards {
        max-width: 300px;
        height: 380px;
    }

    .carousel__card {
        width: 70%;
    }

    .footer__content {
        padding: var(--space-xl) var(--page-margin-xs);
    }

    .footer__logo-img {
        height: 60px;
    }

    .footer__tagline {
        font-size: var(--text-sm);
    }

    .social-btn {
        width: 56px;
        height: 56px;
    }

    .social-btn svg {
        width: 24px;
        height: 24px;
    }

    .footer__bottom {
        padding: 30px var(--page-margin-xs);
    }

    .footer__contact-btn {
        min-width: 100%;
    }

    .footer__links {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: center;
    }

    .footer__copyright {
        font-size: var(--text-xs);
    }

    .install-banner {
        margin-left: var(--page-margin-xs);
        margin-right: var(--page-margin-xs);
        padding: 30px var(--page-margin-xs);
        border-radius: var(--radius-md);
    }

    .install-banner::after {
        border-radius: var(--radius-md);
    }

    .install-banner__body .star-icon {
        width: 24px;
        height: 24px;
    }

    .qr-code {
        width: 120px;
        height: 120px;
    }
}
