/**
 * BuildARAG Landing Page
 * Minimal design adapted from AIPrompt sibling app.
 * Font: Inter | Primary: Indigo | Neutral: Zinc/Gray
 */

/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.landing-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',
        'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans',
        'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #fff;
    color: #111827;
    min-height: 100vh;
    line-height: 1.5;
    transition: background-color .2s, color .2s;
}

.dark .landing-page,
.dark.landing-page {
    background: #030712;
    color: #f9fafb;
}

.l-wrap {
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 1rem;
}
@media (min-width: 640px) {
    .l-wrap { padding: 0 1.5rem; }
}

/* ── Nav ──────────────────────────────────────────── */
.l-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(229,231,235,.8);
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.dark .l-nav {
    border-bottom-color: rgba(31,41,55,.8);
    background: rgba(3,7,18,.9);
}

.l-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.5rem;
}

/* Logo */
.l-logo {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    color: inherit;
}

.l-logo-mark {
    width: 2rem;
    height: 2rem;
    border-radius: .5rem;
    background: #4f46e5;
    color: #fff;
    font-weight: 700;
    font-size: .875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dark .l-logo-mark { background: #6366f1; }

.l-logo-mark-sm {
    width: 1.75rem;
    height: 1.75rem;
    font-size: .75rem;
}

.l-logo-text {
    font-weight: 600;
    font-size: 1rem;
    color: #111827;
}
.dark .l-logo-text { color: #fff; }

/* Nav actions */
.l-nav-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

#landing-auth-state {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.l-theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
    border-radius: .5rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .15s, background .15s;
}
.l-theme-btn:hover { color: #111827; background: #f3f4f6; }
.dark .l-theme-btn { color: #9ca3af; }
.dark .l-theme-btn:hover { color: #f9fafb; background: #1f2937; }

.l-icon-moon { display: none; }
.dark .l-icon-sun { display: none; }
.dark .l-icon-moon { display: block; }

.l-nav-link {
    font-size: .875rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: color .15s;
}
.l-nav-link:hover { color: #111827; }
.dark .l-nav-link { color: #9ca3af; }
.dark .l-nav-link:hover { color: #fff; }

.l-nav-link-accent {
    color: #4f46e5;
}
.dark .l-nav-link-accent { color: #818cf8; }
.l-nav-link-accent:hover { color: #4338ca; }
.dark .l-nav-link-accent:hover { color: #a5b4fc; }

.l-nav-user {
    font-size: .875rem;
    color: #4b5563;
    display: none;
}
@media (min-width: 640px) {
    .l-nav-user { display: inline; }
}
.dark .l-nav-user { color: #9ca3af; }

.l-btn-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .875rem;
    font-weight: 500;
    color: #fff;
    background: #4f46e5;
    padding: .5rem 1rem;
    border-radius: .5rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background .15s;
}
.l-btn-nav:hover { background: #4338ca; }
.dark .l-btn-nav { background: #6366f1; }
.dark .l-btn-nav:hover { background: #4f46e5; }

/* ── Buttons ──────────────────────────────────────── */
.l-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-weight: 600;
    font-size: .9375rem;
    padding: .75rem 1.5rem;
    border-radius: .75rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all .15s;
}

.l-btn-lg {
    font-size: 1rem;
    padding: .875rem 2rem;
}

.l-btn-primary {
    color: #fff;
    background: #4f46e5;
    box-shadow: 0 1px 3px rgba(79,70,229,.25), 0 4px 12px rgba(79,70,229,.15);
}
.l-btn-primary:hover {
    background: #4338ca;
    box-shadow: 0 2px 8px rgba(79,70,229,.35), 0 8px 20px rgba(79,70,229,.2);
}
.dark .l-btn-primary { background: #6366f1; }
.dark .l-btn-primary:hover { background: #4f46e5; }

/* ── Hero ─────────────────────────────────────────── */
.l-hero {
    padding: 5rem 0 4rem;
    text-align: center;
}
@media (min-width: 640px) {
    .l-hero { padding: 7rem 0 4rem; }
}

.l-hero-h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.15;
    color: #111827;
}
@media (min-width: 640px) {
    .l-hero-h1 { font-size: 3rem; }
}
.dark .l-hero-h1 { color: #fff; }

.l-hero-sub {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: #4b5563;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}
@media (min-width: 640px) {
    .l-hero-sub { font-size: 1.25rem; }
}
.dark .l-hero-sub { color: #9ca3af; }

.l-hero-cta {
    margin-top: 2.5rem;
}

/* ── Feature pills ────────────────────────────────── */
.l-features {
    padding: 3rem 0 4rem;
}

.l-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
}
@media (min-width: 640px) {
    .l-pills { gap: 1rem; }
}

.l-pill {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .5rem 1rem;
    border-radius: 9999px;
    background: #f3f4f6;
    color: #374151;
    font-size: .875rem;
    font-weight: 500;
}
.l-pill svg { color: #6366f1; flex-shrink: 0; }
.dark .l-pill {
    background: #1f2937;
    color: #d1d5db;
}
.dark .l-pill svg { color: #818cf8; }

/* ── Workflow / How It Works ──────────────────────── */
.l-workflow {
    padding: 3rem 0 5rem;
    border-top: 1px solid #e5e7eb;
}
.dark .l-workflow { border-top-color: #1f2937; }

.l-section-h2 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: #111827;
    margin-bottom: .5rem;
}
.dark .l-section-h2 { color: #fff; }

.l-section-sub {
    text-align: center;
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 2.5rem;
}
@media (min-width: 640px) {
    .l-section-sub { font-size: 1.0625rem; }
}
.dark .l-section-sub { color: #9ca3af; }

.l-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: .5rem;
}

.l-step {
    flex: 0 1 200px;
    text-align: center;
}

.l-step-num {
    width: 3rem;
    height: 3rem;
    border-radius: .75rem;
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 700;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto .75rem;
    flex-shrink: 0;
}
.dark .l-step-num {
    background: rgba(99,102,241,.15);
    color: #818cf8;
}

.l-step-title {
    font-size: .9375rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: .25rem;
}
@media (min-width: 640px) {
    .l-step-title { font-size: 1rem; }
}
.dark .l-step-title { color: #fff; }

.l-step-desc {
    font-size: .8125rem;
    color: #6b7280;
    line-height: 1.45;
}
@media (min-width: 640px) {
    .l-step-desc { font-size: .875rem; }
}
.dark .l-step-desc { color: #9ca3af; }

.l-step-arrow {
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding-top: .75rem;
    color: #d1d5db;
}
.dark .l-step-arrow { color: #4b5563; }

@media (min-width: 768px) {
    .l-step-arrow { display: flex; }
}

@media (max-width: 767px) {
    .l-steps {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    .l-step { flex: none; width: 100%; max-width: 14rem; }
}

.l-workflow-link {
    text-align: center;
    margin-top: 2.5rem;
}

.l-link {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .875rem;
    font-weight: 500;
    color: #4f46e5;
    text-decoration: none;
}
.l-link:hover { text-decoration: underline; }
.dark .l-link { color: #818cf8; }

/* ── CTA ──────────────────────────────────────────── */
.l-cta {
    padding: 4rem 0 5rem;
}

.l-cta-card {
    border-radius: 1rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 2.5rem 2rem;
    text-align: center;
}
@media (min-width: 640px) {
    .l-cta-card { padding: 3rem 2.5rem; }
}
.dark .l-cta-card {
    background: rgba(31,41,55,.8);
    border-color: #374151;
}

.l-cta-h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}
.dark .l-cta-h2 { color: #fff; }

.l-cta-sub {
    margin-top: .5rem;
    margin-bottom: 1.5rem;
    font-size: .9375rem;
    color: #4b5563;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}
@media (min-width: 640px) {
    .l-cta-sub { font-size: 1rem; }
}
.dark .l-cta-sub { color: #9ca3af; }

/* ── Footer ───────────────────────────────────────── */
.l-footer {
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
}
.dark .l-footer { border-top-color: #1f2937; }

.l-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 2rem;
    padding-bottom: 1rem;
}

.l-footer-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.l-footer-name {
    font-size: .875rem;
    color: #4b5563;
}
.dark .l-footer-name { color: #9ca3af; }

.l-footer-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.l-footer-links a {
    font-size: .875rem;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color .15s;
}
.l-footer-links a:hover { color: #111827; }
.dark .l-footer-links a { color: #9ca3af; }
.dark .l-footer-links a:hover { color: #fff; }

.l-footer-copy {
    text-align: center;
    padding: 1.5rem 0;
    font-size: .75rem;
    color: #9ca3af;
}
.dark .l-footer-copy { color: #6b7280; }

/* ── Utilities ────────────────────────────────────── */
[hidden] { display: none !important; }
