/*
Theme Name: ACE Academy
Author: Your Name
Description: Custom theme for ACE Academy Japanese Language School.
Version: 1.0
*/

/* === BRAND DESIGN TOKENS === */
:root {
    --ace-red: #b21f24;
    --ace-gold: #d9a22b;
    --ink: #14080a;
    --muted: #565656;
    --light-bg: #fff8fb;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Lato', sans-serif;
    --font-japanese: 'Noto Sans JP', sans-serif;
    --bg-ivory: #fbf7f2;
}

html, body {
    scroll-behavior: smooth;
    font-family: var(--font-body);
    color: var(--ink);
    overflow-x: hidden;
    background-color: var(--bg-ivory);
}

.lang-ja, .nav-jp, .hero-school-tagline, .hero-motto, .font-jp {
    font-family: var(--font-japanese) !important;
    line-height: 1.8 !important;
}

/* === ANIMATIONS === */
@keyframes petalFall {
    0% { transform: translateY(-10vh) translateX(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.4; }
    100% { transform: translateY(110vh) translateX(100px) rotate(360deg); opacity: 0; }
}

@keyframes kenburns {
    0% { transform: scale(1) translate(0%, 0%); }
    100% { transform: scale(1.15) translate(-2%, -2%); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.stagger-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.stagger-reveal.is-visible { opacity: 1; transform: translateY(0); }

/* === ELITE LAYOUT UTILITIES === */
.glass-spotlight {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(217, 162, 43, 0.3);
    box-shadow: 0 30px 80px rgba(178, 31, 36, 0.12), 0 1px 0 rgba(255,255,255,0.8) inset;
    position: relative;
    overflow: hidden;
}

.glass-spotlight::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.6), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1;
}
.glass-spotlight:hover::before { opacity: 1; }
.glass-spotlight > * { position: relative; z-index: 2; }

.header-glass {
    background: rgba(251, 247, 242, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(217, 162, 43, 0.15);
    box-shadow: 0 10px 30px rgba(178, 31, 36, 0.03);
}

.sakura-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; z-index: 3; mix-blend-mode: multiply; }
.sakura-petal { position: absolute; top: 0; background: radial-gradient(circle at 35% 35%, #ffe1ef 0%, #ffb3d9 70%, transparent 80%); border-radius: 100% 80% 100% 80%; transform-origin: center; will-change: transform, opacity; animation: petalFall linear infinite; }

/* === MICRO-INTERACTION: MAGNETIC BUTTON === */
.magnetic-btn {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}
.magnetic-btn::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 14px;
    background: linear-gradient(45deg, var(--ace-red), var(--ace-gold));
    opacity: 0;
    filter: blur(15px);
    z-index: -1;
    transition: opacity 0.3s ease;
}
.magnetic-btn:hover::after { opacity: 0.7; }

/* === MICRO-INTERACTION: EMBLEM SEAL (ENLARGED) === */
.emblem-seal {
    position: relative;
    z-index: 10;
    border-radius: 50%;
    padding: 12px;
    background: var(--bg-ivory);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}
.emblem-rotating-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0%, var(--ace-gold) 15%, transparent 30%, transparent 50%, var(--ace-red) 65%, transparent 80%);
    animation: spin-slow 12s linear infinite;
    padding: 2px;
    z-index: -1;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
}
.emblem-inner-glass {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 10px 30px rgba(178,31,36,0.1);
}

/* === TEXTURIZED BACKGROUND === */
.noise-texture {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 2;
    mix-blend-mode: multiply;
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    .sakura-petal, .emblem-rotating-ring, .animate-ping, .bg-kenburns {
        animation: none !important;
        display: none !important;
    }
    .stagger-reveal { transition: none; opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}
.touch-target { min-height: 44px; min-width: 44px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ace-gold); outline-offset: 4px; border-radius: 4px; }