/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3399FF;
    --accent-color: #FF3333;
    --bg-dark: #0a0a0a;
    --bg-charcoal: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #707070;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --container-max: 1200px;
    --section-padding: 5rem 1rem;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans Tamil', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 400;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Tamil font prioritization for elements containing Tamil text */
/* Noto Sans Tamil will automatically be used for Tamil Unicode characters */
.film-title,
.timeline-text,
.film-description,
.film-tags,
.hero-title,
.hero-subtitle,
.about-content p,
.contact-content p {
    font-family: 'Noto Sans Tamil', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Ensure proper line-height for Tamil text readability */
.timeline-text {
    line-height: 1.8;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 400;
    line-height: 1.2;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: var(--spacing-lg);
    font-weight: 300;
    letter-spacing: -0.02em;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
    padding: var(--spacing-sm) 0;
}

@media (max-width: 767px) {
    body {
        padding-top: 70px; /* Space for fixed navbar on mobile */
    }
}

.navbar.scrolled {
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    opacity: 0.95;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    padding: var(--spacing-md);
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-menu.active {
    display: flex;
}

.nav-item {
    margin-bottom: var(--spacing-sm);
}

.nav-item:last-child {
    margin-bottom: 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 300;
    transition: color 0.3s ease;
    display: block;
    padding: var(--spacing-xs) 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

/* Desktop Navigation */
@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }
    
    .nav-menu {
        display: flex;
        flex-direction: row;
        position: static;
        width: auto;
        background: none;
        backdrop-filter: none;
        border: none;
        padding: 0;
        gap: var(--spacing-md);
    }
    
    .nav-item {
        margin-bottom: 0;
    }
    
    .nav-link {
        padding: 0;
    }
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.7) 0%,
        rgba(10, 10, 10, 0.5) 50%,
        rgba(10, 10, 10, 0.9) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: var(--spacing-md);
    max-width: 700px;
    margin: 0 auto;
}

.hero-logo {
    max-width: 120px;
    height: auto;
    margin: 0 auto var(--spacing-lg);
    display: block;
    opacity: 0.95;
}

.hero-title {
    font-size: clamp(1.25rem, 4vw, 2rem);
    font-weight: 300;
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.hero-subtitle {
    font-size: clamp(0.875rem, 2vw, 1rem);
    color: var(--text-secondary);
    font-weight: 300;
    margin-top: var(--spacing-sm);
}

/* About + Stats Section (Two-Column Layout) */
.timeline-about {
    background-color: var(--bg-charcoal);
    padding: var(--section-padding);
}

.timeline-about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.about-column {
    width: 100%;
}

.stats-column {
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

@media (min-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.stat-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.03);
}

.stat-icon {
    font-size: 1rem;
    color: var(--primary-color);
    opacity: 0.8;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.01em;
    margin-right: auto;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 300;
    text-transform: none;
    letter-spacing: 0;
    margin-left: auto;
    text-align: right;
}

/* Films Section */
.films {
    padding: var(--section-padding);
}

.films-subtitle {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    font-weight: 300;
    margin-bottom: var(--spacing-md);
    margin-top: var(--spacing-lg);
    color: var(--text-secondary);
}

.films-subtitle:first-child {
    margin-top: 0;
}

.films-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.film-card {
    background-color: var(--bg-charcoal);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.film-card:hover {
    transform: translateY(-2px);
}

.film-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background-color: #000;
    width: 100%;
}

.film-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.film-info {
    padding: var(--spacing-md);
}

.film-title {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.film-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.film-separator {
    color: var(--text-muted);
    opacity: 0.5;
}

.film-type {
    color: var(--text-secondary);
}

.film-status {
    color: var(--text-muted);
    font-style: italic;
}

.film-description {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: var(--spacing-xs);
}

.film-tags {
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--text-muted);
    font-weight: 300;
    font-style: italic;
    margin-top: var(--spacing-xs);
    margin-bottom: 0;
}

.films-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.film-card-text {
    background-color: var(--bg-charcoal);
    padding: var(--spacing-md);
    border-radius: 4px;
    border-left: 2px solid var(--text-muted);
    opacity: 0.7;
}

/* About Column (Right Column in Two-Column Layout) */
.about-column {
    width: 100%;
}

.about-content {
    max-width: 100%;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-weight: 300;
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* Two-Column Layout for Desktop */
@media (min-width: 768px) {
    .timeline-about-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-xl);
    }
    
    .stats-column,
    .about-column {
        width: 100%;
    }
}

/* Contact Section */
.contact {
    padding: var(--section-padding);
}

.contact-content {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.contact-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-weight: 300;
}

.contact-email {
    margin-top: var(--spacing-md);
}

.contact-email a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.125rem;
    transition: opacity 0.3s ease, border-bottom-color 0.3s ease;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.contact-email a:hover {
    opacity: 0.8;
    border-bottom-color: var(--primary-color);
}

.contact-icon {
    font-size: 1rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    padding: var(--spacing-md) var(--spacing-md);
    background-color: var(--bg-charcoal);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 300;
    margin: 0;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.footer-right .social-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.footer-right .social-link:hover {
    color: var(--primary-color);
}

.phone-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.875rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.phone-link:hover {
    color: var(--primary-color);
}

.phone-link i {
    font-size: 0.875rem;
}

@media (max-width: 767px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .footer-copyright {
        order: 2;
    }
    
    .footer-right {
        order: 1;
    }
}

/* Fade-in Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */

@media (min-width: 768px) {
    :root {
        --section-padding: 6rem 2rem;
    }
    
    body {
        padding-top: 0;
    }
    
    .hero-logo {
        max-width: 150px;
    }
    
    .films-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        gap: var(--spacing-md);
    }
}

@media (min-width: 1024px) {
    :root {
        --section-padding: 8rem 2rem;
    }
    
    .hero-content {
        padding: var(--spacing-xl);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .fade-in {
        opacity: 1;
        transform: none;
    }
}

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
