/* ==========================================================================
   Torchlite.ai landing page
   Standalone marketing stylesheet. Dark theme matching the product app-shell
   palette (see style.css: --bg #212121, --surface #2f2f2f, --accent #8b9bff).
   Kept separate from style.css to avoid .app-shell scoping constraints.
   ========================================================================== */

:root {
    --bg: #1a1a1a;
    --bg-2: #212121;
    --surface: #2a2a2a;
    --surface-2: #2f2f2f;
    --border: #3a3a3a;
    --border-soft: #333;
    --text: #ececec;
    --text-muted: #b4b4b4;
    --text-faint: #8a8a8a;
    --accent: #ff8f4d;
    --accent-strong: #ff6a2b;
    --accent-2: #e63030;
    --radius: 14px;
    --radius-lg: 20px;
    --maxw: 1120px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-primary {
    background: linear-gradient(135deg, var(--accent-strong), var(--accent-2));
    color: #fff;
    box-shadow: 0 6px 20px rgba(255, 106, 43, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(255, 106, 43, 0.45); }
.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); border-color: #4a4a4a; }

/* ---------- Nav ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.nav.scrolled { border-color: var(--border-soft); background: rgba(26, 26, 26, 0.9); }
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark { display: inline-flex; filter: drop-shadow(0 2px 12px rgba(255, 106, 43, 0.55)); transition: filter 0.2s ease, transform 0.2s ease; }
.brand-mark img { height: 38px; width: auto; display: block; }
.brand:hover .brand-mark { filter: drop-shadow(0 3px 16px rgba(255, 106, 43, 0.8)); transform: translateY(-1px); }
.brand-name { font-size: 1.25rem; letter-spacing: -0.02em; }
.brand-tld { color: var(--accent); }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 6px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 90px 0 80px; overflow: hidden; }
.hero-glow {
    position: absolute;
    top: -180px; left: 50%;
    transform: translateX(-50%);
    width: 900px; height: 600px;
    background: radial-gradient(closest-side, rgba(255, 106, 43, 0.28), rgba(230, 48, 48, 0.12) 55%, transparent 75%);
    filter: blur(20px);
    pointer-events: none;
    z-index: 0;
}
.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
}
.eyebrow {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--accent);
    background: rgba(255, 143, 77, 0.1);
    border: 1px solid rgba(255, 143, 77, 0.25);
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); font-weight: 800; margin-bottom: 20px; }
.lead { font-size: 1.12rem; color: var(--text-muted); max-width: 540px; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-meta { font-size: 0.9rem; color: var(--text-faint); display: flex; align-items: center; }
.hero-meta .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; margin-right: 10px; box-shadow: 0 0 10px #3ddc84; }

/* ---------- Hero mock window ---------- */
.hero-mock { perspective: 1600px; }
.mock-window {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transform: rotateY(-8deg) rotateX(3deg);
    transition: transform 0.4s ease;
}
.hero-mock:hover .mock-window { transform: rotateY(0deg) rotateX(0deg); }
.mock-topbar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.mock-dot { width: 11px; height: 11px; border-radius: 50%; background: #4a4a4a; }
.mock-dot:nth-child(1) { background: #ff5f57; }
.mock-dot:nth-child(2) { background: #febc2e; }
.mock-dot:nth-child(3) { background: #28c840; }
.mock-title { margin-left: 10px; font-size: 0.85rem; color: var(--text-faint); font-weight: 600; }
.mock-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.mock-msg { padding: 12px 15px; border-radius: 14px; font-size: 0.92rem; max-width: 92%; }
.mock-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent-2));
    color: #fff;
    border-bottom-right-radius: 4px;
}
.mock-assistant {
    align-self: flex-start;
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text);
    border-bottom-left-radius: 4px;
}
.cite { color: var(--accent); font-weight: 700; font-size: 0.7em; padding-left: 1px; }
.mock-sources { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.mock-source { font-size: 0.76rem; color: var(--text-faint); background: var(--surface); border: 1px solid var(--border); padding: 4px 9px; border-radius: 8px; width: fit-content; }
.mock-inputbar {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
}
.mock-input { color: var(--text-faint); font-size: 0.9rem; }
.mock-send { display: inline-flex; color: #fff; background: var(--accent-strong); border-radius: 8px; padding: 6px; }

/* ---------- Audience strip ---------- */
.strip { padding: 46px 0; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); background: var(--bg-2); }
.strip-label { text-align: center; color: var(--text-faint); font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 22px; }
.strip-trades { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 34px; }
.trade { display: inline-flex; align-items: center; gap: 9px; color: var(--text-muted); font-weight: 500; font-size: 0.98rem; }
.trade svg { color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; margin-bottom: 14px; }
.section-head p { color: var(--text-muted); font-size: 1.08rem; margin: 0; }

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: #5f4a42; box-shadow: var(--shadow); }
.card-icon {
    width: 46px; height: 46px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: rgba(255, 143, 77, 0.12);
    color: var(--accent);
    margin-bottom: 16px;
}
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.97rem; margin: 0; }

/* ---------- Steps ---------- */
.steps { display: flex; align-items: stretch; justify-content: center; gap: 18px; flex-wrap: wrap; }
.step { flex: 1 1 260px; max-width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; text-align: center; }
.step-num {
    width: 42px; height: 42px; margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.1rem; color: #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent-2));
}
.step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.step-arrow { display: flex; align-items: center; color: var(--text-faint); font-size: 1.6rem; }

/* ---------- Integrations ---------- */
.integrations { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.integration {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.96rem;
}

/* ---------- Demo CTA ---------- */
.demo-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.demo-copy h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; margin-bottom: 14px; }
.demo-copy > p { color: var(--text-muted); font-size: 1.08rem; margin: 0 0 22px; }
.demo-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.demo-points li { display: flex; align-items: center; gap: 11px; color: var(--text); font-weight: 500; }
.demo-points svg { color: #3ddc84; flex-shrink: 0; }

.demo-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 7px; color: var(--text-muted); }
.field .opt { color: var(--text-faint); font-weight: 400; }
.field input, .field textarea {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--text);
    font: inherit;
    font-size: 0.96rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 143, 77, 0.15);
}
.field textarea { resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin: 12px 0 0; font-size: 0.9rem; min-height: 1em; }
.form-note.error { color: #ff6b6b; }

.demo-success { text-align: center; padding: 20px 8px; }
.success-icon {
    width: 62px; height: 62px; margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(61, 220, 132, 0.15);
    color: #3ddc84;
}
.demo-success h3 { font-size: 1.3rem; margin-bottom: 8px; }
.demo-success p { color: var(--text-muted); margin: 0; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border-soft); background: var(--bg-2); padding-top: 48px; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding-bottom: 32px; }
.footer-brand p { color: var(--text-faint); font-size: 0.92rem; margin: 10px 0 0; max-width: 320px; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; align-items: flex-start; }
.footer-links a { color: var(--text-muted); font-size: 0.95rem; transition: color 0.15s ease; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border-soft); padding: 20px 24px; color: var(--text-faint); font-size: 0.86rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; gap: 44px; }
    .hero-mock { max-width: 460px; }
    .mock-window { transform: none; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .demo-inner { grid-template-columns: 1fr; gap: 32px; }
    .step-arrow { display: none; }
}

@media (max-width: 640px) {
    .nav-links { display: none; }
    .nav-actions .btn-primary { display: none; }
    .nav-toggle { display: inline-flex; }
    .nav.open .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 68px; left: 0; right: 0;
        background: var(--bg-2);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px;
        gap: 16px;
        margin: 0;
    }
    .hero { padding: 60px 0 56px; }
    .section { padding: 64px 0; }
    .feature-grid { grid-template-columns: 1fr; }
    .demo-card { padding: 24px; }
    .footer-inner { flex-direction: column; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .mock-window { transform: none; }
}

/* ---------- Legal / policy pages ---------- */
.legal-page {
    padding: 100px 0 64px;
    min-height: 60vh;
}

.legal-content {
    max-width: 720px;
}

.legal-content h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.legal-content h2 {
    font-size: 1.15rem;
    margin: 32px 0 12px;
    color: var(--text);
}

.legal-content p,
.legal-content li {
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.7;
}

.legal-content ul,
.legal-content ol {
    padding-left: 1.4rem;
    margin: 12px 0;
}

.legal-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-content a:hover {
    color: var(--accent-strong);
}

.legal-updated {
    color: var(--text-faint);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.legal-muted {
    color: var(--text-faint);
    font-size: 0.9rem;
    margin-top: 20px;
}

.legal-content .btn {
    margin-top: 8px;
}

/* ---------- Public pricing page ---------- */
.pricing-page {
    padding-top: 72px;
}

.pricing-hero {
    padding: 56px 0 32px;
    text-align: center;
}

.pricing-hero h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin: 12px 0 16px;
}

.pricing-hero .lead {
    max-width: 640px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.08rem;
}

.pricing-hero .lead strong {
    color: var(--text);
    font-weight: 600;
}

.pricing-packs {
    padding: 24px 0 48px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    align-items: stretch;
}

.price-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.price-card:hover {
    transform: translateY(-3px);
    border-color: #5f4a42;
    box-shadow: var(--shadow);
}

.price-card-featured {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(255, 143, 77, 0.35), var(--shadow);
    background: linear-gradient(180deg, #322820 0%, var(--surface) 48%);
}

.price-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #1a1a1a;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.price-card h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.price-amount {
    margin: 4px 0;
}

.price-dollars {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.price-credits {
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
    margin: 4px 0 0;
}

.price-unit {
    color: var(--text-faint);
    font-size: 0.88rem;
    margin: 0;
}

.price-asks {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 8px 0 18px;
    flex: 1;
}

.price-card .btn-block {
    width: 100%;
    text-align: center;
    display: inline-flex;
    justify-content: center;
}

.pricing-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 28px auto 0;
    max-width: 640px;
}

.pricing-note a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pricing-usage,
.pricing-faq {
    padding: 48px 0 56px;
    border-top: 1px solid var(--border-soft);
}

.pricing-page .section-title {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 10px;
}

.pricing-page .section-lead {
    text-align: center;
    color: var(--text-muted);
    margin: 0 auto 28px;
    max-width: 520px;
}

.usage-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.usage-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.usage-table th,
.usage-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
}

.usage-table th {
    color: var(--text-faint);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--bg-2);
}

.usage-table td {
    color: var(--text-muted);
}

.usage-table td:first-child {
    color: var(--text);
    font-weight: 500;
}

.usage-table td:nth-child(2) {
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
}

.usage-table tr:last-child td {
    border-bottom: none;
}

.faq-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
}

.faq-item h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.faq-item p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.96rem;
}

.faq-item a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pricing-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.nav-links a.nav-current {
    color: var(--text);
    font-weight: 600;
}

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

@media (max-width: 560px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 360px;
        margin: 0 auto;
    }
    .pricing-hero {
        padding: 40px 0 20px;
    }
    .price-dollars {
        font-size: 2.1rem;
    }
}
