/* ===================== VARIABLES ===================== */
:root {
    --accent: #7c3aed;
    --accent-hover: #6d28d9;
    --accent-light: rgba(124, 58, 237, 0.2);
    --text-primary: #1a1a2e;
    --text-secondary: #555;
    --text-muted: #888;
    --bg-dark: #1a1a2e;
    --hero-gradient: linear-gradient(135deg, #f3f0ff 0%, #eef0ff 100%);

    --bg-body: #fff;
    --bg-surface: #f8f9fb;
    --bg-card: #fff;
    --bg-input: #f4f4f4;
    --border-color: #e8e8e8;
    --border-light: #eee;
    --nav-bg: rgba(255,255,255,0.95);
    --shadow-card: 0 6px 20px rgba(0,0,0,0.08);
    --shadow-screenshot: 0 4px 24px rgba(0,0,0,0.1);
    --screenshot-border: #e0e0e0;
    --pricing-highlight-shadow: rgba(124,58,237,0.15);
    --overlay-bg: rgba(0,0,0,0.85);
    --footer-text: #aaa;
    --link-color: #2f66bd;
}

[data-theme="dark"] {
        --accent: #a78bfa;
        --accent-hover: #8b5cf6;
        --accent-light: rgba(167, 139, 250, 0.2);
        --text-primary: #e8e8f0;
        --text-secondary: #aaa;
        --text-muted: #777;
        --bg-dark: #0f0f1a;
        --hero-gradient: linear-gradient(135deg, #1a1028 0%, #151525 100%);

        --bg-body: #111118;
        --bg-surface: #1a1a24;
        --bg-card: #1e1e2a;
        --bg-input: #252530;
        --border-color: #2a2a3a;
        --border-light: #222233;
        --nav-bg: rgba(17,17,24,0.95);
        --shadow-card: 0 6px 20px rgba(0,0,0,0.3);
        --shadow-screenshot: 0 4px 24px rgba(0,0,0,0.4);
        --screenshot-border: #333;
        --pricing-highlight-shadow: rgba(167,139,250,0.2);
        --overlay-bg: rgba(0,0,0,0.92);
        --footer-text: #777;
        --link-color: #a78bfa;
}

/* ===================== RESET & BASE ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background: var(--bg-body);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }


/* ===================== UTILITIES ===================== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 740px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}


/* ===================== BUTTONS ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s, transform 0.15s;
    cursor: pointer;
    border: none;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

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

.btn-nav {
    padding: 8px 20px;
    background: var(--accent);
    color: #fff;
    border-radius: 6px;
    font-size: 0.9rem;
}
.btn-nav:hover { background: var(--accent-hover); }


/* ===================== NAV ===================== */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo-img {
    height: 60px;
    border-radius: 8px;
}

.nav-logo-text {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

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

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px 8px;
}

.theme-toggle:hover { color: var(--accent); }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #333;
}


/* ===================== HERO ===================== */
.hero {
    padding: 80px 0 60px;
    background: var(--hero-gradient);
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 48px;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-note {
    margin-top: 14px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero-visual {
    flex: 1;
    max-width: 480px;
}

.hero-video {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-screenshot);
}

@media (min-width: 769px) {
    .hero-video { cursor: pointer; }
}

/* Video zoom overlay */
.video-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--overlay-bg);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.video-overlay.active {
    display: flex;
}

.video-overlay-player {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
}


/* ===================== PROBLEM ===================== */
.problem {
    padding: 80px 0;
    text-align: center;
}

.problem h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.problem p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.problem-highlight {
    font-size: 1.3rem !important;
    color: var(--text-primary) !important;
    font-weight: 600;
    margin-top: 20px !important;
}


/* ===================== COLLECTIONS ===================== */
.collections {
    padding: 80px 0;
    background: var(--bg-surface);
}

.templates-grid {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.template-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 28px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    width: 150px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}

.template-card i {
    font-size: 36px;
}

.template-card:nth-child(1) i { color: #e63946; }
.template-card:nth-child(2) i { color: #457b9d; }
.template-card:nth-child(3) i { color: var(--accent); }
.template-card:nth-child(4) i { color: #e9c46a; }

.template-card-custom {
    border-style: dashed;
    border-color: #bbb;
}
.template-card-custom i { color: #999; }

.template-name {
    font-weight: 700;
    font-size: 1rem;
}

.template-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
}


/* ===================== VIDEO SHOWCASE ===================== */
.showcase {
    display: flex;
    gap: 32px;
    align-items: stretch;
    margin-top: 16px;
}

.showcase-accordion {
    flex: 0 0 340px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.showcase-item {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.showcase-item:hover { border-color: var(--text-muted); }

.showcase-item.active {
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 2px 12px rgba(124,58,237,0.1);
}

.showcase-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.showcase-item-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 20px;
}

.showcase-item.active .showcase-item-number { color: var(--accent); }

.showcase-item-title {
    font-weight: 600;
    font-size: 1.05rem;
}

.showcase-item-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin-top 0.3s ease;
    margin-top: 0;
}

.showcase-item.active .showcase-item-body {
    max-height: 200px;
    margin-top: 12px;
}

.showcase-item-body p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0;
    padding-left: 32px;
}

/* Video side */
.showcase-video {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.showcase-video-container {
    position: relative;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-dark);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.showcase-vid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s;
}

.showcase-vid.active { opacity: 1; }

.showcase-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.showcase-arrow:hover { background: var(--bg-card); }
.showcase-arrow-left { left: 12px; }
.showcase-arrow-right { right: 12px; }

/* Mobile caption — hidden on desktop */
.showcase-mobile-caption {
    display: none;
    text-align: center;
    margin-top: 16px;
    min-height: 70px;
}

.showcase-caption {
    display: none;
}

.showcase-caption.active {
    display: block;
}

.showcase-caption strong {
    font-size: 1.05rem;
    display: block;
    margin-bottom: 4px;
}

.showcase-caption p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Dots — hidden on desktop, shown on mobile */
.showcase-dots {
    display: none;
    gap: 8px;
    justify-content: center;
    margin-top: 14px;
}

.showcase-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--text-muted);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}

.showcase-dot.active {
    background: var(--accent);
    transform: scale(1.3);
}


/* ===================== FEATURE ROWS ===================== */
.feature-row {
    display: flex;
    align-items: center;
    gap: 48px;
    margin-bottom: 64px;
}

.feature-row.reverse { flex-direction: row-reverse; }

.feature-text {
    flex: 1;
}

.feature-text h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.feature-text p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.feature-img {
    flex: 1;
}

.screenshot {
    border-radius: 12px;
    box-shadow: var(--shadow-screenshot);
    border: 2px solid var(--screenshot-border);
}


/* ===================== HABITS ===================== */
.habits {
    padding: 80px 0;
}

.habits-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.habits-list li {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.habits-list li i {
    color: var(--accent);
    width: 20px;
    text-align: center;
}


/* ===================== PRINCIPLES ===================== */
.principles {
    padding: 80px 0;
    background: var(--bg-dark);
    color: #fff;
}

.principles .section-header p { color: #aaa; }

.principles-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.principle-card {
    flex: 1;
    min-width: 240px;
    max-width: 320px;
    text-align: center;
    padding: 36px 28px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
}

.principle-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: 50%;
    font-size: 24px;
    color: var(--accent);
}

.principle-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.principle-card p {
    color: #bbb;
    font-size: 0.95rem;
}


/* ===================== FIELD TYPES ===================== */
.field-types {
    padding: 80px 0;
}

.field-types h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 8px;
}

.field-types > .container > p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1.05rem;
}

.fields-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.field-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-input);
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}

.field-item i {
    color: var(--accent);
}


/* ===================== PRICING ===================== */
.pricing {
    padding: 80px 0;
    background: var(--bg-surface);
}

.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.pricing-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 32px;
    width: 300px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pricing-card-highlight {
    border: 2px solid var(--accent);
    box-shadow: 0 4px 24px var(--pricing-highlight-shadow);
}

.pricing-badge {
    position: absolute;
    top: -13px;
    background: var(--accent);
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
}

.pricing-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-price {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
}

.pricing-period {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.pricing-features {
    text-align: left;
    margin-bottom: 28px;
    width: 100%;
}

.pricing-features li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.pricing-features li i {
    color: var(--accent);
    font-size: 0.85rem;
}

.pricing-card .btn {
    width: 100%;
    justify-content: center;
    margin-top: auto;
}


/* ===================== FINAL CTA ===================== */
.final-cta {
    padding: 80px 0;
    text-align: center;
}

.final-cta h2 {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.final-cta p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 28px;
}

.final-cta .hero-cta {
    justify-content: center;
}


/* ===================== FOOTER ===================== */
footer {
    background: var(--bg-dark);
    color: var(--footer-text);
    padding: 32px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-brand strong {
    color: #fff;
    font-size: 1.1rem;
}

.footer-brand a {
    color: var(--accent);
}
.footer-brand a:hover { text-decoration: underline; }

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a:hover { color: #fff; }


/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {

    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-body);
        flex-direction: column;
        padding: 20px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border-light);
        box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    }

    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }

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

    .hero h1 { font-size: 2.5rem; }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta { justify-content: center; }

    .hero-visual { max-width: 100%; }

    .feature-row,
    .feature-row.reverse {
        flex-direction: column;
    }

    .templates-grid { gap: 12px; }

    .template-card { width: 130px; padding: 20px 16px; }

    .principles-grid { flex-direction: column; align-items: center; }

    .principle-card { max-width: 100%; }

    .pricing-grid { flex-direction: column; align-items: center; }

    .pricing-card { width: 100%; max-width: 360px; }

    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    /* Showcase mobile: video on top, dots below, no accordion */
    .showcase {
        flex-direction: column;
    }

    .showcase-accordion {
        display: none;
    }

    .showcase-mobile-caption {
        display: block;
    }

    .showcase-dots {
        display: flex;
    }

    .showcase-video-container {
        aspect-ratio: 4 / 3;
    }
}
