/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Syne:wght@400;500;600;700&display=swap');

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

:root {
    --primary-color: #e85d3a;
    --secondary-color: #c44a28;
    --accent-color: #f0845e;
    --text-primary: #2d1f1a;
    --text-secondary: #7a6558;
    --bg-dark: #fef6f0;
    --bg-darker: #fceee4;
    --bg-card: #fffaf7;
    --border-color: rgba(210, 120, 70, 0.1);
    --gradient-start: #e85d3a;
    --gradient-end: #f0845e;
    --header-bg: rgba(254, 246, 240, 0.95);
    --play-bg: rgba(232, 93, 58, 0.85);
    --play-bg-hover: rgba(232, 93, 58, 1);
    --hover-tint: rgba(232, 93, 58, 0.04);
}

/* Syne font self-hosted with corrected descent metrics (fixes descender clipping on Windows) */
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/syne-400.ttf) format('truetype'); }
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/syne-500.ttf) format('truetype'); }
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/syne-600.ttf) format('truetype'); }
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/syne-700.ttf) format('truetype'); }

/* Swap lowercase 'g' to Space Grotesk to avoid Syne's deep descender clipping on Windows */
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/space-grotesk-400.ttf) format('truetype'); unicode-range: U+0067; }
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/space-grotesk-500.ttf) format('truetype'); unicode-range: U+0067; }
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/space-grotesk-600.ttf) format('truetype'); unicode-range: U+0067; }
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/space-grotesk-700.ttf) format('truetype'); unicode-range: U+0067; }

/* Note: Theme switcher available on the page — use arrow keys to preview all 29 themes */

body {
    font-family: 'Syne', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-dark);
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
    position: relative;
    font-weight: 500;
}

/* Paper texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.3;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
}

/* Containers */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 3rem;
}

.container-wide {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 3rem;
}

/* Header and Navigation */
header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

nav {
    padding: 1.5rem 0;
}

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

.logo-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.logo-img {
    height: 50px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 82px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, var(--bg-dark), transparent);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

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

.hero h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.hero p {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.7;
}

.trial-note {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* Pricing Highlight in Hero */
.pricing-highlight {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    border-radius: 0.25rem;
    padding: 2rem 3rem;
    margin: 2.5rem auto;
    max-width: 400px;
    text-align: center;
}

.limited-badge {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    margin-bottom: 1rem;
}

.price-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.price-amount {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(3.5rem, 10vw, 5rem);
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.3;
    padding-bottom: 0.1em;
}

.price-type {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 500;
}

.no-subscription {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.api-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin: 3rem 0;
    padding: 2rem 0;
}

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

.stat-number {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.3;
    padding-bottom: 0.1em;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 0.25rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

/* App Preview Section */
.app-preview {
    padding: 3rem 0 4rem;
    position: relative;
    z-index: 2;
}

.app-preview-frame + .app-preview-frame {
    margin-top: 2rem;
}

.app-preview-frame {
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 0.35rem;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 3px solid #111;
    cursor: pointer;
}

.app-preview-frame img {
    width: 100%;
    height: auto;
    display: block;
}

/* Lightbox for 1:1 screenshot zoom */
.app-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.85);
    cursor: zoom-out;
    overflow: auto;
}

.app-lightbox.active {
    display: block;
}

.app-lightbox img {
    display: block;
    max-width: none;
    width: auto;
    height: auto;
    margin: 2rem auto;
}

/* Features Compact Section */
.features-compact {
    padding: 5rem 0;
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
}

.features-compact h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
    text-align: center;
    color: var(--text-primary);
}

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

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--border-color);
    border-left-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(26, 26, 24, 0.06);
}

.feature-card h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 400;
}

/* Tutorials Section */
.tutorials {
    padding: 5rem 0;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
}

.tutorials h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
    text-align: center;
    color: var(--text-primary);
}

.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.tutorial-card {
    background: var(--bg-card);
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.tutorial-card:hover {
    box-shadow: 0 4px 20px rgba(26, 26, 24, 0.06);
}

.tutorial-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

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

.tutorial-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.tutorial-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tutorial-card:hover .tutorial-thumb img {
    transform: scale(1.03);
}

.tutorial-thumb .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: #fff;
    background: var(--play-bg);
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: background 0.3s ease;
}

.tutorial-card:hover .tutorial-thumb .play-icon {
    background: var(--play-bg-hover);
}

.tutorial-title {
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Pricing & Privacy Combined Section */
.pricing-privacy {
    padding: 5rem 0;
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
}

.pricing-box {
    background: var(--bg-card);
    padding: 4rem 3rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-box h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
    text-align: center;
    color: var(--text-primary);
}

.pricing-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

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

.price-item h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    letter-spacing: -0.01em;
}

.price-item p {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.6;
}

.cta-inline {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* FAQ Section */
.faq {
    padding: 5rem 0;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
}

.faq h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
    text-align: center;
    color: var(--text-primary);
}

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

.faq-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.faq-item:first-child {
    border-top: 1px solid var(--border-color);
}

.faq-item h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.faq-item p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 400;
}

/* Benchmarks Embed Section */
.benchmarks-embed {
    padding: 5rem 0;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
}

.benchmarks-embed h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    text-align: center;
    color: var(--text-primary);
}

.benchmarks-embed-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
}

.chart-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    letter-spacing: -0.01em;
}

.chart-title:first-of-type { margin-top: 0.5rem; }
.chart-title.cost { color: #16803c; }
.chart-title.speed { color: #2563eb; }
.chart-title.accuracy { color: #7c3aed; }

.hchart-container {
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    background: var(--bg-card);
    padding: 1.5rem 1.5rem 1rem;
    position: relative;
}

.benchmark-table-wrapper {
    margin-top: 2.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.benchmark-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 600px;
}

.benchmark-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.benchmark-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 400;
}

.benchmark-table tr:last-child td { border-bottom: none; }
.benchmark-table tr:hover td { background: var(--hover-tint); }
.benchmark-table .col-cost { color: #16803c; font-weight: 500; }
.benchmark-table .col-speed { color: #2563eb; font-weight: 500; }
.benchmark-table .col-accuracy { font-weight: 500; }
.benchmark-table .col-accuracy.pass { color: #16803c; }
.benchmark-table .col-accuracy.fail { color: #dc2626; }
.benchmark-table .col-provider { color: var(--text-secondary); font-size: 0.8rem; }

.benchmark-note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 400;
    margin-top: 2rem;
    opacity: 0.7;
}

/* Footer */
footer {
    background: var(--bg-darker);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

footer p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container,
    .container-narrow,
    .container-wide {
        padding: 0 1.5rem;
    }

    nav {
        padding: 1rem 0;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .logo-img {
        height: 40px;
    }

    .nav-links {
        gap: 1.5rem;
        font-size: 0.9rem;
    }

    .hero {
        min-height: 85vh;
    }

    .hero-stats {
        flex-direction: column;
        gap: 2rem;
        padding: 1.5rem 0;
    }

    .features-compact,
    .tutorials,
    .pricing-privacy,
    .faq,
    .benchmarks-embed {
        padding: 3rem 0;
    }

    .hchart-container {
        padding: 1rem;
    }

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

    .pricing-highlight {
        padding: 1.5rem 2rem;
        margin: 2rem auto;
    }

    .pricing-box {
        padding: 2.5rem 2rem;
    }

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

    .pricing-details {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

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

    .pricing-box {
        padding: 2rem 1.5rem;
    }
}
