:root {
    --bg: #faf7f2;
    --panel: #fff9f2;
    --text: #2a2a2a;
    --muted: #6a5f58;
    --brand: #7a0019; /* maroon */
    --brand-strong: #9b0026; /* crimson */
    --gold: #c99a2b; /* warm gold */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #faf7f2 0%, #f5f1e8 50%, #f0ebe0 100%);
    background-attachment: fixed;
    min-height: 100vh;
}
/* Accessibility helpers */
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; left: 12px; top: 12px; width: auto; height: auto; padding: 8px 12px; z-index: 1000; background: var(--gold); color: #3a2a00; border-radius: 8px; outline: 2px solid #3a2a00; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(135deg, var(--gold) 0%, #d4a429 50%, #b98a1f 100%);
    backdrop-filter: blur(12px);
    border-bottom: 3px solid var(--brand);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    position: relative;
}
.logo { text-decoration: none; color: inherit; }
.logo img {
    max-height: 120px;
    width: auto;
}
.logo-placeholder {
    height: 84px; /* room for a large horizontal logo */
    display: flex; align-items: center; padding: 0 14px;
    border: 2px dashed var(--gold);
    border-radius: 10px;
    color: var(--brand);
    font-weight: 800; letter-spacing: 0.5px;
    background: linear-gradient(0deg, #fffdf8, #fffaf0);
}

/* Mobile Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav a { 
    color: var(--brand); 
    text-decoration: none; 
    font-weight: 700; 
    transition: color 0.2s ease;
}

.nav a:hover { 
    color: var(--brand-strong); 
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--brand);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile navigation styles */
@media (max-width: 768px) {
    .site-header .container {
        padding: 10px 0;
    }
    
    .logo img {
        max-height: 50px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--gold);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        border-top: 2px solid var(--brand);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav a {
        padding: 10px 0;
        text-align: center;
        font-size: 18px;
        border-bottom: 1px solid rgba(122, 0, 25, 0.1);
        width: 100%;
    }
    
    .nav a:last-child {
        border-bottom: none;
    }
    
    .nav .btn {
        margin: 10px 0 0 0;
        padding: 12px 20px;
        font-size: 16px;
    }
}

/* Additional mobile improvements */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    .hero {
        padding: 60px 0 40px;
    }
    
    .hero h1 {
        font-size: 28px;
        margin-bottom: 8px;
    }
    
    .hero h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    .hero p {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .about-text {
        font-size: 16px;
        line-height: 1.6;
    }
    
    .about-text h2 {
        font-size: 24px;
        margin-bottom: 16px;
    }
    
    .teacher-photo-in-about img {
        width: 100%;
        max-width: 100%;
        margin-top: 20px;
    }
    
    .card {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .card h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .card p {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .contact-form .row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .contact-form input, 
    .contact-form textarea, 
    .contact-form select {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .contact-form .btn {
        font-size: 16px;
        padding: 14px 20px;
        width: 100%;
    }
    
    .footer-socials {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .site-footer .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .container {
        width: 98%;
        padding: 0 5px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero h2 {
        font-size: 18px;
    }
    
    .hero p {
        font-size: 14px;
    }
    
    .about-text h2 {
        font-size: 20px;
    }
    
    .card h3 {
        font-size: 16px;
    }
    
    .card p {
        font-size: 13px;
    }
    
    .gallery {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid var(--gold);
    color: var(--brand);
    text-decoration: none;
    background: linear-gradient(135deg, #fffef8 0%, #faf7f2 100%);
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn.primary {
    background: linear-gradient(135deg, var(--gold) 0%, #d4a429 50%, #b98a1f 100%);
    border: 1px solid #b98a1f;
    color: #3a2a00;
    box-shadow: 0 4px 15px rgba(201, 154, 43, 0.3);
}

.btn:hover { 
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn.primary:hover {
    box-shadow: 0 6px 25px rgba(201, 154, 43, 0.4);
}

.hero {
    padding: 120px 0 80px;
    text-align: center;
    background: linear-gradient(135deg, rgba(250, 247, 242, 0.9) 0%, rgba(245, 241, 232, 0.8) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="music" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23c99a2b" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23music)"/></svg>');
    opacity: 0.3;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}
.hero h1 {
    font-size: clamp(32px, 5vw, 56px);
    margin: 0 0 16px;
    color: var(--brand);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease;
}

.hero h2 {
    font-size: clamp(20px, 3vw, 32px);
    margin: 0 0 20px;
    color: var(--brand-strong);
    font-weight: 600;
    letter-spacing: -0.01em;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero p { 
    color: var(--muted); 
    margin: 0 0 32px; 
    font-size: clamp(18px, 2.2vw, 24px); 
    line-height: 1.6;
    animation: fadeInUp 0.8s ease 0.4s both;
}
.actions .btn { margin: 0 8px; }

.section { padding: 64px 0; }
.section.alt { background: #fffaf1; }

.two-col { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 28px; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }

.about-text { font-size: 18px; line-height: 1.75; }
.about-text h2 { font-size: 28px; margin-top: 0; color: var(--brand); }
.teacher-photo-in-about { display: flex; justify-content: center; }
.teacher-photo-in-about img {
    width: 80%;
    max-width: 480px;
    height: auto;
    border-radius: 14px;
    border: 1px solid var(--gold);
}
@media (max-width: 820px) {
    .teacher-photo-in-about img { width: 100%; max-width: 100%; }
}

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

.card {
    background: linear-gradient(135deg, var(--panel) 0%, #fffef8 100%);
    border: 1px solid var(--gold);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--brand) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card:hover::before {
    opacity: 1;
}
.card h3 { margin-top: 0; }
.card ul { margin: 0; padding-left: 18px; color: var(--muted); }

.teacher-photo img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--gold); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } }
.gallery img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--gold); }

.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 700px) { .video-grid { grid-template-columns: 1fr; } }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--gold); border-radius: 10px; }
/* Focus styles */
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

.contact-form {
    display: grid;
    gap: 12px;
}
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .contact-form .row { grid-template-columns: 1fr; } }
.contact-form input, .contact-form textarea, .contact-form select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #d8c38a; /* visible boundary (soft gold) */
    color: var(--text);
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #93a0c9; }

/* Larger send button text on forms */
.contact-form .btn { font-size: 18px; padding: 12px 18px; }

.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(155, 0, 38, 0.12);
    outline: none;
}

.socials { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.socials a { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); text-decoration: none; font-weight: 600; }
.socials a:hover { color: var(--brand-strong); }

.site-footer { 
    border-top: 3px solid var(--gold); 
    background: linear-gradient(135deg, #fffdf8 0%, #f5f1e8 100%);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.site-footer .container { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 24px 0; 
    gap: 14px; 
}
.site-footer .small { color: var(--brand); text-decoration: none; font-weight: 700; }

/* Footer socials */
.footer-socials { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-socials a { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); text-decoration: none; font-weight: 600; }
.footer-socials a:hover { color: var(--brand-strong); }

/* Feature list spacing */
.features { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 8px 0; min-height: 220px; }

/* Fullscreen Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    animation: zoomIn 0.3s ease;
}

.image-modal img {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: -40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
}

.image-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}


/* Clickable images */
.clickable-image {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clickable-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideInLeft {
    from { 
        opacity: 0; 
        transform: translateX(-30px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

@keyframes slideInRight {
    from { 
        opacity: 0; 
        transform: translateX(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* Scroll animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #faf7f2 0%, #f5f1e8 50%, #f0ebe0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-logo {
    width: 200px;
    height: auto;
    max-height: 200px;
    margin-bottom: 30px;
    animation: pulse 2s ease-in-out infinite;
    object-fit: contain;
}

/* Responsive loading logo */
@media (max-width: 768px) {
    .loading-logo {
        width: 120px;
        max-height: 120px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .loading-logo {
        width: 100px;
        max-height: 100px;
        margin-bottom: 15px;
    }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gold);
    border-top: 4px solid var(--brand);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: var(--brand);
    font-size: 18px;
    font-weight: 600;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--gold) 0%, #d4a429 100%);
    border: none;
    border-radius: 50%;
    color: #3a2a00;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(201, 154, 43, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 154, 43, 0.4);
}

/* Image Loading Skeleton */
.image-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Page border animation */
.page-border {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.page-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    background: linear-gradient(45deg, var(--gold), var(--brand), var(--gold)) border-box;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Touch-friendly interactions */
.touch-hover {
    transition: all 0.2s ease;
}

.touch-hover:active {
    transform: scale(0.98);
}

/* Mobile swipe gestures for gallery */
.gallery {
    touch-action: pan-x;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.gallery img {
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
    /* Reduce animations for better performance */
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.2s !important;
    }
    
    /* Disable expensive CSS properties on mobile */
    .site-header {
        will-change: auto;
    }
    
    .card {
        will-change: auto;
    }
    
    .btn {
        will-change: auto;
    }
    
    /* Optimize image rendering */
    img {
        image-rendering: optimizeSpeed;
    }
    
    /* Reduce repaints */
    .clickable-image:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* Disable complex animations on mobile */
    .card:hover {
        transform: none;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }
    
    .card::before {
        display: none;
    }
    
    .btn::before {
        display: none;
    }
    
    .btn:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(201, 154, 43, 0.3);
    }
    
    /* Simplify loading screen */
    .loading-logo {
        animation: none;
    }
    
    .loading-spinner {
        animation: spin 2s linear infinite;
    }
    
    /* Reduce blur effects */
    .site-header {
        backdrop-filter: none;
    }
    
    .image-modal {
        backdrop-filter: none;
    }
    
    /* Optimize scroll animations */
    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .page-border::before {
        border-width: 1px;
        animation: none;
    }
    
    /* Touch feedback for mobile */
    .card, .btn, .clickable-image {
        -webkit-tap-highlight-color: rgba(201, 154, 43, 0.2);
    }
    
    .card:active {
        transform: scale(0.98);
    }
    
    .btn:active {
        transform: scale(0.95);
    }
    
    /* Mobile gallery improvements */
    .gallery {
        display: flex;
        overflow-x: auto;
        gap: 16px;
        padding: 0 16px;
        scroll-behavior: smooth;
    }
    
    .gallery img {
        min-width: 280px;
        height: 200px;
        object-fit: cover;
    }
    
    /* Mobile navigation improvements */
    .nav a:active {
        background-color: rgba(122, 0, 25, 0.1);
        border-radius: 8px;
    }
    
    /* Reduce hero animations */
    .hero h1, .hero h2, .hero p {
        animation: none;
    }
    
    /* Simplify image modal */
    .image-modal {
        animation: none;
    }
    
    .image-modal-content {
        animation: none;
    }
}

/* Mobile modal adjustments */
@media (max-width: 768px) {
    .image-modal-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .image-modal-close {
        top: -30px;
        right: -30px;
        width: 40px;
        height: 40px;
        font-size: 30px;
    }
    
    .image-modal-close:before {
        font-size: 24px;
    }
}


