/* Luxury Education Theme - Optimized for Mobile */

@layer base, components, utilities;

@layer base {
    :root {
        /* Premium Palette - Slate & Gold */
        --primary-hue: 220;
        --gold-hue: 45;

        /* OKLCH Colors */
        --color-primary: oklch(35% 0.1 260);
        --color-primary-light: oklch(55% 0.1 260);
        --color-accent: oklch(75% 0.14 60);
        --color-surface: oklch(99% 0.005 260);
        --color-surface-alt: oklch(96% 0.01 260);
        --color-text-main: oklch(20% 0.02 260);
        --color-text-muted: oklch(55% 0.02 260);
        --color-white: oklch(100% 0 0);

        /* Metrics */
        --max-width: 1400px;
        --radius-sm: 4px;
        --radius-md: 12px;
        --radius-lg: 24px;
        
        /* Effects */
        --shadow-subtle: 0 10px 40px -10px rgba(0,0,0,0.05);
        --shadow-hover: 0 20px 60px -15px rgba(0,0,0,0.1);
        --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    }

    *, *::before, *::after {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    html {
        scroll-behavior: smooth;
        font-size: 16px;
    }

    body {
        font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
        background-color: var(--color-surface);
        color: var(--color-text-main);
        line-height: 1.7;
        -webkit-font-smoothing: antialiased;
        overflow-x: hidden;
    }

    h1, h2, h3, h4, h5, h6 {
        font-weight: 700;
        line-height: 1.1;
        letter-spacing: -0.02em;
        color: var(--color-primary);
    }

    h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); }
    h2 { font-size: clamp(2rem, 7vw, 3.5rem); }
    h3 { font-size: clamp(1.5rem, 5vw, 2.5rem); }
    p { font-size: 1.125rem; color: var(--color-text-muted); }

    a { text-decoration: none; color: inherit; transition: color 0.3s ease; }
    img { max-width: 100%; display: block; height: auto; }

    .container {
        width: 100%;
        max-width: var(--max-width);
        margin: 0 auto;
        padding: 0 1.5rem;
    }

    section {
        padding: clamp(4rem, 10vw, 8rem) 0;
        position: relative;
    }
}

@layer components {
    /* Buttons */
    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 1rem 2rem;
        background-color: var(--color-primary);
        color: var(--color-white);
        border-radius: 100px;
        font-weight: 600;
        letter-spacing: -0.01em;
        transition: all 0.4s var(--ease-out-expo);
        border: none;
        cursor: pointer;
        font-size: 1rem;
        white-space: nowrap;
    }

    .btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 30px -5px rgba(50, 60, 100, 0.3);
    }

    .btn-secondary {
        background-color: transparent;
        color: var(--color-primary);
        border: 1px solid rgba(0,0,0,0.1);
    }
    
    .btn-secondary:hover {
        background-color: var(--color-surface-alt);
        border-color: var(--color-primary);
    }

    /* Hero Section */
    .hero {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        background: linear-gradient(180deg, var(--color-surface) 0%, #f0f4f8 100%);
        overflow: hidden;
    }

    #hero-canvas-container {
        position: absolute;
        inset: 0;
        opacity: 0.5;
        z-index: 0;
        mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    }

    .hero-content {
        position: relative;
        z-index: 2;
        max-width: 900px;
        margin: 0 auto;
    }

    .hero h2 {
        margin-bottom: 1.5rem;
        background: linear-gradient(135deg, var(--color-primary) 30%, #4a6fa5 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .hero-subtext {
        text-transform: uppercase;
        letter-spacing: 2px;
        font-size: 0.85rem;
        color: var(--color-accent);
        font-weight: 700;
        margin-bottom: 1rem;
    }

    .hero-desc {
        font-size: clamp(1.1rem, 3vw, 1.35rem);
        max-width: 600px;
        margin: 0 auto 2.5rem;
    }

    .hero-btns {
        display: flex;
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Badge */
    .badge {
        display: inline-block;
        padding: 0.5rem 1rem;
        background: rgba(220, 180, 50, 0.1);
        border: 1px solid var(--color-accent);
        color: var(--color-accent);
        border-radius: 100px;
        font-size: 0.8rem;
        font-weight: 700;
        margin-bottom: 1.5rem;
    }

    /* Cards */
    .card {
        background: var(--color-white);
        padding: clamp(1.5rem, 5vw, 3rem);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-subtle);
        border: 1px solid rgba(0,0,0,0.03);
        transition: all 0.4s var(--ease-out-expo);
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-hover);
        border-color: var(--color-accent);
    }

    /* Grids */
    .system-grid, .program-list, .facility-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    @media (max-width: 480px) {
        .system-grid, .program-list, .facility-list {
            grid-template-columns: 1fr;
        }
    }

    /* Facilities */
    .facility-item { padding: 0; overflow: hidden; }
    .facility-item img {
        width: 100%;
        height: 250px;
        object-fit: cover;
        transition: transform 0.6s var(--ease-out-expo);
    }
    .facility-item:hover img { transform: scale(1.05); }
    .facility-content { padding: 2rem; }

    /* Testimonials */
    .testimonials {
        background-color: var(--color-primary);
        color: var(--color-white);
        text-align: center;
        background-image: radial-gradient(circle at top right, rgba(255,255,255,0.05) 0%, transparent 40%);
    }
    .testimonials h3 { color: var(--color-white); margin-bottom: 3rem; }
    .testimonial-item p {
        font-size: clamp(1.25rem, 4vw, 2rem);
        font-family: serif;
        font-style: italic;
        margin-bottom: 1.5rem;
        color: rgba(255,255,255,0.95);
    }
    .testimonial-item span { color: var(--color-accent); font-weight: 600; font-size: 0.9rem; }

    /* Contact Card */
    .contact-card {
        background: var(--color-white);
        padding: clamp(2rem, 8vw, 4rem);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-hover);
        text-align: center;
    }

    .contact-details-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
        text-align: left;
        margin-top: 3rem;
    }

    .info-item {
        padding-bottom: 1.5rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    .info-item strong { display: block; color: var(--color-primary); margin-bottom: 0.5rem; }

    /* Modal */
    .modal {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.7);
        backdrop-filter: blur(10px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2000;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s var(--ease-out-expo);
    }
    .modal.active { opacity: 1; pointer-events: auto; }
    .modal-content {
        width: 95%;
        max-width: 900px;
        max-height: 90vh;
        overflow-y: auto;
        padding: clamp(2rem, 5vw, 4rem);
    }
    .modal-close {
        position: absolute;
        top: 1rem; right: 1rem;
        background: none; border: none; font-size: 2.5rem;
        cursor: pointer; color: var(--color-text-muted);
    }
    .reviews-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
        margin-top: 2rem;
    }
    .review-card { background: var(--color-surface-alt); padding: 1.5rem; border-radius: var(--radius-md); }

    /* Footer */
    .main-footer {
        background: #050a14;
        color: rgba(255,255,255,0.4);
        padding: 3rem 0;
        text-align: center;
    }
    .footer-links { margin-top: 1rem; }
    .footer-links a { margin: 0 0.75rem; font-size: 0.85rem; }

    /* Animations */
    [data-reveal] {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
    }
    [data-reveal].revealed { opacity: 1; transform: translateY(0); }
}
