* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1f2933;
    background-color: #f8fafc;    
}

h1, h2, h3 {
    margin: 0;
    color: #0f172a;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.25;
}

h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    text-align: center;
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

p {
    margin: 0 0 0.5rem 0;
}

a {
    color: #0353a2;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

ul {
    margin: 0 0 1rem 0;
    padding: 0 0 0 1.5rem;
}

li {
    margin: 0.5rem 0;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #ddd;
    padding: 0.5rem 0;
}

body {
    padding-top: 60px;
}

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

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #555566;
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 0;
}

nav a:hover {
    text-decoration: underline;
}

.nav-buy {
    font-weight: 600;
}

main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

footer {
    border-top: 1px solid #ddd;
    padding: 1rem 0;
    text-align: center;
}

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

footer .footer-main {
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

footer p + p {
    margin-top: 0.5rem;
}

.hero {
    text-align: center;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.button-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2.5rem 0 1rem 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    font-size: 1.1rem;
    font-weight: normal;
    text-decoration: none;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 160px;
    background: #238cf6;
    color: white;
}

.btn:hover {
    background: #1976d2;
    text-decoration: none;
}

.btn .icon {
    height: auto;
    width: 1em;
    flex: 0 0 auto;
}

.btn .icon path {
    fill: currentColor;
}

.content-centered {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

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

/* Markdown document styles */
.content h2 {
    text-align: left;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content h3 {
    font-size: 1.2rem;
    text-align: left;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content p {
    margin-bottom: 0.75rem;
}

.content ul,
.content ol {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.content li:last-child {
    margin-bottom: 0;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

p.smaller, .smaller p, .smaller li {
    font-size: 0.9rem;
}

.text-muted {
    color: #6b7280;
}

/* Accessible helper for text only visible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 1px, 1px);
    white-space: nowrap;
    border: 0;
}

/* Hamburger button base (hidden on desktop) */
.hamburger {
    display: none;
    font-size: 1.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    color: #333;
}

.hamburger img {
    display: block;
    width: 24px;
    height: 24px;
}

.hamburger:focus {
    outline: 2px solid #238cf6;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    header .container {
        /* Keep logo and hamburger on one line */
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }

    /* Show the hamburger, push it to the right */
    .hamburger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    /* Nav goes to the next line and spans full width with animation */
    #main-nav {
        width: 100%;
        order: 3;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transform: translateY(-8px);
        transition: max-height 250ms ease, opacity 200ms ease, transform 200ms ease;
    }

    #main-nav.open {
        /* Large enough to fit the list; avoids inline JS and keeps CSS-only */
        max-height: 400px;
        opacity: 1;
        transform: translateY(0);
    }

    #main-nav ul {
        justify-content: flex-start;
        align-items: flex-start;
        gap: 0.5rem;
        flex-direction: column;
        padding-left: 0;
        padding-top: 0.5rem;
        padding-bottom: 1rem;
    }

    #main-nav li {
        margin: 0.25rem 0;
        list-style: none;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1rem; }
    .hero p { font-size: 1rem; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* ================================
   Landing Page Styles
   ================================ */

.hero-subtitle {
    font-size: 1.25rem;
    color: #475569;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Button Variants */
.btn-primary {
    background: #238cf6;
    color: white;
}

.btn-primary:hover {
    background: #1976d2;
}

.btn-secondary {
    background: #334155;
    color: white;
}

.btn-secondary:hover {
    background: #1e293b;
}

.btn-large {
    padding: 0.75rem 2rem;
    font-size: 1.2rem;
    min-width: 200px;
}

/* Section Styles */
section {
    scroll-margin-top: 80px;
}

.section-description {
    font-size: 1.1rem;
    color: #64748b;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

/* Before/After Comparison Section */
.comparison-section {
    margin: 4rem 0;
    padding: 3rem 0;
    background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
    border-radius: 16px;
}

.comparison-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.comparison-before,
.comparison-after {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.comparison-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
}

.comparison-pages {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.comparison-pages img {
    height: 220px;
    width: auto;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
}

.comparison-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #238cf6;
}

.comparison-arrow svg {
    width: 48px;
    height: 48px;
}

/* Features Grid */
.features-section {
    margin: 4rem 0;
    padding: 2rem 0;
}

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

.feature-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

/* Screenshot Section */
.screenshot-section {
    margin: 4rem 0;
    padding: 2rem 0;
}

.app-screenshot {
    text-align: center;
    margin-top: 4rem;
}

.app-screenshot img {
    max-width: 600px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* How It Works Section */
.how-it-works-section {
    margin: 4rem 0;
    padding: 3rem 0;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
}

.steps-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.step {
    flex: 1;
    min-width: 160px;
    max-width: 200px;
    text-align: center;
    padding: 1rem;
}

.step-number {
    width: 48px;
    height: 48px;
    background: #238cf6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto 1rem auto;
}

.step h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.step p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

/* Download Section */
.download-section {
    margin: 4rem 0;
    padding: 3rem 0;
    text-align: center;
}

/* Buy Section */
.buy-section {
    margin: 3rem 0;
    padding: 2rem 0;
    text-align: center;
}

.buy-section h2 {
    color: #0f172a;
}

.buy-section .section-description {
    color: #64748b;
}

.pricing-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 350px;
    margin: 1.5rem auto 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    text-align: left;
}

.pricing-features li {
    padding: 0.4rem 0;
    font-size: 0.95rem;
    color: #475569;
}

.faq-container {
    max-width: 700px;
    margin: 2rem auto;
}

.faq-container h3 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.faq-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.faq-item h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #0f172a;
}

.faq-item p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

.contact-support {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: #f1f5f9;
    border-radius: 12px;
}

.contact-support h3 {
    margin-bottom: 0.5rem;
    text-align: center;
}

.contact-support p {
    margin: 0;
    font-size: 1.1rem;
}

.release-notes-content {
    max-width: 600px;
    margin: 2rem auto 0 auto;
}

.release-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.release-item h3 {
    margin-bottom: 0.25rem;
}

.release-date {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1rem !important;
}

.release-item ul {
    margin: 0;
    padding-left: 1.25rem;
}

.release-item li {
    font-size: 0.95rem;
    color: #475569;
    margin: 0.25rem 0;
}

/* Mobile Adjustments for Landing Page */
@media (max-width: 768px) {
    .hero-subtitle {
        font-size: 1.1rem;
    }

    .comparison-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .comparison-arrow {
        transform: rotate(90deg);
    }

    .comparison-pages img {
        height: 180px;
    }

    .app-screenshot img {
        max-width: 100%;
    }

    .steps-container {
        flex-direction: column;
        align-items: center;
    }

    .step {
        max-width: 100%;
    }

    .pricing-card {
        margin: 1.5rem auto 0 auto;
    }

    .price {
        font-size: 2.5rem;
    }

    .btn-large {
        padding: 0.6rem 1.5rem;
        font-size: 1.1rem;
        min-width: 180px;
    }
}
