/* Landing page of the assistant. --l-accent is set inline from the settings. */

:root {
    --l-bg: #0b0a09;
    --l-surface: #141210;
    --l-surface-2: #1c1916;
    --l-line: rgba(255, 255, 255, .07);
    --l-line-strong: rgba(255, 255, 255, .13);
    --l-text: #f4f0e9;
    --l-muted: #a29b90;
    --l-on-accent: #120f0a;
    --l-glow: .22;
    color-scheme: dark;
}
/* Light/dark follows the theme's own switch (data-theme, same "theme" cookie as the site). */
html[data-theme="light"] {
    --l-bg: #f6f3ed;
    --l-surface: #ffffff;
    --l-surface-2: #efebe3;
    --l-line: rgba(20, 15, 5, .08);
    --l-line-strong: rgba(20, 15, 5, .15);
    --l-text: #17140f;
    --l-muted: #6b655b;
    --l-glow: .14;
    color-scheme: light;
}
.l-theme {
    display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
    border-radius: 50%; border: 1px solid var(--l-line-strong); background: transparent;
    color: var(--l-muted); cursor: pointer; transition: color .2s, border-color .2s;
}
.l-theme:hover { color: var(--l-accent); border-color: var(--l-accent); }
html[data-theme="dark"] .l-sun, html[data-theme="light"] .l-moon { display: none; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body.bai-landing {
    margin: 0;
    background: var(--l-bg);
    color: var(--l-text);
    font-family: 'BAI Landing', Vazirmatn, Tahoma, sans-serif;
    font-size: 15px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
:where(.bai-landing) a { color: inherit; text-decoration: none; }
:where(.bai-landing) img { display: block; max-width: 100%; }
.bai-landing h1, .bai-landing h2, .bai-landing h3 { margin: 0; font-weight: 800; line-height: 1.25; }
.bai-landing em { font-style: normal; color: var(--l-accent); }
.l-icon { width: 1.15em; height: 1.15em; flex: none; }
.l-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.l-narrow { max-width: 860px; }
.l-center { text-align: center; }

/* ---------- Nav ---------- */
.l-nav {
    position: sticky; top: 0; z-index: 50;
    border-bottom: 1px solid transparent;
    transition: background .3s, border-color .3s, backdrop-filter .3s;
}
.l-nav.is-scrolled {
    background: color-mix(in srgb, var(--l-bg) 82%, transparent);
    border-color: var(--l-line);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.l-nav-in { display: flex; align-items: center; gap: 24px; height: 72px; }
.l-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; }
.l-brand img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
.l-mark {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--l-accent) 55%, transparent);
    color: var(--l-accent); font-weight: 800;
}
.l-links { display: flex; gap: 28px; margin: 0 auto; font-size: 14px; color: var(--l-muted); }
.l-links a:hover { color: var(--l-text); }
.l-nav-end { display: flex; align-items: center; gap: 10px; }
.l-ghost { font-size: 13px; color: var(--l-muted); padding: 8px 10px; }
.l-ghost:hover { color: var(--l-text); }
.l-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 999px; font-size: 13px;
    border: 1px solid var(--l-line-strong);
    transition: border-color .2s, background .2s;
}
.l-pill:hover { border-color: var(--l-accent); background: color-mix(in srgb, var(--l-accent) 10%, transparent); }

/* ---------- Buttons ---------- */
.l-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 26px; border: 0; border-radius: 14px;
    background: var(--l-text); color: var(--l-bg);
    font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
    transition: transform .2s, box-shadow .2s, background .2s;
}
.l-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--l-accent) 60%, transparent); }
.l-btn-accent { background: var(--l-accent); color: var(--l-on-accent); }
.l-btn:disabled { opacity: .5; cursor: default; transform: none; }
.l-link { display: inline-flex; align-items: center; gap: 8px; color: var(--l-accent); font-weight: 700; font-size: 14px; }
.l-link:hover .l-icon, .l-btn:hover .l-icon, .l-pill:hover .l-icon { transform: translateX(-3px); }
.l-btn .l-icon, .l-link .l-icon, .l-pill .l-icon { transition: transform .2s; }

/* ---------- Hero ---------- */
.l-hero { position: relative; padding: 56px 0 96px; overflow: hidden; }
.l-hero::before {
    content: ""; position: absolute; inset: -20% -10% auto auto; width: 70%; height: 120%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--l-accent) calc(var(--l-glow) * 100%), transparent), transparent);
    pointer-events: none;
}
.l-hero-bg {
    position: absolute; inset: 0; background-size: cover; background-position: center 20%;
    filter: blur(60px) saturate(1.3); opacity: .16; transform: scale(1.2); pointer-events: none;
}
.l-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, var(--l-bg)); }
.l-hero-in { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; }
.l-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--l-accent); }
.l-eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--l-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--l-accent) 20%, transparent); animation: l-pulse 2.4s infinite; }
@keyframes l-pulse { 50% { box-shadow: 0 0 0 8px transparent; } }
.l-hero h1 { margin: 18px 0 22px; font-size: clamp(38px, 5.6vw, 72px); letter-spacing: -.5px; }
.l-hero h1 span, .l-hero h1 em { display: block; }
.l-lead { max-width: 520px; margin: 0 0 32px; font-size: 17px; color: var(--l-muted); }
.l-cta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.l-note { font-size: 13px; color: var(--l-muted); }
.l-note-link { color: var(--l-accent); text-decoration: underline !important; text-underline-offset: 4px; }
.l-stats { display: flex; flex-wrap: wrap; gap: 0; margin: 44px 0 0; padding: 0; }
.l-stats div { padding: 0 22px; border-inline-start: 1px solid var(--l-line-strong); }
.l-stats div:first-child { padding-inline-start: 0; border: 0; }
.l-stats dt { font-size: 26px; font-weight: 800; line-height: 1.2; }
.l-stats dd { margin: 2px 0 0; font-size: 12px; color: var(--l-muted); }

/* Poster stack */
.l-stack { position: relative; height: 470px; perspective: 1200px; }
.l-poster {
    position: absolute; top: 50%; left: 50%; width: 250px; aspect-ratio: 2 / 3;
    border-radius: 18px; overflow: hidden; background: var(--l-surface-2);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px var(--l-line-strong);
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.l-poster img { width: 100%; height: 100%; object-fit: cover; }
.l-poster-0 { transform: translate(-50%, -50%) rotate(0deg); z-index: 3; }
.l-poster-1 { transform: translate(-108%, -46%) rotate(-9deg) scale(.86); z-index: 2; filter: brightness(.6); }
.l-poster-2 { transform: translate(8%, -46%) rotate(9deg) scale(.86); z-index: 1; filter: brightness(.6); }
.l-stack:hover .l-poster-1 { transform: translate(-118%, -48%) rotate(-12deg) scale(.86); }
.l-stack:hover .l-poster-2 { transform: translate(18%, -48%) rotate(12deg) scale(.86); }
.l-poster-empty { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 26px; background: radial-gradient(circle at 70% 20%, color-mix(in srgb, var(--l-accent) 35%, transparent), transparent 60%), var(--l-surface-2); }
.l-poster-empty span { font-size: 11px; letter-spacing: 3px; color: var(--l-muted); }
.l-poster-empty b { font: 800 30px/1.05 Georgia, serif; direction: ltr; text-align: left; }
.l-float {
    position: absolute; z-index: 4; bottom: 34px; right: 4%;
    display: flex; align-items: center; gap: 12px; max-width: 240px; padding: 12px 16px;
    border-radius: 16px; border: 1px solid var(--l-line-strong);
    background: color-mix(in srgb, var(--l-surface) 80%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .6);
    animation: l-bob 5s ease-in-out infinite;
}
.l-float small { display: block; font-size: 11px; color: var(--l-accent); }
.l-float strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.l-float-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--l-accent) 18%, transparent); color: var(--l-accent); }
@keyframes l-bob { 50% { transform: translateY(-8px); } }

/* ---------- Sections ---------- */
.l-section { padding: 96px 0; border-top: 1px solid var(--l-line); }
.l-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--l-accent); }
.l-section h2 { margin: 12px 0 14px; font-size: clamp(28px, 3.6vw, 44px); }
.l-sub { margin: 0 0 32px; color: var(--l-muted); }

/* Prompt */
.l-prompt {
    display: flex; align-items: flex-end; gap: 12px; padding: 12px;
    border-radius: 20px; border: 1px solid var(--l-line-strong); background: var(--l-surface);
    transition: border-color .2s, box-shadow .2s;
}
.l-prompt:focus-within { border-color: color-mix(in srgb, var(--l-accent) 70%, transparent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--l-accent) 12%, transparent); }
.l-prompt textarea {
    flex: 1; min-height: 56px; max-height: 180px; padding: 12px; border: 0; outline: 0; resize: none;
    background: transparent; color: var(--l-text); font: inherit; font-size: 16px;
}
.l-prompt textarea::placeholder { color: var(--l-muted); opacity: .8; }
.l-prompt .l-btn { flex: none; }
.l-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.l-chips-title { width: 100%; font-size: 12px; color: var(--l-muted); }
.l-chip {
    padding: 9px 16px; border-radius: 12px; border: 1px solid var(--l-line-strong); background: transparent;
    color: var(--l-text); font: inherit; font-size: 13px; cursor: pointer; text-align: right;
    transition: border-color .2s, background .2s, color .2s;
}
.l-chip:hover { border-color: var(--l-accent); color: var(--l-accent); background: color-mix(in srgb, var(--l-accent) 8%, transparent); }

/* Embedded chat (the regular widget, themed to the page) */
.l-chat { margin-top: 8px; height: min(680px, calc(100vh - 120px)); animation: l-in .5s cubic-bezier(.2, .8, .2, 1); }
.l-chat .bai-mount { height: 100%; }
.bai-landing .l-chat .bai-root {
    --bai-primary: var(--l-accent);
    --bai-bg: var(--l-surface);
    --bai-bg-soft: var(--l-surface-2);
    --bai-border: var(--l-line-strong);
    --bai-text: var(--l-text);
    --bai-muted: var(--l-muted);
    --bai-bot-bg: var(--l-surface-2);
    --bai-user-text: var(--l-on-accent);
    --bai-shadow: 0 30px 80px -40px rgba(0, 0, 0, .8);
    font-size: 15px;
}
.bai-landing .l-chat .bai-panel { border-radius: 22px; }
.bai-landing .l-chat .bai-header { background: var(--l-surface-2); color: var(--l-text); border-bottom: 1px solid var(--l-line); }
.bai-landing .l-chat .bai-avatar { background: color-mix(in srgb, var(--l-accent) 18%, transparent); color: var(--l-accent); }
.bai-landing .l-chat .bai-actions button { color: var(--l-muted); }
.bai-landing .l-chat .bai-actions button:hover { background: var(--l-line-strong); color: var(--l-text); }
.is-chatting .l-prompt, .is-chatting .l-chips { display: none; }
@keyframes l-in { from { opacity: 0; transform: translateY(16px); } }

/* How it works */
.l-how-in { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.l-how h2 { font-size: clamp(34px, 4.6vw, 60px); }
.l-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--l-line-strong); }
.l-steps li { display: flex; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--l-line-strong); }
.l-steps span { font-size: 13px; color: var(--l-accent); padding-top: 4px; }
.l-steps h3 { font-size: 19px; margin-bottom: 6px; }
.l-steps p { margin: 0; color: var(--l-muted); font-size: 14px; }

/* Features */
.l-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 36px; }
.l-feature {
    padding: 24px; border-radius: 18px; border: 1px solid var(--l-line); background: var(--l-surface);
    transition: border-color .25s, transform .25s;
}
.l-feature:hover { border-color: color-mix(in srgb, var(--l-accent) 45%, transparent); transform: translateY(-3px); }
.l-feature-ico { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 12px; background: color-mix(in srgb, var(--l-accent) 14%, transparent); color: var(--l-accent); font-size: 20px; }
.l-feature h3 { font-size: 16px; margin-bottom: 8px; }
.l-feature h3 small { font-size: 11px; font-weight: 400; color: var(--l-muted); border: 1px solid var(--l-line-strong); border-radius: 6px; padding: 1px 6px; margin-inline-start: 4px; vertical-align: middle; }
.l-feature p { margin: 0; font-size: 14px; color: var(--l-muted); }

/* Latest titles */
.l-row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.l-row-head .l-sub { margin-bottom: 14px; }
.l-rail {
    display: grid; grid-auto-flow: column; grid-auto-columns: 172px; gap: 18px;
    overflow-x: auto; padding: 10px 2px 18px; scroll-snap-type: x mandatory; scrollbar-width: thin;
    scrollbar-color: var(--l-line-strong) transparent;
}
.l-card { display: flex; flex-direction: column; gap: 6px; scroll-snap-align: start; }
.l-card-img { position: relative; aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden; background: var(--l-surface-2); }
.l-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.l-card:hover .l-card-img img { transform: scale(1.05); }
.l-score { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 12px; }
.l-score .l-icon { color: var(--l-accent); fill: currentColor; width: 12px; height: 12px; }
.l-card-title { margin-top: 6px; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-card-meta { font-size: 12px; color: var(--l-muted); }
.l-ask {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; padding: 7px;
    border-radius: 10px; border: 1px solid var(--l-line-strong); background: transparent; color: var(--l-text);
    font: inherit; font-size: 12px; cursor: pointer; transition: border-color .2s, color .2s;
}
.l-ask:hover { border-color: var(--l-accent); color: var(--l-accent); }

/* Limits */
.l-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 36px 0 28px; }
.l-plan {
    position: relative; display: flex; flex-direction: column; gap: 4px; padding: 26px;
    border-radius: 18px; border: 1px solid var(--l-line); background: var(--l-surface);
}
.l-plan span { color: var(--l-muted); font-size: 14px; }
.l-plan strong { font-size: 42px; line-height: 1.2; }
.l-plan small { color: var(--l-muted); }
.l-plan em { position: absolute; top: 18px; left: 18px; font-size: 11px; padding: 2px 10px; border-radius: 999px; background: var(--l-accent); color: var(--l-on-accent); }
.l-plan.is-current { border-color: color-mix(in srgb, var(--l-accent) 60%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--l-accent) 10%, var(--l-surface)), var(--l-surface)); }

/* FAQ */
.l-faq { margin-top: 32px; border-top: 1px solid var(--l-line-strong); }
.l-faq details { border-bottom: 1px solid var(--l-line-strong); }
.l-faq summary {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 22px 0; font-weight: 700; cursor: pointer; list-style: none;
}
.l-faq summary::-webkit-details-marker { display: none; }
.l-faq summary::after { content: "+"; font-size: 22px; font-weight: 300; color: var(--l-accent); transition: transform .25s; }
.l-faq details[open] summary::after { transform: rotate(45deg); }
.l-faq-a { padding: 0 0 22px; color: var(--l-muted); font-size: 14px; }
.l-faq-a p { margin: 0 0 8px; }
.l-faq-a ul, .l-faq-a ol { margin: 0 0 8px; padding-inline-start: 20px; }
.l-faq-a a { color: var(--l-accent); text-decoration: underline; text-underline-offset: 3px; }

/* Quote */
.l-quote { padding: 120px 0; border-top: 1px solid var(--l-line); background: radial-gradient(ellipse at center, color-mix(in srgb, var(--l-accent) calc(var(--l-glow) * 50%), transparent), transparent 70%); }
.l-quote-mark { display: block; font: 700 64px/1 Georgia, serif; color: var(--l-accent); }
.l-quote p { margin: 10px 0 36px; font-size: clamp(26px, 3.8vw, 46px); font-weight: 800; line-height: 1.5; }

/* Footer */
.l-foot { padding: 36px 0 44px; border-top: 1px solid var(--l-line); }
.l-foot-in { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 32px; }
.l-foot nav { display: flex; gap: 22px; margin-inline-start: auto; font-size: 13px; color: var(--l-muted); }
.l-foot nav a:hover { color: var(--l-text); }
.l-foot small { width: 100%; font-size: 12px; color: var(--l-muted); opacity: .8; }

/* Scroll reveal (only when JS runs and motion is fine) */
.l-js .l-reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s, transform .8s cubic-bezier(.2, .8, .2, 1); }
.l-js .l-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .l-js .l-reveal { opacity: 1; transform: none; }
    .l-float, .l-eyebrow i { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .l-links { display: none; }
    .l-nav-end { margin-inline-start: auto; }
    .l-hero-in, .l-how-in { grid-template-columns: 1fr; }
    .l-stack { order: -1; height: 360px; }
    .l-poster { width: 190px; }
    .l-how-in { gap: 40px; }
}
@media (max-width: 600px) {
    .l-wrap { padding: 0 16px; }
    .l-nav-in { height: 62px; gap: 12px; }
    .l-ghost { display: none; }
    .l-hero { padding: 24px 0 64px; }
    .l-stack { height: 300px; }
    .l-poster { width: 160px; }
    .l-float { right: 0; bottom: 6px; }
    .l-stats div { padding: 0 14px; }
    .l-stats dt { font-size: 21px; }
    .l-section { padding: 64px 0; }
    .l-prompt { flex-direction: column; align-items: stretch; }
    .l-btn { width: 100%; }
    .l-cta-row .l-btn, .l-quote .l-btn { width: auto; }
    .l-chip { flex: 1 1 100%; }
    .l-rail { grid-auto-columns: 140px; gap: 14px; }
    .l-chat { height: calc(100vh - 90px); }
    .l-foot nav { margin: 0; flex-wrap: wrap; }
    .l-quote { padding: 80px 0; }
}
