/* DESIGN TOKENS */
:root {
    --color-white: #FFFFFF;
    --color-offwhite: #FAF8F6;
    --color-red: #C8102E;
    --color-red-deep: #9B0B22;
    --color-red-tint: #F5E6E9;
    --color-ink: #1A1208;
    --color-ink-light: #4A3E31;
    --color-border: #E8DDDA;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'DM Sans', sans-serif;
    
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.2s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-ink);
    background-color: var(--color-offwhite);
    overflow-x: hidden;
}

img, svg {
    max-width: 100%;
    display: block;
}

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

ul {
    list-style: none;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-ink);
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    color: var(--color-ink-light);
}

/* LAYOUT */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    padding: 6rem 0;
    position: relative;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    border-radius: 2px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--color-red-deep);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(155, 11, 34, 0.15);
}

.btn-primary-small {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    background-color: var(--color-red);
    color: var(--color-white);
}
.btn-primary-small:hover {
    background-color: var(--color-red-deep);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-red);
    border-color: var(--color-red);
}

.btn-outline:hover {
    background-color: var(--color-red);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
    transition: transform 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-red);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a:not(.btn) {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: var(--color-red);
    transition: width var(--transition-fast);
}

.nav-links a:not(.btn):hover::after, .nav-links a:not(.btn).active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-ink);
    cursor: pointer;
}

/* HERO SECTION */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--color-offwhite);
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg-accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 45%;
    height: 100%;
    background-color: var(--color-red-tint);
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* ABOUT SECTION */
.about {
    background-color: var(--color-white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.founder-img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 200px 200px 0 0;
    display: block;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.image-placeholder span {
    margin-top: 1rem;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.25rem;
}

.credentials {
    margin: 2rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.credential-item {
    border-left: 2px solid var(--color-red);
    padding-left: 1rem;
}

.label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-ink-light);
    margin-bottom: 0.25rem;
}

.value {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-ink);
}

.trust-statement {
    font-size: 1.25rem;
    font-style: italic;
    font-family: var(--font-heading);
    color: var(--color-red-deep);
    border-top: 1px solid var(--color-border);
    padding-top: 1.5rem;
}

/* DIVIDERS */
.divider-diagonal-up {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--color-offwhite);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    transform: translateY(1px);
}

.divider-diagonal-down {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--color-white);
    clip-path: polygon(0 100%, 100% 100%, 0 0);
    transform: translateY(1px);
}

/* OFFERINGS SECTION */
.offerings {
    background-color: var(--color-offwhite);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.offerings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--color-white);
    padding: 2.5rem 2rem;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    border-color: var(--color-red-tint);
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background-color: var(--color-red-tint);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-red);
    margin-bottom: 1.5rem;
    transition: transform var(--transition-smooth);
}

.card:hover .icon-wrapper {
    transform: scale(1.1);
    background-color: var(--color-red);
    color: var(--color-white);
}

/* MATH RAIN */
#math-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

.math-symbol {
    position: absolute;
    color: var(--color-red);
    opacity: 0.08;
    font-family: var(--font-heading);
    user-select: none;
    animation: fall linear infinite;
    top: -100px;
}

@keyframes fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.12; }
    80% { opacity: 0.12; }
    100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

/* WHY US SECTION */
.why-us {
    background-color: var(--color-ink);
    color: var(--color-white);
    padding-top: 8rem;
    padding-bottom: 8rem;
}

.why-us-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 5rem;
    align-items: center;
}

.why-us h2 {
    color: var(--color-white);
}

.why-us p.lead-text {
    color: rgba(255,255,255,0.8);
    font-size: 1.25rem;
    margin-bottom: 3rem;
}

.why-us-points {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.point {
    display: flex;
    gap: 1.5rem;
}

.point-number {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-red);
    font-weight: 700;
    line-height: 1;
    border-top: 2px solid var(--color-red);
    padding-top: 0.5rem;
}

.point h3 {
    color: var(--color-white);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.point p {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}

.why-us-visual {
    position: relative;
}

.visual-card {
    background-color: var(--color-white);
    padding: 4rem 3rem;
    color: var(--color-ink);
    border-radius: 2px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

.visual-accent {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 60px;
    height: 60px;
    background-color: var(--color-red);
    border-radius: 50%;
}

.visual-card h3 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    color: var(--color-red-deep);
}

.visual-card p {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--color-ink-light);
    text-align: right;
}

.divider-diagonal-up-ink {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--color-white);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    transform: translateY(1px);
}

/* TIMINGS SECTION */
.timings {
    background-color: var(--color-white);
}

.timings-wrapper {
    background-color: var(--color-ink);
    color: var(--color-white);
    padding: 4rem;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.timings-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--color-red) 0%, transparent 70%);
    opacity: 0.1;
    transform: translate(30%, -30%);
}

.timing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 2rem;
}

.timing-header h2 {
    color: var(--color-white);
    margin: 0;
}

.timing-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--color-red);
    padding: 0.5rem 1rem;
    border-radius: 2px;
    font-weight: 600;
    font-size: 0.95rem;
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.class-column h3 {
    color: var(--color-red-tint);
    font-family: var(--font-body);
}

.class-range {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-white);
}

.class-features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: rgba(255,255,255,0.8);
}

.class-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background-color: var(--color-red);
    border-radius: 50%;
}

/* ENROLLMENT FORM */
.enroll {
    background-color: var(--color-offwhite);
    padding-bottom: 8rem;
}

.form-container {
    max-width: 800px;
    background-color: var(--color-white);
    padding: 4rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.02);
    position: relative;
    z-index: 2;
}

.form-header {
    margin-bottom: 3rem;
    text-align: center;
}

.enrollment-form {
    display: grid;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-ink);
}

input, select, textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--color-border);
    background-color: var(--color-offwhite);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-ink);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-red);
    background-color: var(--color-white);
    box-shadow: 0 0 0 3px var(--color-red-tint);
}

textarea {
    resize: vertical;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '▼';
    font-size: 0.8rem;
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--color-ink-light);
}

select {
    appearance: none;
    cursor: pointer;
}

.submit-btn {
    margin-top: 1rem;
    width: 100%;
    padding: 1.25rem;
    font-size: 1.1rem;
}

/* FOOTER */
.footer {
    background-color: var(--color-ink);
    color: rgba(255,255,255,0.7);
    padding-top: 6rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 1rem;
}

.footer h4 {
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-contact ul, .footer-social {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.footer a:hover {
    color: var(--color-white);
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* ANIMATIONS */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .image-placeholder {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .hero-bg-accent {
        width: 100%;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 85%);
        opacity: 0.5;
    }
    
    .hero-content {
        padding-top: 2rem;
    }
    
    .timing-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .classes-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .why-us-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .why-us-visual {
        order: -1;
    }
}

@media (max-width: 768px) {
    section {
        padding: 4rem 0;
    }

    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-white);
        flex-direction: column;
        padding: 2.5rem;
        gap: 2rem;
        box-shadow: 0 15px 30px rgba(0,0,0,0.1);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        border-top: 1px solid var(--color-border);
    }
    
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    h1 {
        font-size: clamp(2.2rem, 8vw, 2.8rem);
        line-height: 1.1;
    }

    h2 {
        font-size: clamp(1.8rem, 6vw, 2.2rem);
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }
    
    .timings-wrapper {
        padding: 2.5rem 1.5rem;
    }

    .class-range {
        font-size: 2rem;
    }
    
    .form-container {
        padding: 3rem 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-contact, .footer-social {
        align-items: center;
        text-align: center;
    }

    /* Reduce math rain density on mobile for performance */
    .math-symbol:nth-child(even) {
        display: none;
    }
}

@media (max-width: 480px) {
    .credentials {
        grid-template-columns: 1fr;
    }

    .nav-content {
        height: 70px;
    }

    .logo-text {
        font-size: 1.3rem;
    }
}
