@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
    /* Brand Colors - From logo */
    --accent: #de2610;
    --accent-light: #ff3d26;
    --accent-dark: #b81e0a;
    
    /* Dark theme */
    --background: hsl(0, 0%, 8%);
    --foreground: hsl(0, 0%, 95%);
    --secondary: hsl(0, 0%, 15%);
    --muted-foreground: hsl(0, 0%, 65%);
    
    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Shadows */
    --shadow-accent: 0 0 40px rgba(222, 38, 16, 0.2);
}

body {
    font-family: var(--font-body);
    background: var(--background);
    color: var(--foreground);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.cursor-follower {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px rgba(222, 38, 16, 0.5);
    mix-blend-mode: difference;
}

.cursor-follower.active {
    opacity: 0.8;
}

.hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--background); /* Fallback background color */
    overflow: hidden;
}

.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.1s ease-out;
    will-change: transform;
    opacity: 0;
    animation: fadeInImage 0.5s ease-in forwards;
}

@keyframes fadeInImage {
    to {
        opacity: 1;
    }
}

.gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, hsla(0, 0%, 8%, 0.95) 0%, hsla(0, 0%, 8%, 0.7) 50%, hsla(0, 0%, 8%, 0.98) 100%);
}

.hero-content-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    display: flex;
    justify-content: center;
    padding-top: 3rem;
}

@media (min-width: 768px) {
    .header {
        padding-top: 4rem;
    }
}

.logo-img {
    height: 3rem;
    width: auto;
    animation: fadeIn 1.2s ease-out forwards;
}

@media (min-width: 768px) {
    .logo-img {
        height: 4rem;
    }
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    text-align: center;
}

@media (max-width: 768px) {
    .main-content {
        padding: 2rem 1rem;
    }
}

.content-container {
    max-width: 42rem;
    width: 100%;
}

.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(222, 38, 16, 0.3);
    background: hsla(0, 0%, 15%, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeUp 1s ease-out forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.badge-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--accent);
    animation: pulseSlow 3s ease-in-out infinite;
}

.badge-text {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    color: var(--accent-light);
}

.hero-title {
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    color: var(--foreground);
    animation: fadeUp 1s ease-out forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.75rem;
    }
}

.text-gradient-accent {
    background: linear-gradient(135deg, var(--accent-light), var(--accent), var(--accent-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    margin-bottom: 2.5rem;
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--muted-foreground);
    animation: fadeUp 1s ease-out forwards;
    animation-delay: 0.6s;
    opacity: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .hero-description {
        font-size: 0.95rem;
        line-height: 1.6;
        padding: 0 1rem;
    }
    
    .hero-description br {
        display: none;
    }
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 1.25rem;
    }
}

/* Services */
.services-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    padding: 1rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(222, 38, 16, 0.3);
    background: hsla(0, 0%, 15%, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeUp 1s ease-out forwards;
    animation-delay: 0.8s;
    opacity: 0;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 640px) {
    .services-wrapper {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }
}

.service-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    transition: color 0.3s ease;
}

.service-item:hover {
    color: var(--accent-light);
}

.service-icon {
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.service-item:hover .service-icon {
    opacity: 1;
}

.service-divider {
    height: 1.5rem;
    width: 1px;
    background: rgba(222, 38, 16, 0.3);
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .service-divider {
        display: none;
    }
}

.contact-section {
    display: inline-block;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(222, 38, 16, 0.4);
    background: hsla(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: fadeUp 1s ease-out forwards;
    animation-delay: 1s;
    opacity: 0;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .contact-section {
        padding: 1.5rem 1rem;
        margin: 0 1rem;
        width: calc(100% - 2rem);
    }
}

.contact-group {
    display: grid;
    grid-template-columns: max-content 1px max-content;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.contact-row {
    display: contents;
}

.contact-row > *:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.contact-row > *:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.contact-row > *:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
}

@media (min-width: 640px) {
    .contact-row {
        gap: 1.5rem;
    }
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--foreground);
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    justify-self: start;
}

.contact-item:hover {
    color: var(--accent-light);
}

.contact-item.contact-address {
    cursor: default;
    text-decoration: none;
}

.contact-item.contact-address:hover {
    color: var(--foreground);
}

.contact-email-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
    justify-self: start;
}

.contact-icon {
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.contact-item:hover .contact-icon {
    opacity: 1;
}

.contact-item.contact-address:hover .contact-icon {
    opacity: 0.8;
}

.contact-divider {
    height: 1.5rem;
    width: 1px;
    background: rgba(222, 38, 16, 0.2);
    justify-self: center;
}

.footer {
    padding: 2rem 0;
    text-align: center;
    animation: fadeUp 1s ease-out forwards;
    animation-delay: 1.2s;
    opacity: 0;
}

.footer p {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.025em;
    color: var(--muted-foreground);
}

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

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

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

/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--background);
    border-radius: 1.5rem;
    border: 1px solid rgba(222, 38, 16, 0.3);
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--foreground);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    font-size: 0.95rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label.form-label {
    display: none;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: var(--foreground);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(222, 38, 16, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.math-test-group label.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

@media (max-width: 640px) {
    .form-group {
        gap: 0.25rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .form-group textarea {
        min-height: 100px;
    }
    
    .math-test-group label.form-label {
        font-size: 0.8rem;
    }
    
    .modal-content {
        padding: 1.5rem 1.25rem;
    }
    
    .modal-title {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    .modal-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
    
    .contact-form {
        gap: 1rem;
    }
}

.math-test-group {
    background: rgba(222, 38, 16, 0.1);
    border: 1px solid rgba(222, 38, 16, 0.2);
    border-radius: 0.75rem;
    padding: 1rem;
}

.math-test-group label {
    font-weight: 600;
    color: var(--accent);
}

#math-problem {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--foreground);
}

.math-error {
    display: block;
    color: #ff4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.form-submit-btn:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(222, 38, 16, 0.3);
}

.form-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    animation: spin 1s linear infinite;
}

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

.form-success {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    color: var(--accent);
    margin: 0 auto 1rem;
}

.form-success h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.form-success p {
    color: var(--muted-foreground);
}

@media (max-width: 640px) {
    .modal-content {
        padding: 2rem 1.5rem;
        max-height: 95vh;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
