/* ==========================================================================
   CSS Variables & Design System
   ========================================================================== */
   :root {
    /* Colors */
    --color-dark: #120c08;
    --color-dark-alt: #1a120c;
    --color-light: #f9f6f0;
    --color-accent: #b22222; /* Flamenco Red */
    --color-accent-hover: #8b0000;
    --color-text: #333333;
    --color-text-muted: #666666;
    --color-white: #ffffff;
    
    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Montserrat', sans-serif;
    
    /* Fluid Typography (clamp) */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
    --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
    --text-4xl: clamp(2.5rem, 2rem + 4vw, 5rem);
    
    /* Fluid Spacing */
    --space-xs: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
    --space-sm: clamp(1rem, 0.8rem + 1vw, 1.5rem);
    --space-md: clamp(2rem, 1.5rem + 2.5vw, 3rem);
    --space-lg: clamp(4rem, 3rem + 5vw, 6rem);
    --space-xl: clamp(6rem, 5rem + 5vw, 10rem);
    
    /* Layout */
    --container-width: 1200px;
    --border-radius: 4px;
    --transition: all 0.3s ease;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-text);
    background-color: var(--color-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-lg) 0;
}

.section__title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-sm);
}

.text-center { text-align: center; }
.text-accent { color: var(--color-accent); }
.text-white { color: var(--color-white); }
.bg-dark { background-color: var(--color-dark); color: var(--color-white); }
.bg-light { background-color: var(--color-white); }
.bg-accent { background-color: var(--color-accent); }
.underline { text-decoration: underline; }
.mt-4 { margin-top: var(--space-md); }

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-align: center;
}

.btn--primary {
    background-color: var(--color-accent);
    color: var(--color-white);
}

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

.btn--outline {
    border: 1px solid var(--color-white);
    color: var(--color-white);
}

.btn--outline:hover {
    background-color: var(--color-white);
    color: var(--color-dark);
}

.btn--outline-light {
    border: 1px solid var(--color-white);
    color: var(--color-white);
}

.btn--outline-light:hover {
    background-color: var(--color-white);
    color: var(--color-accent);
}

.btn--text {
    color: var(--color-white);
    border-bottom: 1px solid var(--color-accent);
    padding: 0;
    padding-bottom: 5px;
    border-radius: 0;
}

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

.btn--sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
}

/* ==========================================================================
   Components
   ========================================================================== */

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: var(--space-sm) 0;
    transition: background-color 0.3s ease;
}

.header.scrolled {
    background-color: rgba(18, 12, 8, 0.95);
    backdrop-filter: blur(10px);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav__link {
    color: var(--color-white);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav__link:hover {
    color: var(--color-accent);
}

.nav__toggle {
    display: none;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 101;
}

.nav__icon,
.nav__icon::before,
.nav__icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--color-white);
    transition: var(--transition);
}

.nav__icon { top: 50%; transform: translateY(-50%); }
.nav__icon::before { top: -8px; }
.nav__icon::after { bottom: -8px; }

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(18, 12, 8, 0.9) 0%, rgba(18, 12, 8, 0.4) 100%);
}

.hero__content {
    color: var(--color-white);
    max-width: 800px;
}

.hero__title {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-sm);
    line-height: 1.1;
}

.hero__subtitle {
    font-size: var(--text-lg);
    margin-bottom: var(--space-md);
    opacity: 0.9;
    max-width: 600px;
}

.hero__actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Trust Badges */
.trust {
    background-color: var(--color-dark-alt);
    color: var(--color-white);
    padding: var(--space-sm) 0;
}

.trust__container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.trust__item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.trust__icon {
    color: var(--color-accent);
    font-size: var(--text-lg);
}

/* About Story */
.about__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
}

.about__text p {
    margin-bottom: var(--space-sm);
    font-size: var(--text-lg);
    color: var(--color-text-muted);
}

.about__image-wrapper {
    position: relative;
}

.about__image-wrapper::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--color-accent);
    z-index: -1;
}

/* Philosophy */
.philosophy {
    padding: var(--space-xl) 0;
}

.philosophy__text {
    font-size: var(--text-2xl);
    font-family: var(--font-heading);
    max-width: 900px;
    margin: 0 auto;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
}

/* Features */
.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
}

.feature-card {
    padding: var(--space-md);
    background-color: var(--color-white);
    border-top: 4px solid var(--color-accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.feature-card__title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-xs);
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 250px;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.bento-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
}

.bento-item--large {
    grid-row: span 2;
}

.bento__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bento__content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--space-md);
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.bento-item:not(.bento-item--large) .bento__content {
    background: none;
    justify-content: center;
}

/* Schedule */
.schedule__list {
    max-width: 800px;
    margin: 0 auto;
}

.schedule__item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid #ddd;
    align-items: center;
}

.schedule__day { font-weight: 600; width: 30%; }
.schedule__class { width: 40%; font-family: var(--font-heading); font-size: var(--text-lg); }
.schedule__time { width: 30%; text-align: right; color: var(--color-accent); }

/* Partners */
.partners__title {
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--space-md);
    color: var(--color-text-muted);
}

.partners__flex {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    opacity: 0.6;
}

/* Testimonials */
.testimonial-card {
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-card__text {
    font-size: var(--text-2xl);
    font-style: italic;
    margin-bottom: var(--space-sm);
    font-family: var(--font-heading);
}

.testimonial-card__author {
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* FAQ */
.faq__container {
    max-width: 800px;
}

.accordion__item {
    margin-bottom: var(--space-sm);
    border-bottom: 1px solid #ddd;
}

.accordion__btn {
    width: 100%;
    text-align: left;
    padding: var(--space-sm) 0;
    font-size: var(--text-lg);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion__btn::after {
    content: '+';
    font-size: var(--text-xl);
    color: var(--color-accent);
}

.accordion__btn[aria-expanded="true"]::after {
    content: '−';
}

.accordion__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion__content p {
    padding-bottom: var(--space-sm);
    color: var(--color-text-muted);
}

/* CTA Banner */
.cta-banner {
    padding: var(--space-xl) 0;
}

/* Footer */
.footer {
    padding: var(--space-lg) 0 var(--space-sm);
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.footer__brand {
    font-size: var(--text-2xl);
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
}

.footer__links li {
    margin-bottom: var(--space-xs);
}

.footer__link-btn {
    color: var(--color-white);
    opacity: 0.7;
}

.footer__link-btn:hover {
    color: var(--color-accent);
    opacity: 1;
}

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--space-sm);
    opacity: 0.5;
    font-size: var(--text-sm);
}

/* ==========================================================================
   Modals (SFLP)
   ========================================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal__content {
    background-color: var(--color-light);
    width: 90%;
    max-width: 500px;
    padding: var(--space-md);
    position: relative;
    z-index: 1001;
    border-radius: var(--border-radius);
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: var(--transition);
}

.modal.is-open .modal__content {
    transform: translateY(0);
}

.modal__content--large {
    max-width: 800px;
}

.modal__close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: var(--text-2xl);
    color: var(--color-text-muted);
}

.modal__close:hover {
    color: var(--color-accent);
}

/* Forms */
.form__group {
    margin-bottom: var(--space-sm);
}

.form__group label {
    display: block;
    margin-bottom: 5px;
    font-size: var(--text-sm);
    font-weight: 600;
}

.form__group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background-color: var(--color-dark-alt);
    color: var(--color-white);
    padding: var(--space-sm) 0;
    z-index: 999;
    transition: bottom 0.5s ease;
}

.cookie-banner.is-visible {
    bottom: 0;
}

.cookie-banner__flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 768px) {
    .nav__toggle {
        display: block;
    }

    .nav__list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--color-dark);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition);
    }

    .nav__list.is-open {
        right: 0;
    }

    .about__container {
        grid-template-columns: 1fr;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .bento-item--large {
        grid-row: auto;
        height: 300px;
    }

    .bento-item:not(.bento-item--large) {
        height: 200px;
    }

    .schedule__item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .schedule__day, .schedule__class, .schedule__time {
        width: 100%;
        text-align: center;
    }
}
