/*
 * Main.css
 * Core styles, variables, reset, typography, and layout
 */

/* ============================================
   CSS Reset & Base Styles
   ============================================ */

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

/* ============================================
   CSS Variables
   ============================================ */

:root {
    /* Colors */
    --primary-blue: #3DBEDB;
    --dark-blue: #2CA5C2;
    --accent-teal: #3DBEDB;
    --accent-teal-dark: #2CA5C2;
    --text-dark: #1d1d1f;
    --text-gray: #86868b;
    --bg-white: #ffffff;
    --bg-light: #f5f5f7;
    --bg-card: #fbfbfd;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --spacing-2xl: 8rem;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s ease;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-pill: 980px;
}

/* ============================================
   Typography
   ============================================ */

body {
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-dark);
    background: var(--bg-white);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
}

p {
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* Prevent text size adjustment on mobile devices */
html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* ============================================
   Layout
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

section {
    position: relative;
}

/* ============================================
   Page System
   ============================================ */

.page {
    display: none;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

.page.active {
    display: block;
}

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

/* ============================================
   Navigation
   ============================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--transition-normal);
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    transition: opacity var(--transition-normal);
}

.logo:hover {
    opacity: 0.8;
}

.logo-img {
    height: 48px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}

.nav-links a {
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 400;
    transition: color var(--transition-normal);
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

.nav-cta {
    background: var(--accent-teal);
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill);
    font-weight: 500;
    transition: all var(--transition-normal);
}

.nav-cta:hover {
    background: var(--accent-teal-dark);
    transform: scale(1.02);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--bg-light);
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--text-gray);
    font-size: 0.95rem;
    transition: color var(--transition-normal);
}

.footer-nav a:hover {
    color: var(--primary-blue);
}

.copyright {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    /* Navigation */
    .nav-container {
        padding: 0.75rem 1rem;
    }

    .logo-img {
        height: 36px;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: var(--shadow-md);
        display: none;
        gap: 0.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        text-align: center;
    }

    .nav-cta {
        width: 100%;
        display: block;
        padding: 0.75rem 1.25rem !important;
    }

    .mobile-menu-btn {
        display: block;
        padding: 0.5rem;
        font-size: 1.25rem;
    }

    /* Footer */
    .footer {
        padding: 2rem 1rem;
    }

    .footer-nav {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Tablet Optimization */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }

    .logo-img {
        height: 42px;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 0.9rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .nav-container {
        padding: 0.625rem 0.75rem;
    }

    .logo-img {
        height: 32px;
    }

    .nav-links {
        padding: 1rem;
    }

    .nav-links a {
        padding: 0.625rem 0.75rem;
        font-size: 0.95rem;
    }
}
