/* Typography Scale */
:root {
    /* Colors */
    --bg-color: #f5f7fa;
    --text-color: #333;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --footer-bg: #1a2634;
    --footer-text: #94a3b8;
    --subtitle-color: #555;
    --primary-color: #4a90e2;
    --primary-hover: #357abd;

    /* Typography */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-md: 1.125rem;   /* 18px */
    --text-lg: 1.25rem;    /* 20px */
    --text-xl: 1.5rem;     /* 24px */
}

/* Dark Mode Colors */
:root.dark-mode, body.dark-mode {
    --bg-color: #111922;
    --text-color: #94a3b8;
    --card-bg: #1a2634;
    --header-bg: #1a2634;
    --footer-bg: #0d1117;
    --footer-text: #c9d1d9;
    --subtitle-color: #94a3b8;
}

/* Base Styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: var(--text-base);
}

main {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
    min-height: 65vh;
    animation: fadeIn 0.5s ease;
}

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

/* Typography */
h1, h2, h3 {
    color: var(--text-color);
}

h1 {
    font-size: var(--text-xl);
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: var(--text-lg);
    margin-bottom: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

h2:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

h3 {
    font-size: var(--text-md);
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

p {
    font-size: var(--text-base);
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Links and Buttons */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

button {
    font-size: var(--text-sm);
    padding: 0.75rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    background-color: var(--primary-color);
    color: white;
    border: none;
}

button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Grid Layouts */
.testimonials, .sparks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
    perspective: 1000px;
}

.testimonial-card, spark-card {
    transform: translateZ(0);
    transition: transform 0.3s ease;
}

.testimonial-card:hover, spark-card:hover {
    transform: translateZ(20px) rotateX(2deg);
}

/* Now Page */
.now-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.now-item {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.now-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-left-width: 8px;
    transform: translateX(4px);
}

.now-item h3 {
    margin-top: 0;
    color: var(--primary-color);
}

/* Showreel Page */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 30px 0;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.section {
    background-color: var(--card-bg);
    padding: 1.5rem;
    margin: 30px 0;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-left-width: 8px;
    transform: translateX(4px);
}

.section h2 {
    color: var(--primary-color);
    margin-top: 0;
    text-align: left;
}

/* Programs List */
.programs {
    margin-top: 50px;
}

.programs ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0;
    list-style: none;
    justify-content: center;
}

.programs li {
    font-size: var(--text-sm);
    padding: 0.5rem 1rem;
    background-color: var(--bg-color);
    border-radius: 0.375rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.programs li:hover {
    transform: translateY(-2px);
}

.fallback-message {
    text-align: center;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 8px;
    margin: 20px 0;
}

/* Sparks Specific */
.sparks a {
    font-size: var(--text-lg);
    font-weight: 500;
}

.subtitle {
    font-size: var(--text-sm);
    color: var(--subtitle-color);
    display: block;
    margin-top: 5px;
}

hr {
    margin: 50px 0;
    border: none;
    border-top: 1px solid var(--text-color);
    opacity: 0.2;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

a:focus, button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        /* Slightly smaller typography on mobile */
        --text-xl: 1.25rem;  /* 20px */
        --text-lg: 1.125rem; /* 18px */
        --text-md: 1rem;     /* 16px */
    }

    main {
        padding: 0 1rem;
    }

    .testimonials, .sparks {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .programs ul {
        gap: 0.75rem;
    }

    .section {
        padding: 1.25rem;
    }

    h1 {
        font-size: 2em;
    }
}

@media (max-width: 600px) {
    main {
        padding: 0 10px;
    }

    .testimonials, .sparks {
        gap: 20px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .now-item, .section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #eee;
    }
}

/* Hero Section */
.hero {
    height: 92vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--bg-color);
}

.mountain-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.2;
}

.mountain-animation svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.mountain {
    fill: none;
    stroke: #4a90e2;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.5;
    transition: transform 0.2s ease-out;
}

@media (prefers-color-scheme: dark) {
    .mountain {
        stroke: #94a3b8;
    }
}

.mountain-1 {
    animation: mountainMove 15s infinite ease-in-out;
}

.mountain-2 {
    animation: mountainMove 20s infinite ease-in-out reverse;
}

.mountain-3 {
    animation: mountainMove 17s infinite ease-in-out;
}

@keyframes mountainMove {
    0% {
        transform: translateX(-5%);
        opacity: 0.3;
    }
    50% {
        transform: translateX(5%);
        opacity: 0.7;
    }
    100% {
        transform: translateX(-5%);
        opacity: 0.3;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
    width: 100%;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}

.hero-content p {
    font-size: 1.5rem;
    color: var(--subtitle-color);
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

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

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.2rem;
    }
    .mountain-animation {
        opacity: 0.15;
    }
    .mountain {
        stroke-width: 2;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 85vh;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .mountain-animation {
        opacity: 0.1;
    }
}

/* Services Section */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.service-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    color: #4a90e2;
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: var(--text-lg);
}

.service-card p {
    margin: 0;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .services {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .hero {
        height: 35vh;
    }
}

@media (prefers-color-scheme: dark) {
    .service-icon {
        color: #94a3b8;
    }
}