/*
 * Copyright (c) 2025 MUYO LLC. All rights reserved.
 * https://muyollc.com
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Soft watercolor-inspired palette - Green & Yellow theme */
    --primary-color: #7BA888;
    --primary-dark: #5A8A6D;
    --secondary-color: #A8C5A0;
    --accent-warm: #E8CF8F;
    --accent-cool: #9BC4A8;
    --accent-sage: #B8C5A8;
    --accent-gold: #D9C48F;
    --background: #FDFCF7;
    --surface: #F9F7F0;
    --text-primary: #4A5548;
    --text-secondary: #6B7768;
    --border-color: #E5E3D8;
    --shadow: 0 2px 8px 0 rgba(123, 168, 136, 0.08), 0 1px 3px -1px rgba(123, 168, 136, 0.06);
    --shadow-lg: 0 10px 25px -5px rgba(123, 168, 136, 0.12), 0 4px 10px -4px rgba(123, 168, 136, 0.08);
    --navbar-height: 70px;
}

/* Smooth scroll with offset for sticky navbar */
html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--navbar-height);
}

body {
    font-family: 'Source Sans Pro', 'Source Sans 3', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: linear-gradient(180deg, var(--background) 0%, #F3F1E8 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.container.home-title {
    margin-top: 2rem;
}

.about-section {
    margin-top: 2rem;
}

/* Navigation */
.navbar {
    background: rgba(253, 252, 247, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229, 227, 216, 0.6);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(123, 168, 136, 0.08);
}

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

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

/* Hero Section - Watercolor gradient inspired by the images */
.hero {
    background: linear-gradient(135deg,
        rgba(155, 196, 168, 0.35) 0%,
        rgba(232, 207, 143, 0.4) 35%,
        rgba(184, 197, 168, 0.3) 70%,
        rgba(217, 196, 143, 0.35) 100%),
        linear-gradient(180deg, #F9F7F0 0%, #EDE9DC 100%);
    color: var(--text-primary);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 120%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(123, 168, 136, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* Main Content */
main {
    flex: 1;
    padding: 3rem 0;
}

.content-page {
    max-width: 900px;
}

section {
    margin-bottom: 3rem;
}

h1 {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

h2 {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 1.875rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

h3 {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

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

a:hover {
    text-decoration: underline;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.last-updated {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Apps Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.app-card {
    background: linear-gradient(135deg, rgba(249, 246, 242, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border: 1.5px solid rgba(232, 222, 210, 0.8);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-cool) 0%, var(--accent-warm) 50%, var(--accent-sage) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.app-card:hover::before {
    opacity: 1;
}

.app-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(123, 168, 136, 0.3);
}

.app-card h3 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Buttons - Soft watercolor style with softer green */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background: linear-gradient(135deg, #6a997a 0%, #7BA888 100%);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(155, 196, 168, 0.22);
    letter-spacing: 0.3px;
}

.btn:hover {
    background: linear-gradient(135deg, #88B5A0 0%, #9BC4A8 100%);
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(155, 196, 168, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #9BC4A8 0%, #7BA888 100%);
}

/* Support Section */
.support-section {
    background: linear-gradient(135deg, rgba(155, 196, 168, 0.12) 0%, rgba(232, 207, 143, 0.15) 100%);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    border: 1.5px solid rgba(229, 227, 216, 0.6);
    box-shadow: var(--shadow);
}

/* Policy Sections */
.policy-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(249, 246, 242, 0.9) 100%);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 1.5px solid rgba(232, 222, 210, 0.7);
    scroll-margin-top: calc(var(--navbar-height) + 1rem);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.policy-section:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(123, 168, 136, 0.25);
}

.policy-section ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.policy-section li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Contact Page */
.contact-section {
    margin-bottom: 3rem;
}

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

.contact-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(249, 246, 242, 0.8) 100%);
    border: 1.5px solid rgba(232, 222, 210, 0.8);
    border-radius: 18px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(123, 168, 136, 0.3);
}

.contact-item h3 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.contact-link {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--primary-color);
}

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

.topic-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(249, 246, 242, 0.9) 100%);
    border: 1.5px solid rgba(232, 222, 210, 0.7);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.topic-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(123, 168, 136, 0.35);
}

.topic-card h3 {
    color: var(--primary-dark);
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* Contact Form */
.contact-form {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(249, 246, 242, 0.95) 100%);
    border: 1.5px solid rgba(232, 222, 210, 0.8);
    border-radius: 20px;
    padding: 2.5rem;
    margin-top: 2rem;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 1.5px solid rgba(232, 222, 210, 0.8);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(123, 168, 136, 0.12);
}

.form-group textarea {
    resize: vertical;
}

.form-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    font-style: italic;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #5A7A68 0%, #4A6555 100%);
    color: white;
    padding: 2.5rem 0;
    margin-top: auto;
    border-top: 1px solid rgba(229, 227, 216, 0.2);
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer p {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: none;
    color: var(--accent-warm);
}

/* Font Switcher Widget */
.font-switcher {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: none; /* Hidden by default */
}

.font-switcher-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(123, 168, 136, 0.3);
    transition: all 0.3s ease;
}

.font-switcher-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(123, 168, 136, 0.4);
}

.font-switcher-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    min-width: 250px;
    box-shadow: var(--shadow-lg);
    border: 1.5px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.font-switcher-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.font-switcher-panel h4 {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

.font-option {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--surface);
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    text-align: left;
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.font-option:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.font-option.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
    font-weight: 500;
}

.font-option:last-child {
    margin-bottom: 0;
}

/* Font Families */
html[data-font="default"] body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

html[data-font="inter-merriweather"] body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html[data-font="inter-merriweather"] h1,
html[data-font="inter-merriweather"] h2,
html[data-font="inter-merriweather"] h3 {
    font-family: 'Merriweather', Georgia, serif;
}

html[data-font="jakarta"] body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

html[data-font="dm-lora"] body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

html[data-font="dm-lora"] h1,
html[data-font="dm-lora"] h2,
html[data-font="dm-lora"] h3 {
    font-family: 'Lora', Georgia, serif;
}

html[data-font="nunito"] body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
}

html[data-font="source-crimson"] body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
}

html[data-font="source-crimson"] h1,
html[data-font="source-crimson"] h2,
html[data-font="source-crimson"] h3 {
    font-family: 'Crimson Text', Georgia, serif;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    h1 {
        font-size: 1.875rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    .support-topics {
        grid-template-columns: 1fr;
    }

    .footer .container {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .nav-menu {
        font-size: 0.875rem;
        gap: 0.75rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .policy-section,
    .contact-form,
    .app-card,
    .contact-item,
    .topic-card {
        padding: 1.5rem;
    }

    .font-switcher {
        bottom: 1rem;
        right: 1rem;
    }

    .font-switcher-toggle {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .font-switcher-panel {
        min-width: 200px;
        padding: 1rem;
    }
}

