/* ==========================================
   DocCraftr — Index / Homepage Styles
   Navbar styles have been moved to nav.css
   ========================================== */

:root {
    --bg: #f4f2ee;
    --bg2: #ffffff;
    --bg3: #ede9e2;
    --surface: #ffffff;
    --surface2: #f9f7f4;
    --border: #e2ddd6;
    --border2: #ccc7bf;
    --text: #1a1714;
    --text2: #5a534c;
    --text3: #8a8178;
    --accent: #e8450a;
    --accent2: #ff6b35;
    --accent-bg: #fef0eb;
    --accent-border: #f5c4b0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.14);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 18px;
    --nav-h: 64px;
    /* --font-display: 'Syne', sans-serif; */
    /* --font-body: 'DM Sans', sans-serif; */
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg: #111008;
    --bg2: #1a1714;
    --bg3: #221f1a;
    --surface: #1e1b17;
    --surface2: #252119;
    --border: #2e2b25;
    --border2: #3d3930;
    --text: #f0ece4;
    --text2: #a09890;
    --text3: #706860;
    --accent: #ff6b35;
    --accent2: #ff8c5a;
    --accent-bg: #2a1508;
    --accent-border: #5a2a12;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    transition: background 0.22s, color 0.22s;
}

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

.hero {
    padding: calc(var(--nav-h) + 5rem) 1.5rem 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
    pointer-events: none;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin-bottom: 1.25rem;
}

.hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero p {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    color: var(--text2);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    font-weight: 300;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.85rem 2rem;
    border-radius: var(--radius);
    border: none;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    box-shadow: 0 4px 18px rgba(232, 69, 10, 0.3);
}

.btn-hero-primary:hover {
    background: var(--accent2);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(232, 69, 10, 0.4);
}

.btn-hero-sec {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border2);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
}

.btn-hero-sec:hover {
    background: var(--bg3);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-num {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text3);
}

/* ==========================================
   TOOLS SECTION
   ========================================== */

.section {
    padding: 4rem 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 0.95rem;
    color: var(--text2);
}

.section-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

.tools-category {
    margin-bottom: 3rem;
}

.cat-title {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text3);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.85rem;
}

.tool-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, var(--accent-bg), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
}

.tool-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card-icon {
    font-size: 1.6rem;
    margin-bottom: 0.85rem;
    width: 44px;
    height: 44px;
    background: var(--accent-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.tool-card-name {
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    position: relative;
}

.tool-card-desc {
    font-size: 0.78rem;
    color: var(--text3);
    line-height: 1.5;
    position: relative;
}

.tool-card-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border-radius: 100px;
    text-transform: uppercase;
}

.badge-browser {
    background: #eaf7ef;
    color: #2d8a4e;
}

.badge-server {
    background: var(--accent-bg);
    color: var(--accent);
}

/* ==========================================
   FEATURES
   ========================================== */

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

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: box-shadow var(--transition), transform var(--transition);
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.feature-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-desc {
    font-size: 0.875rem;
    color: var(--text2);
    line-height: 1.6;
}

/* ==========================================
   POPULAR TOOLS
   ========================================== */

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

.popular-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.25rem;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}

.popular-card:hover {
    border-color: var(--accent);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.popular-card-icon {
    font-size: 1.6rem;
    width: 48px;
    height: 48px;
    background: var(--accent-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.popular-card-body {
    flex: 1;
    min-width: 0;
}

.popular-card-name {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.popular-card-desc {
    font-size: 0.78rem;
    color: var(--text3);
    line-height: 1.4;
}

.popular-card-arrow {
    font-size: 1.1rem;
    color: var(--accent);
    flex-shrink: 0;
    transition: transform var(--transition);
}

.popular-card:hover .popular-card-arrow {
    transform: translateX(4px);
}

/* ==========================================
   HOW IT WORKS
   ========================================== */

.steps-grid {
    display: flex;
    align-items: flex-start;
    gap: 0;
    justify-content: center;
    flex-wrap: wrap;
}

.step-card {
    flex: 1;
    min-width: 220px;
    max-width: 300px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
}

.step-num {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 0.75rem;
    opacity: 0.7;
}

.step-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.step-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.step-desc {
    font-size: 0.85rem;
    color: var(--text2);
    line-height: 1.6;
}

.step-connector {
    font-size: 1.5rem;
    color: var(--accent);
    padding: 0 0.75rem;
    flex-shrink: 0;
    margin-top: 3.5rem;
    opacity: 0.5;
}

/* ==========================================
   USE CASES
   ========================================== */

.usecases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.usecase-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: box-shadow var(--transition), transform var(--transition);
}

.usecase-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.usecase-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.usecase-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.usecase-desc {
    font-size: 0.85rem;
    color: var(--text2);
    line-height: 1.65;
    margin-bottom: 1rem;
}

.usecase-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.usecase-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    background: var(--accent-bg);
    color: var(--accent);
    border: 1px solid var(--accent-border);
}

/* ==========================================
   BROWSER vs SERVER EXPLAINER
   ========================================== */

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

.explainer-card {
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 2px solid var(--border);
    transition: box-shadow var(--transition);
}

.explainer-card:hover {
    box-shadow: var(--shadow-md);
}

.explainer-browser {
    background: #f0faf4;
    border-color: #b6e8cb;
}

[data-theme="dark"] .explainer-browser {
    background: #0d1f14;
    border-color: #1a4a28;
}

.explainer-server {
    background: var(--accent-bg);
    border-color: var(--accent-border);
}

.explainer-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.2rem 0.65rem;
    border-radius: 100px;
    margin-bottom: 1rem;
}

.explainer-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.explainer-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.explainer-desc {
    font-size: 0.875rem;
    color: var(--text2);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.explainer-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}

.explainer-list li {
    font-size: 0.8rem;
    color: var(--text2);
}

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

.faq-list {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.faq-item[open] {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 3px var(--accent-bg);
}

.faq-question {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 1.1rem 1.4rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    user-select: none;
    transition: background var(--transition);
}

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

.faq-question::after {
    content: '+';
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--accent);
    flex-shrink: 0;
    transition: transform 0.2s;
}

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

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

.faq-answer {
    padding: 0 1.4rem 1.2rem;
    font-size: 0.875rem;
    color: var(--text2);
    line-height: 1.7;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

/* ==========================================
   CTA BANNER
   ========================================== */

.cta-banner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 100% 50%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 70%);
    pointer-events: none;
}

.cta-content {
    position: relative;
}

.cta-content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.6rem;
}

.cta-content p {
    font-size: 0.9rem;
    color: var(--text2);
    max-width: 440px;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cta-badge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    position: relative;
    flex-shrink: 0;
}

.cta-badge-grid span {
    font-size: 1.6rem;
    width: 52px;
    height: 52px;
    background: var(--accent-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent-border);
}

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

@media (max-width: 640px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .step-connector {
        display: none;
    }

    .steps-grid {
        flex-direction: column;
        align-items: stretch;
    }

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

    .explainer-list {
        grid-template-columns: 1fr;
    }

    .cta-banner {
        padding: 2rem 1.5rem;
    }

    .cta-badge-grid {
        display: none;
    }

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

@media (max-width: 400px) {
    .tools-grid {
        grid-template-columns: 1fr 1fr;
    }
}

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