:root {
    --bg-a: #07101b;
    --bg-b: #0b1424;
    --surface: rgba(16, 27, 45, 0.66);
    --surface-solid: #121f35;
    --line: rgba(172, 191, 228, 0.24);
    --text: #ecf3ff;
    --muted: #9eb0cf;
    --accent: #5aa7ff;
    --accent-2: #89c4ff;
    --violet: #7d82ff;
    --ok: #63f0b2;
    --radius-lg: 22px;
    --radius-md: 14px;
    --shadow: 0 20px 60px rgba(3, 7, 14, 0.5);
    --x: 50%;
    --y: 50%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 16% 10%, rgba(90, 167, 255, 0.25), transparent 40%),
        radial-gradient(circle at 86% 88%, rgba(123, 112, 255, 0.26), transparent 45%),
        linear-gradient(160deg, var(--bg-a), var(--bg-b));
    background-size: 170% 170%, 150% 150%, 100% 100%;
    animation: bg-drift-dark 24s ease-in-out infinite;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(460px circle at var(--x) var(--y), rgba(90, 167, 255, 0.16), transparent 60%);
    animation: glow-breathe 8.5s ease-in-out infinite;
}

.backdrop-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    z-index: -2;
    pointer-events: none;
}

.orb-a {
    width: 360px;
    height: 360px;
    top: -120px;
    right: -90px;
    background: rgba(90, 167, 255, 0.24);
    animation: drift 14s ease-in-out infinite;
}

.orb-b {
    width: 320px;
    height: 320px;
    bottom: -100px;
    left: -60px;
    background: rgba(125, 130, 255, 0.2);
    animation: drift 18s ease-in-out infinite reverse;
}

.grid-noise {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.16;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.7), transparent 74%);
    animation: grid-drift 18s linear infinite;
}

.container {
    width: min(1180px, calc(100% - 2.4rem));
    margin-inline: auto;
}

.section {
    padding: 5rem 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: border-color 200ms ease, background 200ms ease;
}

.site-header.scrolled {
    border-bottom-color: var(--line);
    background: rgba(7, 16, 27, 0.72);
    backdrop-filter: blur(10px);
}

.nav-wrap {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.brand img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.brand span {
    color: var(--text);
    font-weight: 800;
    letter-spacing: 0.03em;
}

.main-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.theme-toggle {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-radius: 999px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.48rem 0.82rem;
    cursor: pointer;
    transition: transform 150ms ease, background 150ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    transform: translateY(-1px);
    outline: none;
    background: rgba(255, 255, 255, 0.11);
}

.main-nav a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.93rem;
    padding: 0.42rem 0.6rem;
    border-radius: 10px;
    white-space: nowrap;
    transition: color 160ms ease, background 160ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 40px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    cursor: pointer;
    padding: 0.5rem;
}

/* Icon is an inline SVG (fixed intrinsic size) now, not span bars sized via CSS. */
.menu-toggle svg {
    display: block;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.72rem 1.12rem;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.btn-primary {
    color: #06131a;
    background: linear-gradient(145deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 30px rgba(90, 167, 255, 0.3);
}

.btn-ghost {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.05);
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2rem;
    align-items: center;
}

.eyebrow {
    margin: 0 0 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    font-size: 0.77rem;
    font-weight: 700;
}

h1,
h2,
h3 {
    font-family: "Outfit", "Plus Jakarta Sans", sans-serif;
    margin: 0;
}

h1 {
    font-size: clamp(2.1rem, 5.7vw, 4.2rem);
    line-height: 1.02;
}

h2 {
    font-size: clamp(1.6rem, 3.8vw, 2.9rem);
}

h3 {
    font-size: 1.15rem;
}

p {
    color: var(--muted);
    line-height: 1.7;
}

.hero-sub {
    margin-top: 1rem;
    max-width: 62ch;
}

.hero-tags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-tags span {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.58rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: #d6e5ff;
    font-size: 0.78rem;
}

.hero-actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.76rem;
    flex-wrap: wrap;
}

/* ===== Prompt-first hero composer ===== */
.hero-build {
    margin-top: 1.35rem;
}

.hero-build-box {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius-md, 14px);
    padding: 0.7rem;
    box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.7);
}

.hero-build-input {
    width: 100%;
    resize: vertical;
    min-height: 2.6rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: #eef4ff;
    font: inherit;
    font-size: 1rem;
    line-height: 1.4;
    padding: 0.35rem 0.4rem;
}

.hero-build-input::placeholder { color: var(--muted); }

.hero-build-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.hero-build-file {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: #d6e5ff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.hero-build-file:hover,
.hero-build-file:focus-visible { border-color: rgba(172, 191, 228, 0.5); }

.hero-build-btn {
    margin-inline-start: auto;
}

.hero-build-file-name {
    margin-top: 0.55rem;
    font-size: 0.85rem;
    color: #d6e5ff;
}

.hero-build-turnstile { margin-top: 0.7rem; }

.hero-build-status {
    margin-top: 0.55rem;
    min-height: 1.1rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.hero-build-status.is-error { color: #ff9d9d; }

.hero-build-alt {
    margin-top: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--muted);
}

.hero-build-alt a { color: #cfe0ff; text-decoration: none; }
.hero-build-alt a:hover { text-decoration: underline; }

/* ===== Ailock-style centered hero (prompt panel + job cards) ===== */
.hero-center {
    max-width: 1040px;
    margin: 0 auto;
    text-align: center;
}
.hero-center h1 {
    margin-top: 0.6rem;
    background: linear-gradient(100deg, #eaf2ff 0%, #7fb0ff 25%, #8b6cff 50%, #7fb0ff 75%, #eaf2ff 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: heroGradientFlow 6s linear infinite;
}
body[data-theme="light"] .hero-center h1 {
    background: linear-gradient(100deg, #14306e 0%, #2f7bff 25%, #6f4cff 50%, #2f7bff 75%, #14306e 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: heroGradientFlow 6s linear infinite;
}
@keyframes heroGradientFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: -200% 50%; }
}
.hero-center .hero-sub { margin-left: auto; margin-right: auto; max-width: 680px; }

/* Panel + job cards share one width so their edges line up. */
.ailock-panel,
.job-cards { max-width: 980px; }

.ailock-panel {
    margin: 1.6rem auto 0;
    text-align: start;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 20px;
    padding: 1rem 1.15rem 0.9rem;
    box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
/* Attention pulse until the visitor engages the box (JS removes .is-attn on focus/input). */
.ailock-panel.is-attn { animation: apxPanelAttn 2.6s ease-in-out infinite; }
@keyframes apxPanelAttn {
    0%, 100% { box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.8), 0 0 0 0 rgba(47, 123, 255, 0); border-color: var(--line); }
    50%      { box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.8), 0 0 0 4px rgba(47, 123, 255, 0.16); border-color: rgba(47, 123, 255, 0.4); }
}
.ailock-panel:focus-within {
    animation: none;
    border-color: rgba(47, 123, 255, 0.55);
    box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.8), 0 0 0 3px rgba(47, 123, 255, 0.18);
}
@media (prefers-reduced-motion: reduce) { .ailock-panel.is-attn { animation: none; } }
.ailock-input {
    width: 100%;
    resize: none;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 1.06rem;
    line-height: 1.5;
    padding: 0.4rem 0.3rem 0.2rem;
    min-height: 3.2rem;
}
.ailock-input::placeholder { color: var(--muted); }

.ailock-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
}
.ailock-plan {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}
.ailock-plan input { position: absolute; opacity: 0; pointer-events: none; }
.ailock-plan-track {
    position: relative;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--line);
    transition: background 0.15s ease;
    flex: 0 0 auto;
}
.ailock-plan-knob {
    position: absolute;
    top: 2px;
    inset-inline-start: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #eef4ff;
    transition: inset-inline-start 0.15s ease;
}
.ailock-plan input:checked + .ailock-plan-track { background: var(--brand, #4c8dff); }
.ailock-plan input:checked + .ailock-plan-track .ailock-plan-knob { inset-inline-start: 18px; }
.ailock-plan input:focus-visible + .ailock-plan-track { outline: 2px solid #4c8dff; outline-offset: 2px; }

.ailock-actions {
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.ailock-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: #d6e5ff;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.ailock-chip:hover { border-color: rgba(172, 191, 228, 0.55); background: rgba(255, 255, 255, 0.09); }
.ailock-chip:active { transform: scale(0.95); }
.ailock-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 0;
    background: var(--brand, #2f7bff);
    color: #fff;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.1s ease;
}
.ailock-send:hover { filter: brightness(1.08); }
.ailock-send:active { transform: scale(0.95); }

/* Job cards — the three most common jobs, driving the composer above. */
.job-cards {
    margin: 1.4rem auto 0;
    max-width: 980px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}
.job-card {
    text-align: start;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 16px;
    padding: 1.1rem 1.15rem 1.2rem;
    cursor: pointer;
    color: inherit;
    font: inherit;
    transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.job-card:hover {
    border-color: rgba(172, 191, 228, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 22px 44px -30px rgba(0, 0, 0, 0.75);
}
.job-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    color: #fff;
    margin-bottom: 0.7rem;
}
.job-ico-spark { background: linear-gradient(135deg, #2f7bff, #6f4cff); }
.job-ico-excel { background: linear-gradient(135deg, #1f9d55, #34c27a); }
.job-ico-pa    { background: linear-gradient(135deg, #7a45e6, #b06cff); }
.job-card h3 { font-size: 1rem; margin: 0 0 0.35rem; color: var(--text); }
.job-card p { font-size: 0.86rem; color: var(--muted); line-height: 1.5; margin: 0; }

/* Light-theme fixes for the composer + cards (their default rgba fills read on dark only). */
body[data-theme="light"] .ailock-panel,
body[data-theme="light"] .job-card { background: #ffffff; }
body[data-theme="light"] .ailock-chip,
body[data-theme="light"] .hero-build-file-name { color: var(--text); }
body[data-theme="light"] .ailock-chip { background: rgba(20, 40, 80, 0.04); border-color: var(--line); }
body[data-theme="light"] .ailock-chip:hover { background: rgba(20, 40, 80, 0.08); }
body[data-theme="light"] .ailock-plan-track { background: rgba(20, 40, 80, 0.14); }
body[data-theme="light"] .ailock-plan-knob { background: #fff; }

/* Header "Sign In" — an outlined pill button beside the filled "Try Free". */
.nav-signin {
    display: inline-flex;
    align-items: center;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    white-space: nowrap;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.nav-signin:hover {
    text-decoration: none;
    border-color: rgba(120, 150, 200, 0.55);
    background: rgba(127, 160, 220, 0.10);
}

/* Keep the page-shipped static <header> hidden until menu.js swaps in the real one — otherwise
   the old menu paints for a frame before it's replaced. Layout space is reserved (no CLS). */
html:not(.apx-menu-ready) .site-header { visibility: hidden; }

@media (max-width: 780px) {
    .job-cards { grid-template-columns: 1fr; }
    .ailock-panel { max-width: 100%; }
}

.hero-metrics {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.hero-metrics article {
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    padding: 0.84rem 0.74rem;
}

.metric-value {
    margin: 0;
    font-size: 1.48rem;
    font-weight: 800;
    color: #ffffff;
}

.metric-value::after {
    content: "+";
    color: var(--accent);
    margin-left: 2px;
}

.hero-metrics p:last-child {
    margin: 0.16rem 0 0;
    font-size: 0.8rem;
}

/* Hero headline — white/blue/Excel-green gradient text fill. */
.hero-copy h1 {
    background: linear-gradient(100deg, #ffffff 0%, #4d9bff 45%, #2ecc71 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-metrics .metric-figure {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.1;
}

/* Light theme: true white is unreadable on this pale background, so lead with a vivid
   blue instead and land on a saturated (not muddy/dark) green. */
body[data-theme="light"] .hero-copy h1 {
    background: linear-gradient(100deg, #1f6fe0 0%, #1fb6c9 50%, #16a34a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-visual {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 160ms ease;
}

.mock-window {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    overflow: hidden;
    background: var(--surface-solid);
    box-shadow: var(--shadow);
}

.mock-top {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 0.86rem;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

/* Child combinator, not a plain descendant selector: .mock-top also contains a <p> with a
   data-i18n <span> (the rotating "Ailock is building your ___" label) — a descendant selector
   here would also clip that text span down to an 8px dot. */
.mock-top > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
}

.mock-top p {
    margin: 0 0 0 0.35rem;
    font-size: 0.83rem;
    color: #d7e6ff;
}

.mock-window img {
    display: block;
    width: 100%;
    height: auto;
    background: #162538;
}

.float-card {
    position: absolute;
    width: min(260px, 80%);
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(8, 15, 29, 0.92);
    padding: 0.66rem 0.74rem;
    box-shadow: 0 14px 30px rgba(3, 8, 18, 0.55);
    animation: float 5s ease-in-out infinite;
}

.float-card h3 {
    font-size: 0.86rem;
    margin-bottom: 0.25rem;
    color: #ffffff;
}

.float-card p {
    font-size: 0.75rem;
    margin: 0;
}

.float-a {
    top: -18px;
    right: -22px;
}

.float-b {
    left: -18px;
    bottom: -18px;
    animation-delay: 1.4s;
}

.section-head {
    margin-bottom: 1.4rem;
}

.feature-list-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1rem;
}

.feature-list-card,
.feature-image-card,
.control-sidebar,
.control-main,
.carousel,
.usecase-card,
.cta-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(8px);
    box-shadow: 0 14px 40px rgba(4, 9, 18, 0.45);
}

.feature-list-card {
    padding: 1.15rem;
}

.feature-icons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.56rem;
    margin-bottom: 0.92rem;
}

.icon-pill {
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.48rem;
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 0.28rem;
}

.icon-pill img {
    width: 25px;
    height: 25px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(70%) sepia(16%) saturate(1637%) hue-rotate(183deg) brightness(101%) contrast(101%);
}

.icon-pill span {
    color: #d6e5ff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}

.feature-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.6rem;
}

.feature-list li {
    position: relative;
    padding-left: 1.45rem;
    color: #dce8ff;
    font-size: 0.93rem;
}

.feature-list li::before {
    content: "+";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-weight: 700;
}

.feature-image-card {
    padding: 1.2rem;
    display: grid;
    place-items: center;
    text-align: center;
}

.feature-image-card img {
    width: min(320px, 100%);
    height: auto;
    filter: drop-shadow(0 14px 28px rgba(90, 167, 255, 0.24));
    animation: bob 4.8s ease-in-out infinite;
}

.feature-image-card p {
    margin-top: 1rem;
    max-width: 38ch;
}

.control-panel-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.control-sidebar {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.control-sidebar-head p {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
}

.control-sidebar-head h3 {
    margin-top: 0.42rem;
}

.explorer-nav {
    display: grid;
    gap: 0.48rem;
}

.explorer-btn {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.05);
    color: #d7e6ff;
    border-radius: 12px;
    font: inherit;
    font-weight: 600;
    padding: 0.72rem 0.78rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    cursor: pointer;
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.explorer-btn span {
    text-align: left;
}

.explorer-btn small {
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    color: #9eb5dd;
}

.explorer-btn:hover,
.explorer-btn:focus-visible {
    transform: translateX(3px);
    border-color: rgba(90, 167, 255, 0.55);
    outline: none;
    box-shadow: 0 10px 22px rgba(8, 17, 32, 0.42);
}

.explorer-btn.is-active {
    border-color: rgba(90, 167, 255, 0.7);
    background: linear-gradient(120deg, rgba(90, 167, 255, 0.26), rgba(123, 112, 255, 0.16));
    color: #fff;
}

.explorer-btn.is-active small {
    color: #eaf3ff;
}

.control-health {
    margin-top: auto; /* pin the health cards to the bottom so the sidebar fills its column */
    border-top: 1px solid var(--line);
    padding-top: 0.82rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr; /* keep the two health cards the same size */
    gap: 0.55rem;
}

.control-health article {
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.65rem 0.6rem;
}

.control-health p {
    margin: 0;
    font-size: 0.73rem;
}

.control-health strong {
    display: block;
    margin-top: 0.3rem;
    font-size: 1rem;
    color: #ffffff;
}

.control-main {
    padding: 1rem;
    display: grid;
    gap: 0.92rem;
}

.control-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
}

.control-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-size: 0.74rem;
    color: var(--accent);
    font-weight: 700;
}

.control-topbar h3 {
    margin-top: 0.35rem;
}

.control-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.48rem;
}

.control-tags span {
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: #e6f0ff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.36rem 0.58rem;
}

.control-description {
    margin: 0;
    max-width: 74ch;
}

.control-preview {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 0.8rem;
    align-items: stretch;
}

.control-preview img {
    width: 100%;
    min-height: 220px;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: #182742;
}

.control-stats {
    display: grid;
    grid-auto-rows: 1fr; /* keep the three stat cards the same size */
    gap: 0.56rem;
}

.control-stat {
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.74rem 0.72rem;
}

.control-stat p {
    margin: 0;
    font-size: 0.8rem;
}

.control-stat strong {
    display: block;
    margin-top: 0.22rem;
    color: #ffffff;
    font-size: 1.2rem;
}

.control-points-wrap {
    border-top: 1px solid var(--line);
    padding-top: 0.88rem;
}

.control-points-wrap h4 {
    margin: 0;
    font-size: 0.93rem;
    letter-spacing: 0.02em;
}

#explorer-points {
    list-style: none;
    margin: 0.66rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

#explorer-points li {
    position: relative;
    padding-left: 1.26rem;
    color: #d2e1ff;
    font-size: 0.9rem;
}

#explorer-points li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0.01rem;
    color: var(--ok);
    font-weight: 700;
}

.carousel {
    padding: 0.9rem;
    position: relative;
}

.carousel-track {
    position: relative;
    min-height: 300px;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(22px) scale(0.98);
    transition: opacity 420ms ease, transform 420ms ease;
    pointer-events: none;
}

.slide.is-active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.slide img {
    width: 100%;
    height: 260px;
    object-fit: contain;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(10, 18, 34, 0.7);
}

.slide-caption {
    margin-top: 0.7rem;
}

.slide-caption h3 {
    font-size: 1.1rem;
}

.slide-caption p {
    margin: 0.35rem 0 0;
}

.carousel-arrow {
    position: absolute;
    top: calc(50% - 28px);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(8, 15, 29, 0.85);
    color: #d7e6ff;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 2;
}

.carousel-arrow.prev {
    left: 12px;
}

.carousel-arrow.next {
    right: 12px;
}

.carousel-dots {
    margin-top: 0.85rem;
    display: flex;
    justify-content: center;
    gap: 0.38rem;
}

.carousel-dots .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.carousel-dots .dot.is-active {
    background: var(--accent);
    border-color: var(--accent);
}

.usecase-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.usecase-card {
    padding: 0.94rem;
    transition: transform 170ms ease, border-color 170ms ease;
}

.usecase-card:hover {
    transform: translateY(-4px);
    border-color: rgba(90, 167, 255, 0.42);
}

.usecase-card p {
    margin-top: 0.4rem;
}

.marquee-wrap {
    margin-top: 1rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
}

.marquee {
    display: flex;
    gap: 1.8rem;
    padding: 0.58rem 1.2rem;
    min-width: max-content;
    animation: marquee 20s linear infinite;
}

.marquee span {
    color: #d5e5ff;
    font-weight: 600;
    font-size: 0.9rem;
}

.cta {
    padding-top: 2.7rem;
}

.cta-card {
    padding: 1.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(130deg, rgba(90, 167, 255, 0.24), rgba(123, 112, 255, 0.2));
}

.cta-card h2 {
    margin-bottom: 0.6rem;
}

.site-footer {
    padding: 2.4rem 0 2.8rem;
}

.footer-wrap {
    border-top: 1px solid var(--line);
    padding-top: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-wrap p {
    margin: 0;
}

.footer-wrap a {
    color: #c5ffe4;
    text-decoration: none;
    font-weight: 700;
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 540ms ease, transform 540ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes bob {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(1deg);
    }
}

@keyframes drift {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(24px, -18px, 0);
    }
}

@keyframes bg-drift-dark {
    0%, 100% {
        background-position: 0% 0%, 100% 100%, 50% 50%;
    }
    50% {
        background-position: 17% 12%, 83% 90%, 50% 50%;
    }
}

@keyframes bg-drift-light {
    0%, 100% {
        background-position: 0% 0%, 100% 0%, 100% 100%, 50% 50%;
    }
    50% {
        background-position: 16% 11%, 86% 8%, 82% 88%, 50% 50%;
    }
}

@keyframes grid-drift {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(26px, 18px, 0);
    }
}

@keyframes glow-breathe {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.72;
    }
}

body[data-theme="light"] {
    --bg-a: #ffffff;
    --bg-b: #f7faff;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-solid: #ffffff;
    --line: rgba(122, 149, 194, 0.28);
    --text: #1d2b45;
    --muted: #5e677b;
    --accent: #ef7f35;
    --accent-2: #f6b97f;
    --violet: #7fa7f7;
    --shadow: 0 18px 40px rgba(102, 128, 173, 0.16);
    background:
        radial-gradient(circle at 10% 8%, rgba(239, 127, 53, 0.14), transparent 38%),
        radial-gradient(circle at 92% 15%, rgba(129, 169, 255, 0.2), transparent 34%),
        radial-gradient(circle at 72% 88%, rgba(161, 193, 255, 0.18), transparent 30%),
        linear-gradient(165deg, #ffffff 0%, #fbfdff 52%, #f5f9ff 100%);
    background-size: 176% 176%, 164% 164%, 142% 142%, 100% 100%;
    animation: bg-drift-light 22s ease-in-out infinite;
}

body[data-theme="light"] .site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
}

body[data-theme="light"] .theme-toggle,
body[data-theme="light"] .btn-ghost,
body[data-theme="light"] .hero-metrics article,
body[data-theme="light"] .main-nav a:hover,
body[data-theme="light"] .main-nav a:focus-visible {
    background: rgba(239, 127, 53, 0.11);
}

body[data-theme="light"] .btn-primary {
    color: #fff;
    background: linear-gradient(140deg, #ef7f35, #ff9f52 52%, #ffbe79);
    box-shadow: 0 14px 28px rgba(239, 127, 53, 0.36);
}

body[data-theme="light"] .btn-ghost {
    color: #6e4a2f;
    border-color: rgba(214, 129, 58, 0.34);
}

body[data-theme="light"] .mock-top > span {
    background: rgba(54, 73, 108, 0.35);
}

body[data-theme="light"] .mock-top p,
body[data-theme="light"] .icon-pill span,
body[data-theme="light"] .explorer-btn,
body[data-theme="light"] .feature-list li,
body[data-theme="light"] #explorer-points li {
    color: #2d3c58;
}

body[data-theme="light"] .hero-tags span {
    color: #6a462d;
    border-color: rgba(232, 154, 89, 0.35);
    background: linear-gradient(130deg, rgba(255, 249, 242, 0.96), rgba(255, 241, 226, 0.86));
}

body[data-theme="light"] .brand span {
    color: #1f2b43;
}

body[data-theme="light"] .carousel-arrow {
    color: #2d3c58;
    background: rgba(255, 255, 255, 0.9);
}

body[data-theme="light"] .footer-wrap a {
    color: #d86f2e;
}

body[data-theme="light"] .grid-noise {
    opacity: 0.09;
    background-image:
        linear-gradient(rgba(122, 149, 194, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(122, 149, 194, 0.08) 1px, transparent 1px);
    background-size: 34px 34px;
}

body[data-theme="light"] .icon-pill img {
    filter: brightness(0) saturate(100%) invert(58%) sepia(45%) saturate(1767%) hue-rotate(342deg) brightness(98%) contrast(92%);
}

body[data-theme="light"] .feature-list-card,
body[data-theme="light"] .feature-image-card,
body[data-theme="light"] .control-sidebar,
body[data-theme="light"] .control-main,
body[data-theme="light"] .carousel,
body[data-theme="light"] .usecase-card,
body[data-theme="light"] .cta-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.92));
    box-shadow: 0 16px 34px rgba(96, 123, 165, 0.14);
}

body[data-theme="light"] .explorer-btn {
    color: #354668;
    border-color: rgba(214, 129, 58, 0.28);
    background: rgba(255, 255, 255, 0.6);
}

body[data-theme="light"] .explorer-btn small {
    color: #8f6a4d;
}

body[data-theme="light"] .explorer-btn:hover,
body[data-theme="light"] .explorer-btn:focus-visible {
    border-color: rgba(239, 127, 53, 0.56);
}

body[data-theme="light"] .explorer-btn.is-active {
    color: #ffffff;
    border-color: rgba(239, 127, 53, 0.68);
    background: linear-gradient(122deg, #ef7f35, #fca657 58%, #87a9ff);
}

body[data-theme="light"] .control-tags span,
body[data-theme="light"] .control-health article,
body[data-theme="light"] .control-stat {
    background: rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .control-health strong,
body[data-theme="light"] .control-stat strong {
    color: #1f2f49;
}

body[data-theme="light"] .feature-list li::before {
    color: #ef7f35;
}

body[data-theme="light"] .marquee-wrap {
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.96), rgba(243, 249, 255, 0.9));
    border-color: rgba(122, 149, 194, 0.34);
}

body[data-theme="light"] .marquee span {
    color: #425274;
}

body[data-theme="light"] .cta-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 236, 0.9), rgba(236, 245, 255, 0.9));
}

body[data-theme="light"] .site-header,
body[data-theme="light"] .footer-wrap {
    border-color: rgba(214, 129, 58, 0.24);
}

body[data-theme="light"] .backdrop-orb.orb-a {
    background: rgba(239, 127, 53, 0.2);
}

body[data-theme="light"] .backdrop-orb.orb-b {
    background: rgba(127, 167, 247, 0.22);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ===== How It Works ===== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.step-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(8px);
    padding: 1.3rem 1.1rem;
    position: relative;
    text-align: center;
    transition: transform 180ms ease, border-color 180ms ease;
}

.step-card:hover {
    transform: translateY(-4px);
    border-color: rgba(90, 167, 255, 0.42);
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--accent), var(--accent-2));
    color: #06131a;
    font-weight: 800;
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.step-card h3 {
    margin-bottom: 0.5rem;
}

.step-connector {
    position: absolute;
    top: 50%;
    right: -1.2rem;
    width: 1.2rem;
    height: 2px;
    background: var(--line);
}

.step-card:last-child .step-connector {
    display: none;
}

/* ===== Pricing ===== */
/* ===== Pricing carousel: one swipeable row of equal-width cards ===== */
.pricing-carousel { position: relative; }
.pricing-grid {
    display: flex;
    gap: 1.2rem;
    align-items: stretch;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0.6rem 0.3rem 0.4rem;
    scrollbar-width: none;              /* Firefox */
    -ms-overflow-style: none;           /* old Edge */
}
.pricing-grid::-webkit-scrollbar { display: none; }   /* Chrome/Safari */

/* Every card (incl. the former full-width "Custom" strip) is a fixed-width slide. */
.pricing-grid > .pricing-card {
    flex: 0 0 300px;
    max-width: 300px;
    scroll-snap-align: center;
}
/* Normalize the "talk to sales" card into a regular vertical slide inside the carousel. */
.pricing-card.pricing-card--wide {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    text-align: start;
}
.pricing-card--wide .pricing-features {
    display: block;
    margin: 0.6rem 0 0;
}

/* Prev/next arrows */
.pc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface-solid);
    color: var(--text);
    cursor: pointer;
    box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.6);
    transition: background 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
}
.pc-arrow:hover { background: rgba(127, 160, 220, 0.16); }
.pc-arrow:active { transform: translateY(-50%) scale(0.94); }
.pc-arrow.pc-prev { inset-inline-start: -14px; }
.pc-arrow.pc-next { inset-inline-end: -14px; }
.pc-arrow[hidden] { display: none; }
[dir="rtl"] .pc-arrow svg { transform: scaleX(-1); }

/* Dots */
.pc-dots {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.pc-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    padding: 0;
    background: var(--line);
    cursor: pointer;
    transition: background 0.15s ease, width 0.15s ease;
}
.pc-dot.is-active { width: 22px; background: var(--brand, #2f7bff); }

@media (max-width: 640px) {
    .pricing-grid > .pricing-card { flex-basis: 82vw; max-width: 82vw; }
    .pc-arrow { display: none; }   /* touch users swipe; arrows would crowd the small screen */
}

.pricing-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(8px);
    box-shadow: 0 14px 40px rgba(4, 9, 18, 0.45);
    padding: 1.3rem 1.1rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 180ms ease, border-color 180ms ease;
}

.pricing-card:hover {
    transform: translateY(-4px);
    border-color: rgba(90, 167, 255, 0.42);
}

.pricing-card--featured {
    border-color: rgba(90, 167, 255, 0.55);
    background: linear-gradient(160deg, rgba(90, 167, 255, 0.12), var(--surface));
    transform: scale(1.03);
}

.pricing-card--featured:hover {
    transform: scale(1.03) translateY(-4px);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, var(--accent), var(--accent-2));
    color: #06131a;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.28rem 0.72rem;
    border-radius: 999px;
    white-space: nowrap;
}

.pricing-header {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1rem;
}

.pricing-header h3 {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}

.pricing-price {
    margin: 0;
}

.price-amount {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text);
}

.price-period {
    color: var(--muted);
    font-size: 0.9rem;
}

.pricing-desc {
    margin: 0.5rem 0 0;
    font-size: 0.88rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.2rem;
    display: grid;
    gap: 0.52rem;
    flex: 1;
}

.pricing-features li {
    position: relative;
    padding-left: 1.3rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.pricing-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--ok);
    font-weight: 700;
}

.pricing-cta {
    width: 100%;
    text-align: center;
}

/* ===== Testimonials ===== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.testimonial-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(8px);
    box-shadow: 0 14px 40px rgba(4, 9, 18, 0.45);
    padding: 1.3rem 1.1rem;
    display: flex;
    flex-direction: column;
    transition: transform 180ms ease, border-color 180ms ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    border-color: rgba(90, 167, 255, 0.42);
}

.testimonial-quote {
    font-size: 0.96rem;
    line-height: 1.65;
    color: var(--text);
    font-style: italic;
    margin: 0 0 1rem;
    flex: 1;
    position: relative;
    padding-left: 1rem;
    border-left: 3px solid var(--accent);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-top: 1px solid var(--line);
    padding-top: 0.8rem;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--accent), var(--violet));
    color: #fff;
    font-weight: 800;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.testimonial-name {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
}

.testimonial-role {
    margin: 0.12rem 0 0;
    font-size: 0.78rem;
}

/* ===== FAQ Chat Layout ===== */
.faq-chat {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 1rem;
    min-height: 380px;
}

.faq-questions {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(8px);
    box-shadow: 0 14px 40px rgba(4, 9, 18, 0.45);
    padding: 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    overflow-y: auto;
}

.faq-q {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    border-radius: 12px;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: left;
    padding: 0.72rem 0.82rem;
    cursor: pointer;
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.faq-q:hover,
.faq-q:focus-visible {
    transform: translateX(3px);
    border-color: rgba(90, 167, 255, 0.5);
    color: var(--text);
    outline: none;
}

.faq-q.is-active {
    border-color: rgba(90, 167, 255, 0.7);
    background: linear-gradient(120deg, rgba(90, 167, 255, 0.26), rgba(123, 112, 255, 0.16));
    color: #fff;
}

.faq-answer-panel {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(8px);
    box-shadow: 0 14px 40px rgba(4, 9, 18, 0.45);
    padding: 1.4rem 1.3rem;
    display: flex;
    align-items: center;
}

.faq-answer-text {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.75;
    color: var(--text);
    animation: faq-fade-in 300ms ease both;
}

@keyframes faq-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Enhanced Footer ===== */
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 1.8rem;
    border-bottom: 1px solid var(--line);
}

.footer-brand p {
    margin: 0.7rem 0 0;
    font-size: 0.86rem;
    max-width: 30ch;
}

.footer-brand .brand {
    margin-bottom: 0.5rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.footer-col h4 {
    margin: 0 0 0.3rem;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text);
}

.footer-col a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 160ms ease;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.1rem;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.82rem;
}

.footer-legal {
    display: flex;
    gap: 1.2rem;
}

.footer-legal a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 160ms ease;
}

.footer-legal a:hover {
    color: var(--accent);
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(8, 15, 29, 0.88);
    backdrop-filter: blur(8px);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 250ms ease, transform 250ms ease, background 160ms ease;
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background: rgba(90, 167, 255, 0.3);
}

/* ===== Smooth Scrolling ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Light theme overrides for new sections ===== */
body[data-theme="light"] .step-number {
    color: #fff;
}

body[data-theme="light"] .pricing-badge {
    color: #fff;
}

body[data-theme="light"] .pricing-card,
body[data-theme="light"] .testimonial-card,
body[data-theme="light"] .step-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.92));
    box-shadow: 0 16px 34px rgba(96, 123, 165, 0.14);
}

body[data-theme="light"] .pricing-card--featured {
    background: linear-gradient(160deg, rgba(255, 247, 236, 0.98), rgba(255, 255, 255, 0.94));
    border-color: rgba(239, 127, 53, 0.45);
}

body[data-theme="light"] .faq-questions,
body[data-theme="light"] .faq-answer-panel {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.92));
    box-shadow: 0 16px 34px rgba(96, 123, 165, 0.14);
}

body[data-theme="light"] .faq-q {
    color: #354668;
    border-color: rgba(214, 129, 58, 0.28);
    background: rgba(255, 255, 255, 0.6);
}

body[data-theme="light"] .faq-q:hover,
body[data-theme="light"] .faq-q:focus-visible {
    border-color: rgba(239, 127, 53, 0.56);
}

body[data-theme="light"] .faq-q.is-active {
    color: #fff;
    border-color: rgba(239, 127, 53, 0.68);
    background: linear-gradient(122deg, #ef7f35, #fca657 58%, #87a9ff);
}

body[data-theme="light"] .faq-answer-text {
    color: #2d3c58;
}

body[data-theme="light"] .back-to-top {
    background: rgba(255, 255, 255, 0.92);
    color: #1f2b43;
}

body[data-theme="light"] .back-to-top:hover {
    background: rgba(239, 127, 53, 0.2);
}

body[data-theme="light"] .footer-col a:hover,
body[data-theme="light"] .footer-legal a:hover {
    color: #d86f2e;
}

body[data-theme="light"] .pricing-features li::before {
    color: #ef7f35;
}

body[data-theme="light"] .testimonial-quote {
    border-left-color: #ef7f35;
}

/* ===== 3-step before/after visual ===== */
.transform-visual {
    margin-top: 1.6rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.transform-pane {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(8px);
    padding: 1.1rem;
    min-height: 168px;
}

.transform-pane .pane-label {
    margin: 0 0 0.6rem;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--muted);
}

.transform-pane.before .pane-label {
    color: #ff9c9c;
}

.transform-pane.after .pane-label {
    color: var(--ok);
}

.excel-rows {
    display: grid;
    gap: 0.34rem;
}

.excel-rows span {
    height: 13px;
    border-radius: 4px;
    background: repeating-linear-gradient(90deg, rgba(255, 156, 156, 0.22) 0 24%, transparent 24% 25%);
    border: 1px dashed rgba(255, 156, 156, 0.35);
}

.app-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.app-chips span {
    padding: 0.32rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(99, 240, 178, 0.4);
    background: rgba(99, 240, 178, 0.1);
    color: #c9ffe9;
    font-size: 0.78rem;
    font-weight: 600;
}

.transform-arrow {
    font-size: 1.6rem;
    color: var(--accent);
    font-weight: 800;
}

/* ===== Demo frame placeholder ===== */
.demo-frame {
    margin-top: 0.4rem;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--line);
    background: rgba(255, 255, 255, 0.03);
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 1.5rem;
}

.demo-frame .demo-play {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--accent), var(--accent-2));
    color: #06131a;
    font-size: 1.5rem;
    display: grid;
    place-items: center;
    margin: 0 auto 0.9rem;
}

.demo-frame p {
    margin: 0;
    font-weight: 600;
    color: var(--text);
}

.demo-frame small {
    display: block;
    margin-top: 0.3rem;
    color: var(--muted);
}

/* ===== Why it lasts contrast ===== */
.contrast-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
}

.contrast-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(8px);
    padding: 1.3rem 1.2rem;
}

.contrast-card h3 {
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contrast-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.contrast-card li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.92rem;
    color: #dce8ff;
}

.contrast-card.bad {
    border-color: rgba(255, 138, 138, 0.32);
}

.contrast-card.bad li::before {
    content: "\2715";
    color: #ff8a8a;
}

.contrast-card.good {
    border-color: rgba(99, 240, 178, 0.4);
    background: linear-gradient(160deg, rgba(99, 240, 178, 0.08), var(--surface));
}

.contrast-card.good li::before {
    content: "\2713";
    color: var(--ok);
}

.contrast-card li::before {
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 800;
}

.lasts-quote {
    margin: 1.4rem auto 0;
    max-width: 56ch;
    text-align: center;
    font-family: "Outfit", "Plus Jakarta Sans", sans-serif;
    font-size: clamp(1.1rem, 2.4vw, 1.5rem);
    line-height: 1.4;
    color: var(--text);
    font-weight: 600;
}

.lasts-quote span {
    color: var(--accent);
}

/* ===== Product / company footer note ===== */
.footer-parent {
    margin-top: 0.9rem;
    font-size: 0.84rem;
}

.footer-parent a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

body[data-theme="light"] .transform-pane,
body[data-theme="light"] .contrast-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.92));
    box-shadow: 0 16px 34px rgba(96, 123, 165, 0.14);
}

body[data-theme="light"] .contrast-card li {
    color: #2d3c58;
}

body[data-theme="light"] .demo-frame p {
    color: #1f2b43;
}

body[data-theme="light"] .demo-frame .demo-play {
    color: #fff;
}

body[data-theme="light"] .app-chips span {
    border-color: rgba(16, 145, 96, 0.35);
    background: rgba(16, 145, 96, 0.1);
    color: #107c41;
}

@media (max-width: 1040px) {
    .contrast-grid {
        grid-template-columns: 1fr;
    }

    .transform-visual {
        grid-template-columns: 1fr;
    }

    .transform-arrow {
        transform: rotate(90deg);
        justify-self: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    body,
    body::before,
    .grid-noise,
    .backdrop-orb,
    .float-card,
    .feature-image-card img,
    .marquee,
    .hero-center h1 {
        animation: none !important;
    }
}

@media (max-width: 1040px) {
    .hero-layout,
    .feature-list-grid,
    .control-panel-shell,
    .control-preview {
        grid-template-columns: 1fr;
    }

    .usecase-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* carousel stays a horizontal row on mobile (see .pricing-carousel rules); no grid reset here */

    .pricing-card--featured {
        transform: none;
    }

    .pricing-card--featured:hover {
        transform: translateY(-4px);
    }

    .steps-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin-inline: auto;
    }

    .step-connector {
        display: none;
    }

    .feature-icons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .faq-chat {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .faq-questions {
        flex-direction: row;
        flex-wrap: wrap;
        overflow-y: visible;
    }

    .faq-q {
        flex: 0 0 auto;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    .menu-toggle {
        display: inline-block;
        margin-left: auto;
    }

    .main-nav {
        position: absolute;
        top: 74px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        gap: 0.42rem;
        padding: 0.82rem 1.1rem;
        background: rgba(8, 14, 25, 0.98);
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
    }

    .main-nav.is-open {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    .theme-toggle {
        margin-left: auto;
    }

    .section {
        padding: 4rem 0;
    }

    .hero-metrics,
    .usecase-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.55rem;
    }

    .float-a,
    .float-b {
        position: static;
        width: 100%;
        margin-top: 0.6rem;
    }

    .carousel-track {
        min-height: 360px;
    }

    .slide img {
        height: 220px;
    }

    .cta-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.55rem;
    }

    .control-topbar {
        flex-direction: column;
    }

    .control-tags {
        justify-content: flex-start;
    }

    .control-health {
        grid-template-columns: 1fr;
    }
}

/* ===== Demo video embed (responsive 16:9) ===== */
.demo-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: #050b15;
}

.demo-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===== Language switcher ===== */
.lang-select {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-radius: 999px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.46rem 0.6rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.lang-select:focus-visible {
    outline: none;
    border-color: rgba(90, 167, 255, 0.6);
}

.lang-select option {
    color: #1d2b45;
}

body[data-theme="light"] .lang-select {
    background: rgba(239, 127, 53, 0.11);
}

/* ===== RTL (Arabic) support ===== */
[dir="rtl"] .main-nav {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .eyebrow,
[dir="rtl"] .control-kicker,
[dir="rtl"] .control-sidebar-head p,
[dir="rtl"] .footer-col h4 {
    letter-spacing: normal;
    text-transform: none;
}

[dir="rtl"] .step-connector {
    right: auto;
    left: -1.2rem;
}

[dir="rtl"] .carousel-arrow.prev {
    left: auto;
    right: 12px;
}

[dir="rtl"] .carousel-arrow.next {
    right: auto;
    left: 12px;
}

[dir="rtl"] .transform-arrow {
    transform: scaleX(-1);
}

/* Flip the bullet lists for RTL */
[dir="rtl"] .feature-list li,
[dir="rtl"] .pricing-features li,
[dir="rtl"] .contrast-card li,
[dir="rtl"] #explorer-points li {
    padding-left: 0;
    padding-right: 1.45rem;
}

[dir="rtl"] .feature-list li::before,
[dir="rtl"] .pricing-features li::before,
[dir="rtl"] .contrast-card li::before,
[dir="rtl"] #explorer-points li::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .explorer-btn small {
    text-align: left;
}

@media (max-width: 760px) {
    [dir="rtl"] .main-nav {
        margin-right: 0;
    }
}

/* ============================================================
   Colored section dividers (shared by index.html + ai-app-platform.html)
   A thin blue→teal gradient line at the top of every section after the
   first, plus a barely-there alternating band — adds rhythm between blocks.
   ============================================================ */
main > section { position: relative; }
main > section + section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(1180px, calc(100% - 2.4rem));
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(90, 167, 255, 0.55), rgba(99, 240, 178, 0.5), transparent);
    pointer-events: none;
}
main > section:nth-of-type(even) { background: rgba(148, 170, 209, 0.022); }

/* ============================================================
   Social proof — testimonials + track-record customer logos
   Shared by index.html and excel.html (markup) — styling lives
   only here so both pages stay in lockstep.
   ============================================================ */
.proof-quotes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
@media (max-width: 760px) { .proof-quotes { grid-template-columns: 1fr; } }

.proof-quote {
    margin: 0;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.4rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.proof-quote blockquote {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text);
    position: relative;
}
.proof-quote blockquote::before {
    content: "\201C";
    display: block;
    font-size: 2.4rem;
    line-height: 0.4;
    margin-bottom: 0.5rem;
    color: var(--brand, #2f7bff);
    opacity: 0.6;
}
.proof-quote figcaption {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: auto;
}
.proof-name { font-weight: 600; color: var(--text); font-size: 0.95rem; }
.proof-role { color: var(--muted); font-size: 0.85rem; }

/* Track-record logo strip (JS-populated; hidden until first logo loads) */
.proof-logos { margin-top: 2.4rem; text-align: center; }
.proof-logos[hidden] { display: none; }
.proof-logos-cap {
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 0.35rem;
}
.proof-logos-sub {
    font-size: 0.8rem;
    color: var(--muted);
    opacity: 0.85;
    margin: 0 0 1.4rem;
}
.proof-logos-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
}
.proof-logo {
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    /* Neutral light tile so any logo (dark, colored, transparent) reads in
       both light and dark theme without knowing the artwork. */
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    filter: grayscale(1);
    opacity: 0.82;
    transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.proof-logo:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: translateY(-2px);
}
