/**
 * main.css — Ultra-Premium Design System v2.0
 * 🎨 Blue Steel (#6096BA) + Light Gray (#E7ECEF) Theme
 * ✦ Smooth Scroll · Gooey Toast · GPU-Accelerated
 */

/* ============================================
   0. Performance & GPU Hints
   ============================================ */
@layer base, layout, components, utilities, animations;

/* ============================================
   1. CSS Variables — Blue Steel Palette
   ============================================ */
:root {
    /* ── Primary: Blue Steel ── */
    --c-primary: #6096BA;
    --c-primary-dark: #274C77;
    --c-primary-darker: #1B3A5E;
    --c-primary-light: #A3CEF1;
    --c-primary-lighter: #C5E3F8;
    --c-primary-50: #F0F7FF;
    --c-primary-100: #E1EDFB;
    --c-primary-200: #C5E3F8;
    --c-primary-300: #A3CEF1;
    --c-primary-400: #7AAFE0;
    --c-primary-500: #6096BA;
    --c-primary-600: #274C77;
    --c-primary-700: #1B3A5E;
    --c-primary-800: #102840;
    --c-primary-900: #091929;

    /* ── Background: Light Blue-Gray ── */
    --c-pearl: #E7ECEF;
    --c-pearl-warm: #EDF1F4;
    --c-pearl-cool: #E2E8ED;

    /* ── Accent Colors ── */
    --c-secondary: #8B8C89;
    --c-secondary-dark: #6B6C69;
    --c-blue: #6096BA;
    --c-blue-dark: #274C77;
    --c-pink: #C4A0A5;
    --c-orange: #C9956B;
    --c-green: #7BA68E;
    --c-teal: #6BADA3;
    --c-red: #C47070;

    /* ── Neutral Scale ── */
    --c-gray-50: #FAFAFA;
    --c-gray-100: #F5F5F5;
    --c-gray-200: #E8EAED;
    --c-gray-300: #D0D4D8;
    --c-gray-400: #A8ADB3;
    --c-gray-500: #6B7280;
    --c-gray-600: #4B5563;
    --c-gray-700: #374151;
    --c-gray-800: #1F2937;
    --c-gray-900: #111827;

    /* ── Typography ── */
    --font-thai: 'Sarabun', 'Noto Sans Thai', sans-serif;
    --font-display: 'Sarabun', sans-serif;

    /* ── Layout ── */
    --header-height: 72px;

    /* ── Radius ── */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* ── Shadows (Blue-tinted) ── */
    --shadow-sm: 0 1px 3px rgba(39, 76, 119, 0.06);
    --shadow-md: 0 4px 12px rgba(39, 76, 119, 0.08), 0 2px 4px rgba(39, 76, 119, 0.04);
    --shadow-lg: 0 12px 24px rgba(39, 76, 119, 0.1), 0 4px 8px rgba(39, 76, 119, 0.06);
    --shadow-xl: 0 24px 48px rgba(39, 76, 119, 0.12), 0 8px 16px rgba(39, 76, 119, 0.06);
    --shadow-2xl: 0 32px 64px rgba(39, 76, 119, 0.16), 0 12px 24px rgba(39, 76, 119, 0.08);
    --shadow-glow: 0 0 24px rgba(96, 150, 186, 0.25);
    --shadow-inner: inset 0 2px 6px rgba(39, 76, 119, 0.06);

    /* ── Transitions (Spring-like) ── */
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-fast: 150ms var(--ease-out-expo);
    --transition-normal: 300ms var(--ease-out-expo);
    --transition-slow: 500ms var(--ease-out-expo);
    --transition-spring: 600ms var(--ease-spring);

    /* ── Smooth Scroll ── */
    --scroll-multiplier: 1;
}

/* ============================================
   2. Base — High-Performance Reset
   ============================================ */
@layer base {
    *, *::before, *::after {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    html {
        -webkit-text-size-adjust: 100%;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
        scroll-behavior: smooth;
    }

    /* Smooth Scroll — Lenis-compatible body */
    html.lenis, html.lenis body {
        height: auto;
    }
    .lenis.lenis-smooth {
        scroll-behavior: auto !important;
    }
    .lenis.lenis-smooth [data-lenis-prevent] {
        overscroll-behavior: contain;
    }
    .lenis.lenis-stopped {
        overflow: hidden;
    }

    body {
        font-family: var(--font-thai);
        line-height: 1.7;
        color: var(--c-gray-800);
        background-color: var(--c-pearl);
        overflow-x: hidden;
        position: relative;
    }

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

    a {
        color: var(--c-primary-dark);
        text-decoration: none;
        transition: color var(--transition-fast);
    }
    a:hover { color: var(--c-primary-darker); }

    h1, h2, h3, h4, h5, h6 {
        font-family: var(--font-display);
        font-weight: 700;
        line-height: 1.3;
        color: var(--c-gray-900);
    }

    ::selection {
        background: rgba(96, 150, 186, 0.25);
        color: var(--c-gray-900);
    }
}

/* ============================================
   3. SVG Filter — Gooey Effect (for Toast)
   ============================================ */
.gooey-filter-svg {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* ============================================
   4. HEADER — Glassmorphism + 3D Tilt
   ============================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(231, 236, 239, 0.85);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    border-bottom: 1px solid rgba(96, 150, 186, 0.15);
    transition: all 0.5s var(--ease-out-expo);
    will-change: transform, background;
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(231, 236, 239, 0.95);
    border-bottom-color: rgba(96, 150, 186, 0.25);
}

/* ===== Transparent Header (Hero pages) ===== */
.site-header.header-transparent {
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.site-header.header-transparent .site-logo { color: white; }
.site-header.header-transparent .nav-link { color: rgba(255,255,255,0.85); }
.site-header.header-transparent .nav-link:hover,
.site-header.header-transparent .nav-link.active {
    color: white;
    background-color: rgba(255,255,255,0.1);
}
.site-header.header-transparent .menu-toggle span { background-color: white; }
.site-header.header-transparent .btn-hero-auth {
    color: var(--c-gray-900);
    background: var(--c-primary-300);
}

/* Transparent → Scrolled */
.site-header.header-transparent.scrolled {
    background: rgba(231, 236, 239, 0.92);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    border-bottom-color: rgba(96, 150, 186, 0.2);
}
.site-header.header-transparent.scrolled .site-logo { color: var(--c-gray-900); }
.site-header.header-transparent.scrolled .nav-link { color: var(--c-gray-600); }
.site-header.header-transparent.scrolled .nav-link:hover,
.site-header.header-transparent.scrolled .nav-link.active {
    color: var(--c-primary-dark);
    background-color: rgba(96, 150, 186, 0.1);
}
.site-header.header-transparent.scrolled .menu-toggle span { background-color: var(--c-gray-700); }
.site-header.header-transparent.scrolled .btn-hero-auth {
    color: white;
    background: var(--c-primary);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
@media (min-width: 1280px) { .header-inner { padding: 0 3.5rem; } }

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--c-gray-900);
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.35s var(--ease-out-expo);
}
.site-logo:hover {
    opacity: 0.85;
    transform: scale(1.02);
}
.site-logo img {
    height: 40px;
    width: 40px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    transition: transform 0.4s var(--ease-spring);
}
.site-logo:hover img {
    transform: scale(1.05);
}

/* Auth Button — Sage Pill */
.btn-hero-auth {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-thai);
    color: white;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s var(--ease-spring);
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(96, 150, 186, 0.3);
}
.btn-hero-auth:hover {
    background: linear-gradient(135deg, var(--c-primary-dark), var(--c-primary-darker));
    color: white;
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 4px 16px rgba(96, 150, 186, 0.4);
}

/* ============================================
   4b. Desktop Nav — 3D Hover States
   ============================================ */
.nav-desktop { display: flex; align-items: center; gap: 0.125rem; }
.nav-item {
    position: relative;
    perspective: var(--perspective);
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--c-gray-600);
    border-radius: var(--radius-md);
    transition: all 0.35s var(--ease-out-expo);
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--c-primary), var(--c-primary-dark));
    border-radius: 2px;
    transition: all 0.35s var(--ease-out-expo);
    transform: translateX(-50%);
}
.nav-link:hover,
.nav-link.active {
    color: var(--c-primary-dark);
    background-color: rgba(96, 150, 186, 0.08);
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}
.nav-link .chevron-icon {
    font-size: 0.6rem;
    transition: transform 0.3s var(--ease-spring);
}
.nav-item:hover .chevron-icon,
.nav-item.open .chevron-icon { transform: rotate(180deg); }

.nav-auth { display: flex; align-items: center; gap: 0.5rem; margin-left: 0.75rem; }

/* Dropdown — Elevated Glass */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(96, 150, 186, 0.15);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transform-origin: top center;
    transition: all 0.35s var(--ease-out-expo);
    padding: 0.5rem;
    z-index: 1050;
    list-style: none;
    margin: 0;
}
.nav-item:hover > .dropdown-menu,
.nav-item.open > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.dropdown-menu .dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: var(--c-gray-700);
    border-radius: var(--radius-md);
    transition: all 0.25s var(--ease-out-expo);
    text-decoration: none;
}
.dropdown-menu .dropdown-link:hover {
    background-color: var(--c-primary-50);
    color: var(--c-primary-dark);
    transform: translateX(4px);
}
.dropdown-menu .dropdown-link i {
    width: 1.25rem;
    text-align: center;
    color: var(--c-gray-400);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}
.dropdown-menu .dropdown-link:hover i { color: var(--c-primary); }
.dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--c-gray-200), transparent);
    margin: 0.375rem 0.5rem;
    list-style: none;
}

/* ============================================
   5. Mobile Menu — Slide-in with 3D
   ============================================ */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px; height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 5px;
    z-index: 1100;
}
.menu-toggle span {
    display: block;
    width: 24px; height: 2px;
    background-color: var(--c-gray-700);
    border-radius: 2px;
    transition: all 0.4s var(--ease-spring);
    transform-origin: center;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(26, 26, 22, 0.45);
    backdrop-filter: blur(8px);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.4s var(--ease-out-expo);
    pointer-events: none;
}
.mobile-overlay.active { opacity: 1; pointer-events: auto; }

.nav-mobile {
    display: none;
    position: fixed;
    top: 0; right: 0;
    width: 320px; max-width: 85vw;
    height: 100vh;
    background: rgba(231, 236, 239, 0.97);
    backdrop-filter: blur(24px);
    z-index: 1050;
    overflow-y: auto;
    transform: translateX(calc(100% + 2rem));
    transition: transform 0.5s var(--ease-out-expo);
    padding: 1.5rem;
    padding-top: calc(var(--header-height) + 1rem);
    box-shadow: var(--shadow-2xl);
    pointer-events: none;
}
.nav-mobile.active { transform: translateX(0); pointer-events: auto; }

.nav-mobile .mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--c-gray-700);
    border-radius: var(--radius-md);
    transition: all 0.3s var(--ease-out-expo);
    text-decoration: none;
}
.nav-mobile .mobile-nav-link:hover,
.nav-mobile .mobile-nav-link.active {
    background-color: rgba(96, 150, 186, 0.1);
    color: var(--c-primary-dark);
    transform: translateX(6px);
}

.nav-mobile .mobile-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--c-gray-700);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
}
.nav-mobile .mobile-dropdown-btn:hover {
    background-color: rgba(96, 150, 186, 0.1);
    color: var(--c-primary-dark);
}
.nav-mobile .mobile-submenu {
    display: none;
    padding-left: 1rem;
    margin-top: 0.25rem;
}
.nav-mobile .mobile-submenu.open { display: block; }
.nav-mobile .mobile-submenu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--c-gray-600);
    border-radius: var(--radius-sm);
    transition: all 0.25s var(--ease-out-expo);
    text-decoration: none;
}
.nav-mobile .mobile-submenu a:hover {
    background-color: rgba(96, 150, 186, 0.08);
    color: var(--c-primary-dark);
    transform: translateX(4px);
}
.mobile-nav-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--c-gray-200), transparent);
    margin: 0.75rem 0;
}

@media (max-width: 1024px) {
    .nav-desktop, .nav-auth { display: none; }
    .menu-toggle { display: flex; }
    .nav-mobile, .mobile-overlay { display: block; }
}

/* ============================================
   6. HERO — Fullscreen
   ============================================ */
.hero-fullscreen {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-fullscreen .carousel-track {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
}
.carousel-slide {
    position: absolute; inset: 0;
    opacity: 0;
    transition: opacity 1.2s var(--ease-in-out);
    pointer-events: none;
}
.carousel-slide.active {
    opacity: 1;
    z-index: 5;
    pointer-events: auto;
}
.carousel-slide .slide-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 10s var(--ease-smooth);
    will-change: transform;
}
.carousel-slide.active .slide-bg {
    transform: scale(1.06);
}

.carousel-slide .slide-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(
        105deg,
        rgba(26, 26, 22, 0.55) 0%,
        rgba(26, 26, 22, 0.3) 35%,
        rgba(26, 26, 22, 0.05) 70%,
        transparent 100%
    );
}

/* Slide Content — Left Aligned */
.slide-content-left {
    position: absolute; inset: 0; z-index: 10;
    display: flex; align-items: center;
    padding: 0 2rem;
    padding-top: var(--header-height);
}
.slide-content-inner {
    max-width: 560px; width: 100%;
}
.carousel-slide .slide-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.08;
    margin-bottom: 1rem;
    color: white;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}
.carousel-slide .slide-desc {
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
    max-width: 440px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.65;
    font-weight: 400;
    margin-bottom: 0;
}

/* Slide Buttons — Outline Pill */
.slide-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.btn-slide-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-thai);
    color: white;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
    text-decoration: none;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    perspective: var(--perspective);
}
.btn-slide-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
    color: white;
    transform: translateY(-2px) translateZ(8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    .slide-content-left { padding: 0 4rem; }
}
@media (min-width: 1280px) {
    .slide-content-left { padding: 0 6rem; }
    .slide-content-inner { max-width: 620px; }
}
@media (max-width: 480px) {
    .slide-actions { flex-direction: column; }
    .btn-slide-outline { width: 100%; justify-content: center; }
}

/* Carousel Arrows — Glass Circle */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 48px; height: 48px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    transition: all 0.35s var(--ease-spring);
}
.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-50%) scale(1.08);
}
.carousel-arrow-prev { left: 1.25rem; }
.carousel-arrow-next { right: 1.25rem; }
@media (min-width: 768px) {
    .carousel-arrow { width: 52px; height: 52px; }
    .carousel-arrow-prev { left: 1.5rem; }
    .carousel-arrow-next { right: 1.5rem; }
}

/* Carousel Pills */
.carousel-pills {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 20;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    padding: 5px 8px;
    border-radius: var(--radius-full);
}
.carousel-pill {
    width: 8px; height: 8px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.5s var(--ease-spring);
    padding: 0;
}
.carousel-pill.active {
    width: 28px;
    background: white;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

/* ============================================
   7. Cards & Sections — 3D Micro-interactions
   ============================================ */
.section-padding { padding: 5rem 0; }
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
    color: white;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(96, 150, 186, 0.25);
}
.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--c-primary-darker) 0%, var(--c-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}
.section-subtitle {
    font-size: 1.05rem;
    color: var(--c-gray-500);
    max-width: 640px;
    margin: 0 auto;
}

/* Card */
.card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(96, 150, 186, 0.12);
    box-shadow: var(--shadow-sm);
    transition: all 0.35s var(--ease-out-expo);
    overflow: hidden;
}
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: rgba(96, 150, 186, 0.2);
}
.card-body { padding: 1.5rem; }
.card-icon {
    width: 64px; height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1rem;
    transition: transform 0.35s var(--ease-spring);
}
.card:hover .card-icon {
    transform: scale(1.1);
}
.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--c-gray-900);
    margin-bottom: 0.5rem;
}

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 1024px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .features-grid { grid-template-columns: 1fr; } }

/* ============================================
   8. Level Cards — 3D Lift + Sage/Blue Theme
   ============================================ */
.levels-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
@media (max-width: 768px) { .levels-grid { grid-template-columns: 1fr; } }

.level-card {
    position: relative;
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.35s var(--ease-out-expo);
}
.level-card:hover {
    box-shadow: var(--shadow-2xl);
    transform: translateY(-6px);
}
.level-card .card-top {
    position: relative;
    padding: 2rem 1.5rem 1.5rem;
    color: white;
}
.level-card-1 .card-top {
    background: linear-gradient(135deg, var(--c-primary-light) 0%, var(--c-primary) 50%, var(--c-primary-dark) 100%);
}
.level-card-2 .card-top {
    background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-blue-dark) 50%, #2B6A93 100%);
}

.level-badge {
    position: absolute;
    top: 1rem; right: 1rem;
    width: 64px; height: 64px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    transition: transform 0.5s var(--ease-spring);
}
.level-card:hover .level-badge {
    transform: scale(1.08);
}
.level-badge .badge-label { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.5px; }
.level-badge .badge-num { font-size: 1.5rem; line-height: 1; }
.level-card .card-top .stars { font-size: 1.25rem; margin-bottom: 0.375rem; }
.level-card .card-top h3 { font-size: 1.5rem; font-weight: 700; color: white; margin-bottom: 0.25rem; }
.level-card .card-top p { font-size: 0.875rem; opacity: 0.9; }
.level-card .card-bottom { padding: 1.5rem; }

/* Progress */
.progress-section { margin-bottom: 1.5rem; }
.progress-header { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--c-gray-700); }
.progress-track { height: 8px; background: var(--c-gray-200); border-radius: var(--radius-full); overflow: hidden; }
.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 1.8s var(--ease-spring);
    width: 0;
    position: relative;
}
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 20px; height: 100%;
    background: rgba(255, 255, 255, 0.4);
    border-radius: inherit;
    filter: blur(4px);
}
.level-card-1 .progress-fill { background: linear-gradient(90deg, var(--c-primary-light), var(--c-primary-dark)); }
.level-card-2 .progress-fill { background: linear-gradient(90deg, var(--c-blue), var(--c-blue-dark)); }

.features-checklist { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.features-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.375rem 0;
    font-size: 0.9rem;
    color: var(--c-gray-600);
}
.level-card-1 .features-checklist li i { color: var(--c-primary-dark); }
.level-card-2 .features-checklist li i { color: var(--c-blue); }

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    background: var(--c-gray-50);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}
.info-grid .info-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.375rem; }
.info-grid .info-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.4s var(--ease-spring);
}
.info-grid .info-item:hover .info-icon {
    transform: scale(1.12) rotateZ(8deg);
}
.level-card-1 .info-icon { background: rgba(96, 150, 186, 0.12); color: var(--c-primary-dark); }
.level-card-2 .info-icon { background: rgba(91, 143, 185, 0.12); color: var(--c-blue); }
.info-grid .info-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--c-gray-500); }
.info-grid .info-value { font-size: 0.95rem; font-weight: 700; color: var(--c-gray-900); }

/* ============================================
   9. Buttons — 3D Press Effect
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-thai);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s var(--ease-spring);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.5;
    position: relative;
}
.btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}
.btn:active { transform: scale(0.96) translateY(1px); }

.btn-primary {
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(96, 150, 186, 0.3);
}
.btn-primary::before {
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
    filter: blur(12px);
}
.btn-primary:hover {
    box-shadow: 0 8px 24px rgba(96, 150, 186, 0.4);
    transform: translateY(-2px);
    color: white;
}
.btn-primary:hover::before { opacity: 0.4; }

.btn-secondary {
    background: white;
    color: var(--c-gray-700);
    border-color: var(--c-gray-300);
}
.btn-secondary:hover {
    background: var(--c-pearl);
    border-color: var(--c-primary-300);
    color: var(--c-primary-dark);
    transform: translateY(-1px);
}

.btn-outline-primary {
    background: transparent;
    color: var(--c-primary-dark);
    border-color: var(--c-primary);
}
.btn-outline-primary:hover {
    background: var(--c-primary);
    color: white;
    transform: translateY(-1px);
}

.btn-success { background: var(--c-green); color: white; }
.btn-success:hover { background: #5E9478; color: white; transform: translateY(-1px); }
.btn-danger { background: var(--c-red); color: white; }
.btn-danger:hover { background: #B05A5A; color: white; transform: translateY(-1px); }
.btn-warning { background: var(--c-orange); color: white; }
.btn-warning:hover { background: #B57F56; color: white; transform: translateY(-1px); }

.btn-level-1 {
    background: linear-gradient(135deg, var(--c-primary-light), var(--c-primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(96, 150, 186, 0.3);
}
.btn-level-1:hover { box-shadow: 0 8px 20px rgba(96, 150, 186, 0.45); transform: translateY(-2px); color: white; }
.btn-level-2 {
    background: linear-gradient(135deg, var(--c-blue), var(--c-blue-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(91, 143, 185, 0.3);
}
.btn-level-2:hover { box-shadow: 0 8px 20px rgba(91, 143, 185, 0.45); transform: translateY(-2px); color: white; }

.btn-lg { padding: 0.8rem 1.75rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-full); }

/* ============================================
   10. Modals — 3D Scale-In
   ============================================ */
.modal-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(26, 26, 22, 0.45);
    backdrop-filter: blur(8px);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.4s var(--ease-out-expo);
}
.modal-backdrop.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}
.modal-dialog {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    width: 95%; max-width: 560px; max-height: 90vh;
    overflow: hidden;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s var(--ease-out-expo);
    display: flex;
    flex-direction: column;
}
.modal-backdrop.show .modal-dialog {
    transform: scale(1) translateY(0);
}
.modal-dialog.modal-lg { max-width: 800px; }
.modal-dialog.modal-sm { max-width: 400px; }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(96, 150, 186, 0.12);
}
.modal-header h3 { font-size: 1.15rem; font-weight: 700; margin: 0; }
.modal-close {
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--c-gray-100);
    border-radius: var(--radius-full);
    cursor: pointer;
    color: var(--c-gray-500);
    font-size: 1.125rem;
    transition: all 0.3s var(--ease-spring);
}
.modal-close:hover {
    background: var(--c-gray-200);
    color: var(--c-gray-800);
    transform: rotate(90deg);
}
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(96, 150, 186, 0.1);
    background: var(--c-pearl-warm);
}

/* ============================================
   11. Alerts / Gooey Toast — TOP-CENTER
   ============================================ */
.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    border: 1px solid;
    animation: alertSlideDown 0.4s var(--ease-spring);
}
@keyframes alertSlideDown {
    from { opacity: 0; transform: translateY(-16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.alert-success { background: #F0FDF4; color: #15803D; border-color: #BBF7D0; }
.alert-danger { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }
.alert-warning { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.alert-info { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.alert-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s var(--ease-spring);
    color: inherit;
    line-height: 1;
}
.alert-close:hover { opacity: 1; transform: rotate(90deg); }

/* ──── Toast Container — Dynamic Island Glass (TOP-CENTER) ──── */
.toast-container {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    width: max-content;
    max-width: calc(100vw - 32px);
}
.toast-container > * {
    pointer-events: auto;
}

/* Individual Toast — Dynamic Island Glass */
.toast {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px  rgba(0, 0, 0, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    padding: 11px 14px 11px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    max-width: 400px;
    animation: gooeyToastIn 0.48s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
    overflow: hidden;
}

.toast::before { display: none; }

/* Type-accented border glow */
.toast.toast-success {
    border-color: rgba(123, 166, 142, 0.45);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(123, 166, 142, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.toast.toast-error {
    border-color: rgba(196, 112, 112, 0.40);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(196, 112, 112, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.toast.toast-warning {
    border-color: rgba(201, 149, 107, 0.42);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(201, 149, 107, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.toast.toast-info {
    border-color: rgba(91, 143, 185, 0.40);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(91, 143, 185, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.toast-icon {
    flex-shrink: 0;
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.toast.toast-success .toast-icon { background: rgba(123, 166, 142, 0.14); color: #2E7D52; }
.toast.toast-error   .toast-icon { background: rgba(196, 112, 112, 0.12); color: #B83A3A; }
.toast.toast-warning .toast-icon { background: rgba(201, 149, 107, 0.13); color: #9E6020; }
.toast.toast-info    .toast-icon { background: rgba( 91, 143, 185, 0.13); color: #2E6A96; }

/* Slim progress bar */
.toast-progress {
    position: absolute;
    bottom: 0; left: 0;
    height: 2px;
    opacity: 0.65;
    border-radius: 0 0 20px 20px;
    animation: toastCountdown linear forwards;
}
.toast.toast-success .toast-progress { background: #4A9668; }
.toast.toast-error   .toast-progress { background: #C44A4A; }
.toast.toast-warning .toast-progress { background: #B07030; }
.toast.toast-info    .toast-progress { background: #3A7BAD; }

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.28);
    font-size: 1rem;
    padding: 0.125rem;
    border-radius: 4px;
    transition: color 0.2s ease;
    line-height: 1;
}
.toast-close:hover { color: rgba(0, 0, 0, 0.65); }

@keyframes gooeyToastIn {
    0%   { opacity: 0; transform: translateY(-18px) scale(0.88); filter: blur(3px); }
    55%  { opacity: 1; transform: translateY(5px)   scale(1.01); filter: blur(0);   }
    78%  { transform: translateY(-2px) scale(0.997); }
    100% { opacity: 1; transform: translateY(0)     scale(1);    filter: blur(0);   }
}
@keyframes gooeyToastOut {
    0%   { opacity: 1; transform: translateY(0)     scale(1);    filter: blur(0);   }
    100% { opacity: 0; transform: translateY(-14px) scale(0.88); filter: blur(4px); }
}
@keyframes toastCountdown {
    from { width: 100%; }
    to { width: 0%; }
}

/* ============================================
   12. Forms — Sage Focus Ring
   ============================================ */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--c-gray-700);
    margin-bottom: 0.375rem;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem 0.875rem;
    font-size: 0.9rem;
    font-family: var(--font-thai);
    color: var(--c-gray-900);
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid var(--c-gray-300);
    border-radius: var(--radius-md);
    transition: all 0.3s var(--ease-out-expo);
    outline: none;
    line-height: 1.5; 
    min-height: 44px;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(96, 150, 186, 0.2), var(--shadow-sm);
    background: white;
}
.form-input.error, .form-select.error, .form-textarea.error {
    border-color: var(--c-red);
    box-shadow: 0 0 0 3px rgba(196, 112, 112, 0.15);
}
.form-hint { font-size: 0.8rem; color: var(--c-gray-500); margin-top: 0.25rem; }
.form-error-msg { font-size: 0.8rem; color: var(--c-red); margin-top: 0.25rem; }
.form-textarea { resize: vertical; min-height: 100px; }

/* ============================================
   13. Tables — Sage Accent
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(96, 150, 186, 0.15);
    background: white;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table thead { background: var(--c-primary-50); }
.data-table th {
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--c-gray-700);
    text-align: left;
    border-bottom: 2px solid var(--c-primary-200);
    white-space: nowrap;
}
.data-table td {
    padding: 0.75rem 1rem;
    color: var(--c-gray-600);
    border-bottom: 1px solid var(--c-gray-100);
    transition: background 0.2s ease;
}
.data-table tbody tr:hover { background: var(--c-primary-50); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ============================================
   14. Badges — Soft Pill
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
    transition: transform 0.25s var(--ease-spring);
}
.badge:hover { transform: scale(1.05); }
.badge-success { background: #DCFCE7; color: #15803D; }
.badge-danger { background: #FEE2E2; color: #B91C1C; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-info { background: #DBEAFE; color: #1D4ED8; }
.badge-secondary { background: var(--c-gray-200); color: var(--c-gray-600); }
.badge-primary { background: var(--c-primary-100); color: var(--c-primary-800); }

/* ============================================
   15. Footer — Dark Sage
   ============================================ */
.site-footer {
    background-image: url('../../api/placeholder/footer-bg.jpg');
    background-size: cover;
    background-position: center top;
    color: var(--c-gray-400);
    margin-top: 4rem;
    position: relative;
}
.site-footer::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(15,15,12,.88) 0%, rgba(10,10,8,.95) 100%);
    z-index: 0;
}
.site-footer > * { position: relative; z-index: 1; }
.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--c-primary-400), transparent);
}
.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2.5rem;
    padding: 3.5rem 0;
}
.footer-section h3 {
    color: var(--c-pearl);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}
.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 32px; height: 3px;
    background: linear-gradient(90deg, var(--c-primary), var(--c-primary-dark));
    border-radius: 2px;
}
.footer-section p { font-size: 0.875rem; line-height: 1.7; margin-bottom: 1rem; }
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section ul li { margin-bottom: 0.5rem; }
.footer-section ul li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--c-gray-400);
    transition: all 0.3s var(--ease-out-expo);
    text-decoration: none;
}
.footer-section ul li a:hover {
    color: var(--c-primary-300);
    transform: translateX(4px);
}
.footer-social {
    display: flex;
    gap: 0.625rem;
    margin-top: 1rem;
}
.footer-social a {
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: rgba(96, 150, 186, 0.1);
    color: var(--c-gray-400);
    font-size: 0.875rem;
    transition: all 0.35s var(--ease-spring);
    text-decoration: none;
}
.footer-social a:hover {
    background: var(--c-primary);
    color: white;
    transform: translateY(-3px) rotateZ(5deg);
    box-shadow: 0 4px 12px rgba(96, 150, 186, 0.3);
}
.footer-contact-item { display: flex; gap: 0.75rem; margin-bottom: 0.75rem; font-size: 0.875rem; }
.footer-contact-item i { width: 1rem; text-align: center; margin-top: 0.25rem; color: var(--c-primary-400); }
.footer-bottom {
    border-top: 1px solid rgba(96, 150, 186, 0.1);
    padding: 1.25rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
}
@media (max-width: 1024px) { .footer-main { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
    .footer-main { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* ============================================
   16. Utilities
   ============================================ */
.container-custom { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

.text-gradient-primary {
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-darker));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Scroll-triggered Animations ── */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

.fade-in-3d {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.fade-in-3d.visible { opacity: 1; transform: translateY(0); }

.scale-in {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-spring);
}
.scale-in.visible { opacity: 1; transform: scale(1); }

.slide-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}
.slide-in-left.visible { opacity: 1; transform: translateX(0); }

.slide-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}
.slide-in-right.visible { opacity: 1; transform: translateX(0); }

/* Staggered delays */
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }
.stagger-5 { transition-delay: 0.25s; }
.stagger-6 { transition-delay: 0.3s; }

/* ── Continuous Animations ── */

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--c-gray-200) 25%, var(--c-pearl) 50%, var(--c-gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

/* ── Magnetic Hover (for interactive elements) ── */
.magnetic-hover {
    transition: transform 0.3s var(--ease-out-expo);
}

/* ── Tilt Container ── */
.tilt-3d {
    will-change: transform;
}

/* ============================================
   17. Back to Top — 3D Floating Button
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 1.5rem; right: 1.5rem;
    z-index: 999;
    width: 48px; height: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 6px 20px rgba(96, 150, 186, 0.35);
    transition: all 0.4s var(--ease-spring);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.back-to-top:hover {
    background: linear-gradient(135deg, var(--c-primary-dark), var(--c-primary-darker));
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 10px 28px rgba(96, 150, 186, 0.45);
}

/* ============================================
   18. Scrollbar — Sage Theme
   ============================================ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--c-pearl); }
::-webkit-scrollbar-thumb {
    background: var(--c-gray-300);
    border-radius: 4px;
    transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover { background: var(--c-primary); }

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--c-gray-300) var(--c-pearl);
}

/* ============================================
   19. Print
   ============================================ */
@media print {
    .site-header, .site-footer, .back-to-top, .carousel-arrow,
    .carousel-pills, .menu-toggle, .toast-container { display: none !important; }
    body { background: white; color: black; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ============================================
   20. CTA Section — Sage Gradient
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 50%, var(--c-primary-darker) 100%);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}
.cta-section h2 {
    color: white;
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 0.75rem;
    position: relative; z-index: 1;
}
.cta-section p {
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto 1.5rem;
    position: relative; z-index: 1;
}
.cta-section .btn { position: relative; z-index: 1; }

/* ============================================
   21. Stats — 3D Hover Cards
   ============================================ */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(96, 150, 186, 0.1);
    box-shadow: var(--shadow-sm);
    transition: all 0.35s var(--ease-out-expo);
}
.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: rgba(96, 150, 186, 0.2);
}
.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    transition: transform 0.35s var(--ease-spring);
}
.stat-card:hover .stat-icon {
    transform: scale(1.15);
}
.stat-value { font-size: 2rem; font-weight: 800; color: var(--c-gray-900); margin-bottom: 0.25rem; }
.stat-label { font-size: 0.85rem; color: var(--c-gray-500); }
@media (max-width: 768px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats-grid { grid-template-columns: 1fr; } }

/* ============================================
   22. About — Sage Border
   ============================================ */
.about-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(96, 150, 186, 0.12);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--c-primary);
    transition: all 0.4s var(--ease-out-expo);
}
.about-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.about-card p {
    text-align: justify;
    line-height: 1.9;
    color: var(--c-gray-600);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.about-card p:last-child { margin-bottom: 0; }

/* ============================================
   23. Bottom CTA — Sage Gradient
   ============================================ */
.bottom-cta {
    background: linear-gradient(135deg, var(--c-primary-100) 0%, var(--c-pearl-warm) 50%, var(--c-primary-50) 100%);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    text-align: center;
    margin-top: 3rem;
    border: 1px solid var(--c-primary-200);
}
.bottom-cta h3 { font-size: 1.4rem; margin-bottom: 0.5rem; color: var(--c-primary-900); }
.bottom-cta p { color: var(--c-gray-600); margin-bottom: 1.25rem; }
.cta-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ============================================
   24. Main Content
   ============================================ */
.main-content { padding-top: var(--header-height); }
.main-content.has-hero { padding-top: 0; }

/* ============================================
   25. Reduced Motion — Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .fade-in, .fade-in-3d, .scale-in, .slide-in-left, .slide-in-right {
        opacity: 1 !important;
        transform: none !important;
    }
}
