/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light theme colors from UIColor+AppPalette.swift */
    --app-background: #f1e8d0;
    --panda-circle: rgba(90, 127, 142, 0.6);
    --chat-table: rgba(142, 117, 110, 0.2);
    --primary-button: #6a966a;
    --app-title: #5a7f8e;
    --section-title: #5a7f8e;
    --section-subtitle: rgba(142, 117, 110, 0.9);
    --text-color: #4A4A4A;
    --warm-accent: #D4AC0D;
    --earth-accent: #8B4513;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--app-background);
    overflow-x: hidden;
}

/* Comfortaa font for all headings and titles */
h1,
h2,
h3,
h4,
h5,
h6,
.logo,
.section-title,
.hero h1,
.feature-card h3 {
    font-family: 'Comfortaa', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

@media (min-width: 768px) {
    .container {
        padding: 0 40px;
    }
}

/* Header */
header {
    background-color: var(--app-background);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(90, 127, 142, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--app-title);
    text-decoration: none !important;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
    text-decoration: none !important;
}

.logo:visited,
.logo:active,
.logo:focus {
    color: var(--app-title);
    text-decoration: none !important;
}

.logo-img {
    width: 2.4rem;
    height: 2.4rem;
    object-fit: contain;
    object-position: center;
    border-radius: 50%;
    background: rgba(90, 127, 142, 0.1);
    padding: 0.2rem;
    flex-shrink: 0;
    /* Cross-browser compatibility */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Prevent image dragging */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    /* Smooth rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: -moz-crisp-edges;
    image-rendering: -o-crisp-edges;
}

.logo-text {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    padding-top: 0.4rem;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--section-subtitle);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--app-title);
}

/* Mobile menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--app-title);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--app-background);
        flex-direction: column;
        padding: 1rem 0;
        gap: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        text-align: center;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .logo {
        font-size: 1.5rem;
    }

    .logo-img {
        width: 2rem;
        height: 2rem;
    }
}

/* Main content */
main {
    margin-top: 80px;
}

/* Hero section */
.hero {
    padding: 4rem 0 6rem;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0rem;
    align-items: center;
    width: 100%;
}

@media (max-width: 768px) {
    .hero {
        padding: 2rem 0 4rem;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .hero-image {
        order: 1;
    }

    .hero-text {
        order: 2;
    }
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--section-title);
    line-height: 1.2;
    text-align: center;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
        text-align: center;
    }
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

@media (max-width: 768px) {
    .hero-text {
        align-items: center;
        text-align: center;
        max-width: 600px;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--section-subtitle);
    font-weight: 400;
}

/* App download section */
.app-download {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.store-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.store-logo {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

.app-store-logo {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235a7f8e'%3E%3Cpath d='M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z'/%3E%3C/svg%3E");
}

.google-play-logo {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236a966a'%3E%3Cpath d='M3,20.5V3.5C3,2.91 3.34,2.39 3.84,2.15L13.69,12L3.84,21.85C3.34,21.6 3,21.09 3,20.5M16.81,15.12L6.05,21.34L14.54,12.85L16.81,15.12M20.16,10.81C20.5,11.08 20.75,11.5 20.75,12C20.75,12.5 20.53,12.9 20.18,13.18L17.89,14.5L15.39,12L17.89,9.5L20.16,10.81M6.05,2.66L16.81,8.88L14.54,11.15L6.05,2.66Z'/%3E%3C/svg%3E");
}

.store-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--section-subtitle);
    border-radius: 12px;
    background: transparent;
    cursor: not-allowed;
    opacity: 0.6;
    transition: all 0.3s ease;
    font-family: inherit;
    min-width: 160px;
    text-align: left;
}

.store-button.app-store {
    border-color: var(--app-title);
    color: var(--app-title);
}

.store-button.google-play {
    border-color: var(--primary-button);
    color: var(--primary-button);
}

.store-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
}

.store-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
}

.store-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .store-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        justify-content: center;
    }

    .store-button {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }

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

.beta-text {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--section-subtitle);
    text-align: left;
}

@media (max-width: 768px) {
    .beta-text {
        text-align: center;
    }
}

/* Panda circle */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.panda-circle {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--panda-circle);
    border: 4px solid #5a7f8e;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 40px rgba(90, 127, 142, 0.3);
    animation: float 6s ease-in-out infinite;
}

.panda-img {
    width: 80%;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.1));
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@media (max-width: 768px) {
    .panda-circle {
        width: 250px;
        height: 250px;
    }
}

/* Features section */
.features {
    padding: 6rem 0;
    background: var(--chat-table);
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--section-title);
}

.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--section-subtitle);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.feature-card {
    background: var(--app-background);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

/* Clean Lucide-style icons matching PandaHappy.png aesthetic */
.lotus-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7f8e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E");
}

/* Simple brain icon for Learns & Remembers You */
.tree-growth-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7f8e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 2A2.5 2.5 0 0 1 12 4.5v15a2.5 2.5 0 0 1-4.96.44 2.5 2.5 0 0 1-2.96-3.08 3 3 0 0 1-.34-5.58 2.5 2.5 0 0 1 1.32-4.24 2.5 2.5 0 0 1 1.98-3A2.5 2.5 0 0 1 9.5 2Z'/%3E%3Cpath d='M14.5 2A2.5 2.5 0 0 0 12 4.5v15a2.5 2.5 0 0 0 4.96.44 2.5 2.5 0 0 0 2.96-3.08 3 3 0 0 0 .34-5.58 2.5 2.5 0 0 0-1.32-4.24 2.5 2.5 0 0 0-1.98-3A2.5 2.5 0 0 0 14.5 2Z'/%3E%3C/svg%3E");
}

/* Simple microphone icon for Voice-First Experience */
.sound-waves-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7f8e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2'/%3E%3Cline x1='12' y1='19' x2='12' y2='23'/%3E%3Cline x1='8' y1='23' x2='16' y2='23'/%3E%3C/svg%3E");
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--section-title);
}

.feature-card p {
    color: var(--section-subtitle);
    line-height: 1.6;
}

/* CTA section */
.cta-section {
    padding: 6rem 0;
    text-align: center;
    background: var(--app-background);
}

.cta-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--section-title);
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--section-subtitle);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .cta-button {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-button), rgba(106, 150, 106, 0.8));
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(106, 150, 106, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(106, 150, 106, 0.4);
}

.cta-button.secondary {
    background: linear-gradient(135deg, var(--app-title), rgba(90, 127, 142, 0.8));
    box-shadow: 0 4px 20px rgba(90, 127, 142, 0.3);
}

.cta-button.secondary:hover {
    box-shadow: 0 6px 25px rgba(90, 127, 142, 0.4);
}

.feedback-note {
    font-size: 0.9rem;
    color: var(--section-subtitle);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Footer */
footer {
    background: var(--chat-table);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.footer-brand .logo {
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--section-subtitle);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .footer-links {
        justify-content: center;
    }
}

.footer-links a {
    color: var(--section-subtitle);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--app-title);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(90, 127, 142, 0.1);
}

.footer-bottom p {
    color: var(--section-subtitle);
    font-size: 0.9rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.4rem;
    }

    .cta-section h2 {
        font-size: 1.4rem;
    }

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

    .footer-links {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* Content page styles */
.content-page {
    margin-top: 80px;
    padding: 4rem 0;
    min-height: 60vh;
}

.content-page h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--section-title);
    text-align: center;
}

.content-page h2 {
    font-size: 2rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: var(--section-title);
}

.content-page p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Styling for legal pages (privacy/terms) */
.content-section {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.content-section p {
    text-align: left;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.content-section ul {
    margin: 1rem 0 1.5rem 1.5rem;
    color: var(--text-color);
}

.content-section li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.content-section a {
    color: var(--primary-button);
    text-decoration: none;
    font-weight: 500;
}

.content-section a:hover {
    color: var(--app-title);
    text-decoration: underline;
}

.last-updated {
    text-align: center !important;
    font-style: italic;
    color: var(--section-subtitle) !important;
    margin-bottom: 2rem !important;
    font-size: 1rem !important;
}

/* Contact page specific styles */
#contact-info {
    margin-top: 3rem;
    text-align: center;
}

.contact-card {
    background: var(--app-background);
    border: 2px solid var(--panda-circle);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 500px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 20px rgba(90, 127, 142, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(90, 127, 142, 0.2);
}

.contact-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.contact-details {
    text-align: left;
    flex: 1;
}

.contact-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--section-title);
}

.contact-details p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--section-subtitle);
    text-align: left;
}

.email-link {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-button), rgba(106, 150, 106, 0.8));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(106, 150, 106, 0.3);
}

.email-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(106, 150, 106, 0.4);
}

.feedback-link {
    display: inline-block;
    background: linear-gradient(135deg, var(--app-title), rgba(90, 127, 142, 0.8));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(90, 127, 142, 0.3);
}

.feedback-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(90, 127, 142, 0.4);
}

.feedback-card {
    margin-top: 1.5rem;
}

.contact-note {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--chat-table);
    border-radius: 12px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-note p {
    margin-bottom: 0;
    font-size: 1rem;
    color: var(--section-subtitle);
}

@media (max-width: 768px) {
    .content-page {
        padding: 2rem 0;
    }

    .content-page h1 {
        font-size: 1.75rem;
    }

    .contact-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

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

    .contact-details p {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .app-download {
        align-items: center;
    }
}