/* web_deployment/marketing-styles.css */

/* 
 * Homework Buddy Marketing Website Styles
 * Following brand manual guidelines for colors, typography, and components
 * Based on existing support.html and privacy_policy.html patterns
 */

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
}

/* Use system fonts for better performance and reliability */

body {
    font-family: var(--font-inter);
    line-height: 1.6;
    color: var(--hw-ink);
    background-color: #FFF8F3; /* Brand warm off-white */
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   BRAND COLORS (from brand manual)
   ========================================================================== */

:root {
    /* Primary Brand Colors */
    --hw-deep-ocean: #1E40AF;
    --hw-sky-blue: #4A7FF7;
    --hw-warm-coral: #FF8A80;
    --hw-sunshine-glow: #FFB938;
    
    /* Learning & Interface */
    --hw-understanding-teal: #06B6D4;
    --hw-success-mint: #10B981;
    --hw-snow: #FFFFFF;
    
    /* System Colors */
    --hw-error: #EF4444;
    --hw-warning: #FBBF24;
    --hw-info: #3B82F6;
    
    /* Neutrals */
    --hw-ink: #1E293B;
    --hw-stone: #64748B;
    --hw-mist: #E2E8F0;
    --hw-cloud: #F8FAFC;
    --hw-surface: #F5F0FF;
    
    /* Typography - Using system fonts for reliability */
    --font-nunito: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-inter: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    
    /* Spacing & Layout */
    --container-max-width: 1200px;
    --section-padding: 5rem 1.5rem;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
}

/* ==========================================================================
   TYPOGRAPHY SYSTEM (from brand manual)
   ========================================================================== */

/* Display - Nunito Bold for hero text */
.display-large {
    font-family: var(--font-nunito);
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.display-medium {
    font-family: var(--font-nunito);
    font-weight: 700;
    font-size: 2rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.display-small {
    font-family: var(--font-nunito);
    font-weight: 600;
    font-size: 1.75rem;
    line-height: 1.2;
    letter-spacing: -0.005em;
}

/* Headlines - Nunito SemiBold */
.headline-large {
    font-family: var(--font-nunito);
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1.3;
}

.headline-medium {
    font-family: var(--font-nunito);
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.3;
}

.headline-small {
    font-family: var(--font-nunito);
    font-weight: 600;
    font-size: 1.125rem;
    line-height: 1.4;
}

/* Body - Inter */
.body-large {
    font-family: var(--font-inter);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.5;
}

.body-medium {
    font-family: var(--font-inter);
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.5;
}

.body-small {
    font-family: var(--font-inter);
    font-weight: 400;
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Labels - Inter Medium */
.label-large {
    font-family: var(--font-inter);
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.label-medium {
    font-family: var(--font-inter);
    font-weight: 500;
    font-size: 0.75rem;
    line-height: 1.2;
    letter-spacing: 0.03em;
}

/* ==========================================================================
   LAYOUT COMPONENTS
   ========================================================================== */

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-padding);
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-center {
    justify-content: center;
    align-items: center;
}

.flex-between {
    justify-content: space-between;
    align-items: center;
}

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

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.site-header {
    background: linear-gradient(135deg, var(--hw-deep-ocean) 0%, var(--hw-sky-blue) 100%);
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(74, 127, 247, 0.2);
}

.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 2rem;
    min-height: 80px;
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--hw-snow);
    height: 100%;
}

.logo-icon {
    width: 64px;
    height: 64px;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    box-shadow: none;
}

.logo-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo-icon img[src=""],
.logo-icon img:not([src]) {
    display: none;
}

.logo-icon:has(img[src=""]):before,
.logo-icon:has(img:not([src])):before,
.logo-icon:empty::before {
    content: "🎓";
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hw-snow);
}

.logo-text {
    font-family: var(--font-nunito);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    color: var(--hw-snow);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    padding: 0.5rem 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-link:hover {
    color: var(--hw-snow);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.language-switcher {
    display: flex;
    gap: 0.25rem;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    padding: 0.25rem;
    backdrop-filter: blur(10px);
}

.language-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.language-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--hw-snow);
}

.language-btn.active {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--hw-sky-blue);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--hw-ink);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--hw-deep-ocean) 0%, var(--hw-sky-blue) 100%);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-md);
    }
    
    .nav-links.open {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: block;
        color: var(--hw-snow);
    }
}

/* ==========================================================================
   BUTTON SYSTEM (from brand manual)
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    border: none;
    font-family: var(--font-inter);
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px; /* Touch-friendly */
}

.btn-primary {
    background-color: var(--hw-sky-blue);
    color: var(--hw-snow);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--hw-deep-ocean);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--hw-snow);
    color: var(--hw-sky-blue);
    border: 2px solid var(--hw-sky-blue);
}

.btn-secondary:hover {
    background-color: var(--hw-sky-blue);
    color: var(--hw-snow);
}

.btn-success {
    background-color: var(--hw-success-mint);
    color: var(--hw-snow);
}

.btn-success:hover {
    background-color: #059669;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

.btn-small {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
    background: var(--hw-surface);
    color: var(--hw-ink);
    padding: 6rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   FEATURE SECTIONS
   ========================================================================== */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background-color: var(--hw-snow);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
}

.feature-icon.icon-subjects {
    background-color: var(--hw-understanding-teal);
    color: var(--hw-snow);
}

.feature-icon.icon-image {
    background-color: var(--hw-warm-coral);
    color: var(--hw-snow);
}

.feature-icon.icon-chat {
    background-color: var(--hw-sunshine-glow);
    color: var(--hw-ink);
}

.feature-icon.icon-age {
    background-color: var(--hw-success-mint);
    color: var(--hw-snow);
}

.feature-title {
    margin-bottom: 1rem;
    color: var(--hw-ink);
}

.feature-description {
    color: var(--hw-stone);
}

/* ==========================================================================
   TRUST SECTION
   ========================================================================== */

.trust-section {
    background-color: var(--hw-surface);
    padding: 4rem 0;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.trust-item {
    text-align: center;
    padding: 1.5rem;
}

.trust-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--hw-success-mint);
}

.trust-title {
    margin-bottom: 0.5rem;
    color: var(--hw-ink);
}

.trust-description {
    color: var(--hw-stone);
    font-size: 0.875rem;
}

/* ==========================================================================
   PRICING SECTION
   ========================================================================== */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.pricing-card {
    background-color: var(--hw-snow);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
    position: relative;
    transition: transform 0.2s ease;
}

.pricing-card.featured {
    border: 2px solid var(--hw-sky-blue);
    transform: scale(1.05);
}

.pricing-card:hover {
    transform: translateY(-4px);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-4px);
}

.pricing-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--hw-sunshine-glow);
    color: var(--hw-ink);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing-title {
    margin-bottom: 1rem;
    color: var(--hw-ink);
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--hw-sky-blue);
    margin-bottom: 0.5rem;
}

.pricing-period {
    color: var(--hw-stone);
    margin-bottom: 2rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
}

.pricing-features li {
    padding: 0.5rem 0;
    color: var(--hw-stone);
}

.pricing-features li::before {
    content: "✓";
    color: var(--hw-success-mint);
    font-weight: 600;
    margin-right: 0.5rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    background-color: var(--hw-ink);
    color: var(--hw-cloud);
    padding: 3rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--hw-snow);
    margin-bottom: 1rem;
    font-family: var(--font-nunito);
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--hw-cloud);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--hw-sky-blue);
}

.footer-bottom {
    border-top: 1px solid var(--hw-stone);
    padding-top: 2rem;
    text-align: center;
    color: var(--hw-stone);
}

/* ==========================================================================
   APP STORE BADGES
   ========================================================================== */

.app-store-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.app-store-badge {
    height: 60px;
    transition: transform 0.2s ease;
}

.app-store-badge:hover {
    transform: scale(1.05);
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Language content switching */
.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.content-section.active {
    display: block;
}

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

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --section-padding: 3rem 1rem;
    }
    
    .display-large {
        font-size: 2rem;
    }
    
    .display-medium {
        font-size: 1.75rem;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .feature-grid,
    .trust-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .app-store-badges {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .pricing-card.featured:hover {
        transform: translateY(-4px);
    }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

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

/* Focus styles for keyboard navigation */
.btn:focus,
.nav-link:focus,
.language-btn:focus {
    outline: 2px solid var(--hw-sky-blue);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --hw-stone: #2D3748;
        --hw-mist: #A0AEC0;
    }
}