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

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

/* ============================================
   CSS VARIABLES
   ============================================ */

:root {
    /* Colors */
    --primary: #2D5A27;
    --secondary: #3D7534;
    --accent: #1E3D1A;
    --background: #F2F7F1;
    --card-bg: #FFFFFF;
    --section-alt: #FFFFFF;
    --input-bg: #FFFFFF;
    --hover-bg: #F7FAFC;
    --text-primary: #1A202C;
    --text-secondary: #4A5568;
    --border: #E2E8F0;
    --error: #E53E3E;
    --success: #2D5A27;
    --shadow: rgba(0, 0, 0, 0.05);
    --shadow-header: rgba(0, 0, 0, 0.1);
    --focus-ring: rgba(45, 90, 39, 0.15);
    --error-ring: rgba(229, 62, 62, 0.1);
    --success-bg: #F2F7F1;
    --error-bg: #FFF5F5;

    /* Typography */
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --section-padding: 80px 20px;
    --container-max-width: 1200px;
}

[data-theme="dark"] {
    --primary: #4A8A3F;
    --secondary: #5CA550;
    --accent: #1A2E17;
    --background: #111827;
    --card-bg: #1F2937;
    --section-alt: #1A202C;
    --input-bg: #2D3748;
    --hover-bg: #2D3748;
    --text-primary: #F7FAFC;
    --text-secondary: #A0AEC0;
    --border: #4A5568;
    --error: #FC8181;
    --success: #5CA550;
    --shadow: rgba(0, 0, 0, 0.2);
    --shadow-header: rgba(0, 0, 0, 0.3);
    --focus-ring: rgba(74, 138, 63, 0.25);
    --error-ring: rgba(252, 129, 129, 0.2);
    --success-bg: #1A2E17;
    --error-bg: #2D1B1B;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

.header {
    position: sticky;
    top: 0;
    width: 100%;
    height: 60px;
    background-color: var(--background);
    box-shadow: 0 1px 3px var(--shadow-header);
    z-index: 1000;
}

.header-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.app-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.app-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 20px;
    color: var(--text-primary);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

/* Desktop theme toggle button (emoji icon) */
.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle-btn:hover {
    background-color: var(--hover-bg);
}

/* Apple-style toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    border-radius: 12px;
    transition: background-color 0.3s ease;
}

.toggle-track::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 2px;
    top: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-track {
    background-color: var(--primary);
}

.toggle-switch input:checked + .toggle-track::after {
    transform: translateX(20px);
}

.nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary);
}

/* Hamburger (hidden on desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger .bar {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Nav divider & toggle row */
.nav-divider {
    display: none;
}

.nav-toggle-row {
    display: none;
    align-items: center;
    gap: 12px;
}

.nav-toggle-label {
    display: none;
}

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

.hero {
    padding: 100px 20px;
    background-color: var(--background);
}

.hero-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 48px;
    line-height: 1.2;
    color: var(--text-primary);
}

.hero-subheading {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 20px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 8px;
}

.hero-price {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    color: var(--text-secondary);
}

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

.app-mockup {
    width: 100%;
    max-width: 400px;
}

.app-mockup-img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.35)) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

.mockup-placeholder span {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 18px;
    color: white;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary);
    transform: scale(1.02);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-link {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: var(--primary);
}

/* ============================================
   FEEDBACK FORM SECTION
   ============================================ */

.feedback-section {
    padding: var(--section-padding);
    background-color: var(--section-alt);
}

.feedback-container {
    max-width: 700px;
    margin: 0 auto;
}

.section-heading {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 36px;
    line-height: 1.3;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 16px;
}

.section-description {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 48px;
}

.feedback-form {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 12px var(--shadow);
}

.form-field {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input,
.form-textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background-color: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-input {
    height: 48px;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-input.error,
.form-textarea.error {
    border-color: var(--error);
}

.form-input.error:focus,
.form-textarea.error:focus {
    box-shadow: 0 0 0 3px var(--error-ring);
}

.error-message {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--error);
    margin-top: 6px;
    min-height: 20px;
}

.form-feedback {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-family: var(--font-body);
    font-size: 15px;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-feedback.show {
    display: block;
    opacity: 1;
}

.form-feedback.success {
    background-color: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success);
}

.form-feedback.error {
    background-color: var(--error-bg);
    color: var(--error);
    border: 1px solid var(--error);
}

/* ============================================
   FAQ SECTION
   ============================================ */

.faq-section {
    padding: var(--section-padding);
    background-color: var(--background);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-list {
    margin-top: 48px;
}

.faq-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background-color: var(--card-bg);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 18px;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
    list-style: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    background-color: var(--hover-bg);
}

.faq-icon {
    font-size: 24px;
    color: var(--primary);
    font-weight: 300;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item[open] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 24px 20px 24px;
}

.faq-answer p {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Release list & Roadmap (inside legal-block) */
.release-list {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 28px;
}

.release-list li {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    padding: 4px 0;
}

.roadmap-heading {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.roadmap-text {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ============================================
   LEGAL SECTION
   ============================================ */

.legal-section {
    padding: var(--section-padding);
    background-color: var(--section-alt);
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.legal-block {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
}

.legal-summary {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 18px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 0.2s ease;
    list-style: none;
}

.legal-summary::-webkit-details-marker {
    display: none;
}

.legal-summary::before {
    content: '+';
    font-size: 22px;
    font-weight: 300;
    color: var(--primary);
    margin-right: 16px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}

.legal-block[open] .legal-summary::before {
    transform: rotate(45deg);
}

.legal-summary:hover {
    background-color: var(--hover-bg);
}

.legal-content {
    padding: 0 24px 32px 24px;
}

.legal-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    color: white;
    background-color: var(--primary);
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    margin-bottom: 24px;
    transition: background-color 0.2s ease;
}

.legal-download::before {
    content: '\2913';
    font-size: 16px;
}

.legal-download:hover {
    background-color: var(--secondary);
}

.legal-content h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.legal-content .legal-date {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.legal-content h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin-top: 20px;
    margin-bottom: 8px;
}

.legal-content p {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.legal-content ul {
    padding-left: 20px;
    margin-bottom: 8px;
}

.legal-content li {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

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

.legal-content a:hover {
    text-decoration: underline;
}

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

.footer {
    background-color: var(--accent);
    padding: 40px 20px;
}

.footer-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.footer-brand {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 18px;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand-icon {
    height: 18px;
    width: auto;
}

.footer-copyright {
    font-family: var(--font-body);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.footer-links a {
    font-family: var(--font-body);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-links .separator {
    color: rgba(255, 255, 255, 0.5);
}

.footer-contact {
    font-family: var(--font-body);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-credit {
    font-family: var(--font-body);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 20px;
}

.footer-credit a {
    color: #ffffff;
    text-decoration: none;
    transition: text-decoration 0.2s ease;
}

.footer-credit a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

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

/* Stack hero CTA buttons (910px and below) */
@media (max-width: 910px) {
    .hero-cta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Tablet (770px and below) */
@media (max-width: 770px) {
    :root {
        --section-padding: 60px 20px;
    }

    .hamburger {
        display: flex;
    }

    .theme-toggle-btn {
        display: none;
    }

    .header-nav {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        flex-direction: column;
        background-color: var(--background);
        padding: 30px 0;
        gap: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        z-index: 999;
    }

    .header-nav.active {
        left: 0;
    }

    .header-nav .nav-link {
        display: block;
        width: 100%;
        text-align: center;
        padding: 15px 0;
        font-size: 18px;
        border-bottom: 1px solid var(--border);
    }

    .header-nav .nav-link:first-child {
        border-top: 1px solid var(--border);
    }


    .nav-divider {
        display: none;
    }

    .nav-toggle-label {
        display: inline;
        font-family: var(--font-body);
        font-weight: 500;
        font-size: 18px;
        color: var(--text-secondary);
    }

    .nav-toggle-row {
        display: flex;
        padding: 15px 0;
        justify-content: center;
    }

    .app-mockup {
        max-width: 200px;
    }

    .hero {
        padding: 60px 20px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-right {
        order: -1;
    }

    .hero-heading {
        font-size: 36px;
    }

    .hero-subheading {
        font-size: 18px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .section-heading {
        font-size: 28px;
    }

    .section-description {
        font-size: 16px;
    }

    .feedback-form {
        padding: 32px 24px;
    }

    .faq-question {
        font-size: 16px;
        padding: 16px 20px;
    }

    .faq-answer {
        padding: 0 20px 16px 20px;
    }

    .legal-summary {
        font-size: 16px;
        padding: 16px 20px;
    }

    .legal-content {
        padding: 0 20px 24px 20px;
    }
}

/* Mobile (520px and below) */
@media (max-width: 520px) {
    .app-name {
        font-size: 18px;
    }

    .header-nav {
        gap: 16px;
    }

    .hero-heading {
        font-size: 32px;
    }

    .hero-subheading {
        font-size: 16px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .feedback-form {
        padding: 24px 20px;
    }

    .section-heading {
        font-size: 24px;
    }

    .faq-question {
        font-size: 15px;
        padding: 14px 16px;
    }

    .faq-answer p {
        font-size: 14px;
    }

    .faq-answer {
        padding: 0 16px 14px 16px;
    }

    .legal-summary {
        font-size: 15px;
        padding: 14px 16px;
    }

    .legal-content {
        padding: 0 16px 20px 16px;
    }

    .legal-content h3 {
        font-size: 19px;
    }

    .legal-content p,
    .legal-content li {
        font-size: 14px;
    }

}
