/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


:root {
    /* Typography — matches openclaw.ai exactly. Satoshi for body,
       Clash Display for headings. Fontshare-served, swap-display.
       HTML <head> in every page references the same Fontshare URL
       openclaw.ai uses, so the fonts are guaranteed loaded. */
    --font-body: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --font-display: "Clash Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --font-mono: "SF Mono", "Fira Code", "JetBrains Mono", monospace;

    /* Brand palette — also mirrored from openclaw.ai. The previous
       indigo (#6366f1) was carried over from an earlier Linear-inspired
       palette; openclaw uses coral-on-deep-navy as its identity. */
    --primary-color: #ff4d4d;        /* coral-bright (dark mode) */
    --primary-hover: #ff7079;        /* logo-gradient-start */
    --primary-focus: #e63946;        /* coral-mid */
    --secondary-color: #00e5cc;      /* cyan-bright (dark mode) */
    --background: #050810;           /* bg-deep (dark) */
    --surface: #0a0f1a;               /* bg-surface */
    --surface-2: #111827;             /* bg-elevated */
    --surface-3: #1b1c24;
    --text-primary: #f0f4ff;
    --text-secondary: #a5acb8;
    --text-tertiary: #7a8294;        /* bumped from #6b7280 for AA contrast on small caps (5.5:1 on --background) */
    --border: #20222b;
    --border-strong: #2d2f3a;
    --gradient-start: #ff4d4d;       /* coral → cyan gradient (openclaw signature) */
    --gradient-end: #00e5cc;
    --edge-highlight: rgba(255, 255, 255, 0.07);

    /* openclaw.ai brand-ramp tokens — pulled verbatim from the
       Layout.CwMxruYy.css the marketing site ships. Mirroring them
       here lets the wordmark + lobster glow render with pixel parity
       against openclaw.ai, since the animated-gradient + drop-shadow
       rules below reference identical variable names. */
    --coral-bright: #ff4d4d;
    --coral-mid:    #e63946;
    --coral-dark:   #991b1b;
    --cyan-bright:  #00e5cc;
    --cyan-glow:    rgba(0, 229, 204, 0.40);
    /* Lobster icon glow — coral by default, shifts to cyan on hover. */
    --logo-glow:        rgba(255, 77, 77, 0.40);
    --logo-glow-hover:  rgba(0, 229, 204, 0.60);
    /* `.title-main` on openclaw.ai animates this three-stop gradient
       through the wordmark: near-white → coral pivot at 52% → cyan
       tail. background-size:200% + a 6s position walk make the
       highlight glide. */
    --hero-title-start: #f0f4ff;
    --hero-title-end:   #00e5cc;
}

body {
    font-family: var(--font-body);
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    /* Stable scrollbar gutter avoids ~15px content shift when modals or
       images cause overflow to toggle. */
    position: relative;
}

/* TL;DR summary box — sits right after H1 on blog posts, quotes the
   meta description. Targets Google AI Overviews + Bing Copilot, which
   both lift the first ~150 words for the answer block. */
.tldr-box {
    background: linear-gradient(135deg, rgba(0, 229, 204, 0.07), rgba(255, 77, 77, 0.04));
    border-left: 4px solid var(--secondary-color);
    border-radius: 0 12px 12px 0;
    padding: 20px 24px;
    margin: 0 0 32px 0;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-secondary);
}
.tldr-box .tldr-label {
    margin: 0 0 6px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--secondary-color);
    font-weight: 700;
}
.tldr-box .tldr-body {
    margin: 0;
    color: var(--text-primary);
}

/* Headings use Clash Display — the same display face openclaw.ai
   uses for hero + section titles. Slight negative letter-spacing
   tightens the glyphs at large sizes; line-height 1.15 is openclaw's
   default rhythm. Per-page overrides retain font-size; this only
   imposes the family + tracking. */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
    line-height: 1.15;
}

/* ─── Star-sky background ──────────────────────────────────────────
   Mirrors openclaw.ai exactly. Two stacked fixed layers behind all
   page content:
     body::before  — eight radial-gradient "stars" (white + coral +
                     cyan) tiled at 350×200, twinkling 8s alternate
                     so the constellation breathes without distracting
     body::after   — three soft nebula ellipses (coral / cyan / coral)
                     giving the canvas its branded glow
   Both have pointer-events:none and z-index:0 so they don't intercept
   clicks; page content sits in its own stacking context above. The
   previous film-grain effect was removed — the star + nebula combo
   does the same "not flat #050810" job and matches the official site. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(2px 2px at 20px 30px,   rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 40px 70px,   rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 90px 40px,   rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(2px 2px at 130px 80px,  rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 160px 120px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(2px 2px at 200px 60px,  rgba(0, 229, 204, 0.6),  transparent),
        radial-gradient(1px 1px at 250px 150px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(2px 2px at 300px 40px,  rgba(255, 77, 77, 0.4),  transparent);
    background-size: 350px 200px;
    animation: twinkle 8s ease-in-out infinite alternate;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(255, 77, 77, 0.12), transparent 50%),
        radial-gradient(ellipse 60% 60% at 80% 30%, rgba(0, 229, 204, 0.08), transparent 50%),
        radial-gradient(ellipse 90% 70% at 50% 90%, rgba(255, 77, 77, 0.06), transparent 50%);
}

@keyframes twinkle {
    0%   { opacity: 0.4; }
    100% { opacity: 0.7; }
}

/* Anchor the page content above the fixed star/nebula layers.
   Without this, body content (z-index: auto) competes with the
   pseudo-elements (z-index: 0) and individual elements can render
   underneath. Lifting visible body children to z-index: 1 +
   position: relative is the canonical fix. The :not() excludes
   non-rendering tags (script/noscript/style/template) which don't
   benefit from positioning and shouldn't introduce stacking
   contexts. */
body > *:not(script):not(noscript):not(style):not(template):not(.browse-modal):not(.lightbox-overlay):not(.chat-widget):not(header):not(nav.navbar) {
    position: relative;
    z-index: 1;
}

/* The navbar (whether wrapped in <header> on EN root pages or rendered
   as a bare <nav class="navbar"> body child on the 7 lang homepages)
   needs a higher z-index than <main>/<footer>. The sticky navbar hosts
   the .lang-switcher dropdown panel, and that dropdown extends BELOW
   the navbar's box into <main>'s hero territory. Same z-index + later
   DOM order = <main> paints over the navbar's stacking context →
   dropdown invisible. Bumping to z-index:100 keeps it above main(:1)
   + footer(:1) but below modals (10000) and the chat widget. Stays
   above the star/nebula pseudo-elements at z-index:0. */
body > header,
body > nav.navbar {
    position: relative;
    z-index: 100;
}

@media (prefers-reduced-motion: reduce) {
    body::before { animation: none; opacity: 0.5; }
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px; /* offset for sticky navbar when jumping to anchors */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Scroll-reveal — single shared IntersectionObserver in main.js adds
   `is-visible` once an element crosses the viewport. Variants:
     data-reveal               — fade-up (default)
     data-reveal="left"        — slide in from left
     data-reveal="right"       — slide in from right
     data-reveal="scale"       — scale-up from 0.96
     data-reveal-delay="<ms>"  — per-element stagger (transition-delay)
   prefers-reduced-motion: shown immediately at first paint. */
[data-reveal] {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translate3d(-24px, 0, 0); }
[data-reveal="right"] { transform: translate3d(24px, 0, 0); }
[data-reveal="scale"] { transform: scale(0.96); }
[data-reveal].is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}
@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(8, 9, 13, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    /* High z-index so dropdowns (like .lang-menu at 10000) clear any
       child stacking context further down the page (.hero-content has
       z-index:1 which can compete on some browsers). */
    z-index: 9000;
    padding: 14px 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
}

/* Wordmark — matches openclaw.ai's `.title-main` exactly. Three-stop
   gradient (near-white → coral → cyan) clipped to the text glyphs, with
   the 200%-wide background walking left↔right every 6 s for a soft
   shimmer. Reuses the pre-existing `gradient-shift` keyframe (same
   definition openclaw.ai ships, just renamed). Browsers without
   `background-clip: text` fall back to the solid `--coral-bright`
   colour so the wordmark stays legible. */
.logo-text {
    background: linear-gradient(135deg,
        var(--hero-title-start) 0%,
        var(--coral-bright)     52%,
        var(--hero-title-end)   100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--coral-bright); /* fallback for non-webkit browsers */
    animation: gradient-shift 6s ease infinite;
}

/* Lobster — adds the coral drop-shadow halo openclaw.ai puts on its
   logo SVG. Coral by default, snaps to cyan on hover to signal
   interactivity. Composed with the pre-existing wiggle/excited
   keyframes via `filter`, which doesn't conflict with the `transform`
   the wiggle animation drives. */
.logo-icon {
    font-size: 56px;
    display: inline-block;
    animation: lobster-wiggle 3s ease-in-out infinite;
    cursor: default;
    filter: drop-shadow(0 0 20px var(--logo-glow));
    transition: filter 0.3s ease;
}

.logo-icon:hover {
    animation: lobster-excited 0.6s ease-in-out infinite;
    filter: drop-shadow(0 0 30px var(--logo-glow-hover));
}

/* Some pages wrap .logo in an <a> back to the homepage — the default
   link underline through the gradient wordmark reads as a rendering
   glitch, so suppress it there. */
a:has(> .logo) {
    text-decoration: none;
}

/* Fluent 3D lobster (MIT, microsoft/fluentui-emoji) replaces the raw
   🦞 glyph so Windows/macOS/mobile all render identical logo art.
   Sized in em so every .logo-icon font-size (nav, footer 18px)
   scales it exactly like the emoji it replaced. */
.logo-icon img {
    width: 1em;
    height: 1em;
    display: block;
    object-fit: contain;
}

@keyframes lobster-wiggle {
    0%, 100% { transform: rotate(0deg); }
    15%      { transform: rotate(-8deg) translateY(-2px); }
    30%      { transform: rotate(6deg); }
    45%      { transform: rotate(-4deg) translateY(-1px); }
    60%      { transform: rotate(3deg); }
    75%      { transform: rotate(-2deg); }
}

@keyframes lobster-excited {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25%      { transform: rotate(-12deg) scale(1.1); }
    50%      { transform: rotate(12deg) scale(1.05); }
    75%      { transform: rotate(-8deg) scale(1.1); }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: nowrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Language Switcher — <details> dropdown
   Closed: small button [globe + EN + chevron]
   Open:   dropdown panel listing all 6 languages.
   Pure CSS + tiny JS in main.js for click-outside-to-close. */
.lang-switcher {
    position: relative;
    font-size: 13px;
}

/* Hide the default <summary> disclosure marker so the chevron we draw
   ourselves is the only indicator. */
.lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.lang-trigger::-webkit-details-marker { display: none; }
.lang-trigger::marker { content: ""; }

.lang-trigger:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
    background: var(--surface-2);
}

.lang-icon {
    opacity: 0.7;
    flex-shrink: 0;
}

.lang-current {
    letter-spacing: 0.04em;
}

.lang-chevron {
    opacity: 0.7;
    transition: transform 0.18s ease;
}

.lang-switcher[open] .lang-trigger {
    color: var(--text-primary);
    border-color: rgba(0, 229, 204, 0.45);
    background: var(--surface-2);
}

.lang-switcher[open] .lang-chevron {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    padding: 6px;
    /* Fully opaque #1c2333 (lighter than --surface-2) so the hero glow
       behind reads as DARK page bg, not "we have a translucent panel".
       No backdrop-filter — that was leaking the glow through visually. */
    background: #1c2333;
    border: 1px solid #2d3548;
    border-radius: 12px;
    /* Extra-strong shadow + a faint coral outline so the panel reads as
       distinctly elevated above the hero. */
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.85),
        0 4px 12px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 77, 77, 0.12);
    display: flex;
    flex-direction: column;
    gap: 2px;
    /* Escape any stacking context the hero-content might create
       (.hero-content has z-index: 1 — without these huge values, on
       some browsers the dropdown lands BEHIND the hero h1 text). */
    z-index: 10000;
    animation: lang-menu-in 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes lang-menu-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 7px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: background 0.1s ease, color 0.1s ease;
}

.lang-item:hover {
    background: var(--surface-2);
    color: var(--text-primary);
}

.lang-item.is-active {
    background: rgba(0, 229, 204, 0.08);
    color: var(--text-primary);
    font-weight: 600;
}

.lang-name {
    flex: 1;
}

.lang-code {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.lang-item.is-active .lang-code {
    color: var(--secondary-color);
}

@media (prefers-reduced-motion: reduce) {
    .lang-menu { animation: none; }
    .lang-chevron { transition: none; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 77, 77, 0.30);
}

.btn-secondary {
    background: var(--surface-2);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: var(--surface-2);
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
    position: relative;
    overflow: hidden;
}

/* CTA shimmer — diagonal light-sweep on hover. The pseudo-element
   sits off-canvas to the left and translates across the button on
   hover, simulating a sheen. Pure CSS, no JS, no perf cost. */
.btn-large::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        100deg,
        transparent 0%,
        rgba(255, 255, 255, 0.18) 50%,
        transparent 100%
    );
    pointer-events: none;
    transition: left 0.7s ease;
}

.btn-large:hover::after {
    left: 130%;
}

@media (prefers-reduced-motion: reduce) {
    .btn-large::after {
        display: none;
    }
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* Hero Section */
.hero {
    padding: 56px 0 64px;
    background:
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(255, 77, 77, 0.14) 0%, transparent 70%),
        radial-gradient(ellipse 40% 30% at 50% 100%, rgba(0, 229, 204, 0.06) 0%, transparent 70%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 229, 204, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 204, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    background-position: -1px -1px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(0, 0, 0, 0.6) 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(0, 0, 0, 0.6) 0%, transparent 80%);
    pointer-events: none;
}

/* Drifting ambient glows behind the hero. Four blurred radial blobs
   on independent slow loops — gives the hero a "live" feel without
   committing to canvas/JS animation. Each blob runs on its own
   composite layer (will-change) so the browser keeps it on the GPU. */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    will-change: transform;
}

.hero-glow-1 {
    width: 580px;
    height: 580px;
    top: -180px;
    right: -120px;
    background: var(--coral-bright);
    opacity: 0.16;
    animation: hero-drift-1 28s ease-in-out infinite alternate;
}

.hero-glow-2 {
    width: 480px;
    height: 480px;
    bottom: -160px;
    left: -120px;
    background: var(--cyan-bright);
    opacity: 0.10;
    animation: hero-drift-2 34s ease-in-out infinite alternate;
}

.hero-glow-3 {
    width: 420px;
    height: 420px;
    top: 18%;
    left: -140px;
    background: var(--primary-hover);
    opacity: 0.07;
    animation: hero-drift-3 40s ease-in-out infinite alternate;
}

.hero-glow-4 {
    width: 360px;
    height: 360px;
    bottom: 8%;
    right: -120px;
    background: var(--cyan-bright);
    opacity: 0.06;
    animation: hero-drift-4 46s ease-in-out infinite alternate;
}

@keyframes hero-drift-1 {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-80px, 60px, 0) scale(1.08); }
}
@keyframes hero-drift-2 {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(120px, -50px, 0) scale(0.92); }
}
@keyframes hero-drift-3 {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(60px, 80px, 0) scale(1.12); }
}
@keyframes hero-drift-4 {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-90px, -70px, 0) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-glow-1,
    .hero-glow-2,
    .hero-glow-3,
    .hero-glow-4 {
        animation: none;
    }
}

.hero-content {
    text-align: center;
    /* Hero text columns (h1 / intro) cap at 760 / 660px below, so this
       wider value mostly widens the chat-container-wrapper underneath. */
    max-width: 1080px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 4px 12px 4px 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.hero-eyebrow .eyebrow-pill {
    background: linear-gradient(135deg, var(--primary-color), var(--gradient-end));
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 9999px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-eyebrow .eyebrow-dot {
    color: var(--text-tertiary);
}

.hero-title-sm {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.8px;
    margin-bottom: 18px;
    /* Same animated three-stop gradient openclaw.ai uses on its hero
       `.title-main`. Renders the whole H1 in white→coral→cyan with the
       6 s shimmer. The inner `<span class="gradient-text">` is neutered
       below so the sweep flows through it uninterrupted. */
    background: linear-gradient(135deg,
        var(--hero-title-start) 0%,
        var(--coral-bright)     52%,
        var(--hero-title-end)   100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--text-primary); /* fallback when background-clip:text isn't supported */
    animation: gradient-shift 6s ease infinite;
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}

/* The nested emphasis span restarts its own gradient mid-sentence,
   chopping the headline into three color blocks. Dropping its private
   background lets the parent H1's clip flow one continuous
   white→coral→cyan sweep across the whole line. */
.hero-title-sm .gradient-text {
    background: none;
    animation: none;
}

.hero-intro {
    max-width: 820px;
    margin: 0 auto 28px;
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: -0.05px;
    color: var(--text-secondary);
}

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

/* Drops the legacy 4-colour gradient (coral / cyan / purple #a78bfa /
   coral) and aligns with openclaw.ai's three-stop palette so every
   gradient title on the site reads from the same brand vocabulary.
   The purple stop was a holdover from an earlier Linear-inspired
   palette and was the one off-brand colour still appearing on the
   hero. */
.gradient-text {
    background: linear-gradient(135deg,
        var(--hero-title-start) 0%,
        var(--coral-bright)     52%,
        var(--hero-title-end)   100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 6s ease infinite;
}

@keyframes gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Download stack — button + caption below, paired buttons side-by-side */
.hero-download {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
    margin-top: 28px;
}

.dl-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.dl-meta {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.dl-meta a {
    color: var(--secondary-color);
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
}

.dl-meta a:hover {
    border-bottom-style: solid;
}

.dl-meta[data-hide-switch] .dl-meta-sep,
.dl-meta[data-hide-switch] #btn-macos-switch {
    display: none;
}

@media (max-width: 520px) {
    .hero-download { gap: 12px; }
    .dl-stack { width: 100%; }
    .dl-stack .btn { width: 100%; }
}

/* Download count in hero */
.hero-download-count {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.hero-download-count .count-highlight {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Download button pulse */
.btn-primary.btn-large {
    animation: btn-glow 3s ease-in-out infinite;
}

@keyframes btn-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); }
    50%      { box-shadow: 0 0 24px 4px rgba(255, 77, 77, 0.30); }
}

.btn-primary.btn-large:hover {
    animation: none;
}

/* Trust rail — "Works with Claude, ChatGPT, Gemini ..." */
.hero-trust-rail {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 28px;
    opacity: 0.92;
}

.hero-trust-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-right: 4px;
}

.hero-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.hero-trust-item:hover {
    color: var(--text-primary);
}

.hero-trust-item .trust-glyph {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    line-height: 1;
}

/* Channel badges */
.channel-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.channel-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.channel-badge:hover {
    opacity: 1;
}

.channel-badge svg {
    width: 18px;
    height: 18px;
    min-width: 18px;
    max-width: 18px;
    min-height: 18px;
    max-height: 18px;
    flex-shrink: 0;
}

/* Decorative section dividers — replace plain top borders with a
   centered gradient hairline that fades to transparent at the edges.
   Lower-key than a hard border and reads as a deliberate accent
   instead of utilitarian rule. The "+ position: relative" is set in
   the section blocks themselves so the absolute child anchors locally. */
.features-section,
.screenshots-section,
.howto-section,
.compare-section,
.facts-section,
.faq-section {
    position: relative;
}

.features-section::before,
.screenshots-section::before,
.howto-section::before,
.compare-section::before,
.facts-section::before,
.faq-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    max-width: 480px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 77, 77, 0.0) 10%,
        rgba(255, 77, 77, 0.40) 38%,
        rgba(0, 229, 204, 0.40) 62%,
        rgba(0, 229, 204, 0.0) 90%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Animated metric marquee — thin auto-scrolling product-fact strip
   between hero and the topology section. Items are duplicated in the
   DOM so the loop can translate -50% and seam invisibly. */
.metric-marquee {
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background:
        linear-gradient(180deg, var(--surface), var(--surface-2));
    padding: 14px 0;
    /* Edge fades so items dissolve into the canvas instead of clipping. */
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 48px;
    width: max-content;
    animation: marquee-scroll 36s linear infinite;
    will-change: transform;
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.marquee-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 77, 77, 0.14);
}

@keyframes marquee-scroll {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .marquee-track { animation: none; }
}

/* Topology section — the animated channel→hub→AI flow diagram. */
.topology-section {
    padding: 96px 0 88px;
    background:
        radial-gradient(ellipse 60% 40% at 50% 50%, rgba(0, 229, 204, 0.06), transparent 70%),
        var(--background);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.section-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--secondary-color);
    margin-bottom: 14px;
    padding: 4px 12px;
    background: rgba(0, 229, 204, 0.08);
    border: 1px solid rgba(0, 229, 204, 0.25);
    border-radius: 9999px;
}

.topology-stage {
    position: relative;
    max-width: 1100px;
    margin: 56px auto 0;
    aspect-ratio: 1200 / 540;
}

.topology-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Channel/AI labels sit absolutely on top of the SVG so the text stays
   crisp at any size and the SVG handles the geometry. The grid columns
   align to the SVG node x-coordinates (120/312/504/696/888/1080 of 1200). */
.topology-row {
    position: absolute;
    left: 0;
    right: 0;
    display: grid;
    z-index: 2;
    pointer-events: none;
}

.topology-row-top {
    top: 0;
    grid-template-columns: repeat(6, 1fr);
}

.topology-row-bottom {
    bottom: 0;
    /* AI provider columns at x=170/385/600/815/1030 — 5 evenly-spaced columns. */
    grid-template-columns: repeat(5, 1fr);
    /* Slight inward indent so labels visually align with the SVG endpoints. */
    padding: 0 calc(170px / 1200 * 100%) 0 calc(170px / 1200 * 100%);
}

.topology-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

.topology-row-bottom .topology-node {
    flex-direction: column-reverse;
}

.node-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.topology-node:hover .node-icon {
    transform: translateY(-2px);
    border-color: rgba(0, 229, 204, 0.45);
    box-shadow: 0 6px 20px rgba(0, 229, 204, 0.16);
}

.node-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.topology-node:hover .node-glyph {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 229, 204, 0.16);
}

.node-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

@media (prefers-reduced-motion: reduce) {
    .topology-pulses circle {
        animation: none;
    }
    /* SVG <animateMotion> doesn't honor prefers-reduced-motion natively;
       hide pulses entirely when reduced motion is requested. */
    .topology-pulses {
        display: none;
    }
}

@media (max-width: 768px) {
    .topology-stage {
        aspect-ratio: 4 / 5;
        max-width: 100%;
    }
    .node-label {
        font-size: 11px;
    }
    .node-icon, .node-glyph {
        width: 36px;
        height: 36px;
    }
}

/* Features section */
.features-section {
    padding: 96px 0;
    /* `background: transparent` so the fixed star-sky + nebula on
       body::before/::after stay visible through this section. The
       body itself paints var(--background), so removing the section
       paint produces the same colour visually but no longer masks
       the constellation. Same change applied to .howto-section and
       .compare-section below. */
    background: transparent;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 24px;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    overflow: hidden;
    /* Mouse-spotlight CSS variables (set by main.js pointermove handler).
       Default to off-canvas so the gradient is invisible until the
       cursor enters the grid. */
    --mx: -200px;
    --my: -200px;
}

/* Cursor-tracked radial spotlight. ::after sits over the card, picks
   up the variables, and renders a soft glow at the cursor position.
   Stripe + Linear use this same trick. */
.feature-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        420px circle at var(--mx) var(--my),
        rgba(255, 77, 77, 0.12),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.features-grid:hover .feature-card::after {
    opacity: 1;
}

/* Linear-style top edge highlight — "pixel rendered" lift */
.feature-card::before,
.howto-step::before,
.screenshot-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--edge-highlight), transparent);
    pointer-events: none;
    border-radius: 1px;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 77, 77, 0.14) inset;
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 14px;
    display: block;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: 44px;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -1.4px;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.section-header p {
    font-size: 18px;
    line-height: 1.55;
    letter-spacing: -0.1px;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
}

/* Footer */
.footer {
    background: #080b10;
    color: var(--text-secondary);
    padding: 40px 0 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.footer-logo .logo-icon {
    font-size: 18px;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 12px;
}

.footer-section h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 6px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
}

/* Screenshots Section */
.screenshots-section {
    padding: 96px 0;
    background:
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(0, 229, 204, 0.05) 0%, transparent 70%),
        var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.screenshot-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-2);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    margin: 0;
}

.screenshot-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45),
                0 0 0 1px rgba(0, 229, 204, 0.18);
    border-color: rgba(0, 229, 204, 0.45);
}

.window-chrome {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    background:
        linear-gradient(180deg, var(--surface-3), var(--surface-2));
    border-bottom: 1px solid var(--border);
    user-select: none;
}

.chrome-dots {
    display: inline-flex;
    gap: 6px;
}

.chrome-dots span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.chrome-dots span:nth-child(1) { background: #ff5f57; }
.chrome-dots span:nth-child(2) { background: #febc2e; }
.chrome-dots span:nth-child(3) { background: #28c840; }

.chrome-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    margin-left: auto;
    margin-right: auto;
    transform: translateX(-21px); /* visually re-center accounting for the dots cluster on the left */
}

.screenshot-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 2634 / 1596;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border);
}

.screenshot-caption {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#lightbox.active {
    display: flex;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: lightbox-in 0.2s ease;
}

@keyframes lightbox-in {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
    display: block;
}

.lightbox-caption {
    color: #94a3b8;
    font-size: 14px;
    text-align: center;
    max-width: 600px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 48px;
    line-height: 1;
    padding: 8px 14px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    border-radius: 8px;
    z-index: 10;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-prev {
    left: -60px;
}

.lightbox-next {
    right: -60px;
}

@media (max-width: 768px) {
    .lightbox-prev { left: -5px; }
    .lightbox-next { right: -5px; }
}

/* How it works (5-step ordered grid) */
.howto-section {
    padding: 96px 0;
    background: transparent; /* see .features-section above */
    border-top: 1px solid var(--border);
}

.howto-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    counter-reset: howto-counter;
}

.howto-step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 22px 24px;
    position: relative;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.howto-step:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.howto-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(255, 77, 77, 0.30);
}

.howto-step h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.howto-step p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.howto-step code {
    background: rgba(0, 229, 204, 0.10);
    color: var(--secondary-color);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12.5px;
}

/* Comparison table */
.compare-section {
    padding: 96px 0;
    background: transparent; /* see .features-section above */
    border-top: 1px solid var(--border);
}

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

.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: var(--text-secondary);
    min-width: 720px;
}

.compare-table thead th {
    background: var(--surface-2);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 14px;
    text-align: left;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.compare-table thead th:nth-child(2) {
    color: var(--secondary-color);
}

.compare-table tbody th {
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border);
    width: 28%;
}

.compare-table tbody td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    line-height: 1.5;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
    border-bottom: none;
}

.compare-table .cell-good {
    color: var(--secondary-color);
    font-weight: 600;
}

.compare-table tbody td:nth-child(2) {
    background: rgba(0, 229, 204, 0.05);
}

.compare-note {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Quick facts */
.facts-section {
    padding: 96px 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0;
}

.fact {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    transition: border-color 0.15s ease;
}

.fact:hover {
    border-color: var(--border-strong);
}

.fact dt {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin: 0 0 6px;
}

.fact dd {
    margin: 0;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
}

.fact dd a {
    color: var(--secondary-color);
    text-decoration: none;
}

.fact dd a:hover {
    text-decoration: underline;
}

/* FAQ */
.faq-section {
    padding: 96px 0 112px;
    background:
        radial-gradient(ellipse 60% 50% at 50% 100%, rgba(255, 77, 77, 0.05) 0%, transparent 70%),
        var(--surface);
    border-top: 1px solid var(--border);
}

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

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

.faq-item[open] {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(255, 77, 77, 0.14);
}

.faq-question {
    list-style: none;
    cursor: pointer;
    padding: 18px 22px;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: color 0.2s;
}

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

.faq-question::after {
    content: "+";
    color: var(--primary-color);
    font-size: 24px;
    line-height: 1;
    font-weight: 400;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.faq-item[open] .faq-question::after {
    content: "−";
    transform: rotate(0);
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-answer {
    padding: 0 22px 20px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

.faq-answer p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .screenshots-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .howto-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links a:not(.btn) {
        display: none;
    }

    .nav-links .lang-switcher {
        display: none;
    }

    .hero {
        padding: 24px 0 32px;
    }

    .hero-title-sm {
        font-size: 24px;
        letter-spacing: -0.5px;
    }

    .hero-intro {
        font-size: 14px;
    }

    .hero-eyebrow {
        font-size: 11px;
        margin-bottom: 14px;
    }

    .hero-trust-rail {
        gap: 16px;
    }

    .howto-steps {
        grid-template-columns: 1fr;
    }

    .compare-table {
        font-size: 13px;
    }

    .compare-table thead th,
    .compare-table tbody th,
    .compare-table tbody td {
        padding: 10px 14px;
    }

    .faq-question {
        font-size: 15px;
        padding: 16px 18px;
    }

    .faq-answer {
        padding: 0 18px 18px;
        font-size: 14px;
    }

    .section-header h2 {
        font-size: 28px;
    }

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

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

    .channel-badges {
        gap: 14px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .btn-large {
        padding: 14px 24px;
        font-size: 16px;
    }
}

/* ────────────────────────────────────────────────────────────────
   Skills live browser (openclaw-skills.html)
   Hybrid SSG/CSR: top 30 cards are pre-rendered at deploy time for
   SEO + LCP; client-side JS fetches the full catalog on first
   interaction (search/sort/more) for filtering against all items.
   ──────────────────────────────────────────────────────────────── */

.browse-section {
    padding: 80px 0 120px;
    background: var(--background);
}

.browse-section .container {
    max-width: 1200px;
}

.browse-header {
    text-align: center;
    margin-bottom: 32px;
}

.browse-header h2 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.6px;
    margin: 0 0 8px;
    color: var(--text-primary);
}

.browse-header p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

.browse-tabs {
    display: inline-flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 24px;
}

.browse-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.browse-tab:hover {
    color: var(--text-primary);
}

.browse-tab.is-active {
    background: var(--coral-bright);
    color: #050810;
}

.browse-tab .count {
    font-size: 12px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    font-weight: 700;
}
.browse-tab:not(.is-active) .count {
    background: var(--surface-2);
    color: var(--text-tertiary);
}

.browse-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    align-items: center;
}

.browse-search {
    flex: 1;
    min-width: 240px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.browse-search::placeholder { color: var(--text-tertiary); }
.browse-search:focus {
    outline: none;
    border-color: var(--coral-bright);
    background: var(--surface-2);
}

.browse-sort {
    padding: 12px 32px 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
        linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
    background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}
.browse-sort:focus {
    outline: none;
    border-color: var(--coral-bright);
}

.browse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.browse-grid[hidden] { display: none; }

.browse-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.browse-card:hover {
    border-color: var(--coral-bright);
    background: var(--surface-2);
    transform: translateY(-2px);
}

.browse-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.browse-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0;
    word-break: break-word;
}

.browse-card-badge {
    flex-shrink: 0;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 77, 77, 0.15);
    color: var(--coral-bright);
}
.browse-card-badge.is-official {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.browse-card-summary {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.browse-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-tertiary);
    flex-wrap: wrap;
}

.browse-card-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.browse-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
    margin-top: auto;
}
.browse-card-cta:hover {
    background: var(--coral-bright);
    border-color: var(--coral-bright);
    color: #050810;
}

.browse-card-owner {
    font-size: 11px;
    color: var(--text-tertiary);
}

.browse-more {
    display: block;
    margin: 0 auto;
    padding: 14px 28px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.browse-more:hover {
    border-color: var(--coral-bright);
    background: var(--surface-2);
}
.browse-more[hidden] { display: none; }

.browse-fallback {
    text-align: center;
    font-size: 14px;
    color: var(--text-tertiary);
    margin-top: 20px;
}
.browse-fallback a {
    color: var(--coral-bright);
    text-decoration: none;
    font-weight: 600;
}
.browse-fallback a:hover { text-decoration: underline; }

.browse-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 15px;
}

@media (max-width: 640px) {
    .browse-section { padding: 60px 0 80px; }
    .browse-header h2 { font-size: 28px; }
    .browse-controls { flex-direction: column; align-items: stretch; }
    .browse-grid { grid-template-columns: 1fr; }
}

/* "Sort by" label sitting between the search box and sort dropdown —
   mirrors ClawHub's labeled control pattern. */
.browse-sort-label {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-left: auto;
    margin-right: -4px;
}
@media (max-width: 640px) {
    .browse-sort-label { margin: 0 0 -6px; }
}

/* Card actions: Details (secondary) + Download (primary) sit side-by-side */
.browse-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}
.browse-card-actions .browse-card-cta {
    flex: 1;
    margin-top: 0;
}
.browse-card-cta.is-secondary {
    background: transparent;
    border-color: var(--border);
    color: var(--text-secondary);
}
.browse-card-cta.is-secondary:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

/* Details modal */
.browse-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.browse-modal[hidden] { display: none; }

.browse-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 16, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: browse-modal-fade-in 0.18s ease;
}

.browse-modal-panel {
    position: relative;
    max-width: 640px;
    width: 100%;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #1c2333;
    border: 1px solid #2d3548;
    border-radius: 16px;
    padding: 32px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 77, 77, 0.12);
    animation: browse-modal-slide-up 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.browse-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.browse-modal-close:hover {
    background: rgba(255, 77, 77, 0.15);
    color: var(--coral-bright);
}

.browse-modal-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
    padding-right: 48px;
}
.browse-modal-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-primary);
    margin: 0;
    word-break: break-word;
}

.browse-modal-owner {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.browse-modal-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: var(--surface);
    border-radius: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 18px;
}
.browse-modal-stats strong {
    color: var(--text-primary);
    font-weight: 700;
}

.browse-modal-summary {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0 0 20px;
    white-space: pre-wrap;
}

.browse-modal-id {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--surface);
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 12px;
    flex-wrap: wrap;
}
.browse-modal-id-label {
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.browse-modal-id code {
    font-family: var(--font-mono);
    color: var(--coral-bright);
    background: transparent;
    padding: 0;
}

.browse-modal-actions { display: flex; flex-direction: column; gap: 8px; }
.browse-modal-actions .btn {
    width: 100%;
    text-align: center;
    text-decoration: none;
}
.browse-modal-note {
    font-size: 12px;
    color: var(--text-tertiary);
    margin: 0;
}
.browse-modal-note code {
    font-family: var(--font-mono);
    font-size: 11px;
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 5px;
    border-radius: 4px;
}

@keyframes browse-modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes browse-modal-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
    .browse-modal { padding: 12px; }
    .browse-modal-panel { padding: 24px 20px; max-height: calc(100vh - 24px); }
    .browse-modal-title { font-size: 20px; }
}

/* ════════════════════════════════════════════════════════════════════
   A11Y + UX MICRO-IMPROVEMENTS — 2026-06-17
   ──────────────────────────────────────────────────────────────────
   Skip-to-content link, browse-card loading skeleton, and contrast
   fixes for the AA failures the audit caught. Append-only — no
   existing rules touched.
   ════════════════════════════════════════════════════════════════════ */

/* Skip-to-content link — visually hidden until keyboard focus.
   Big a11y signal + a tiny SEO signal too (Google reads it). */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 20000;
    background: var(--coral-bright);
    color: #050810;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: top 0.18s cubic-bezier(0.2, 0, 0, 1);
}
.skip-link:focus,
.skip-link:focus-visible {
    top: 16px;
    outline: 2px solid #f0f4ff;
    outline-offset: 2px;
}

/* Browse-card loading skeleton — shown when search/sort/tab change
   triggers a re-render. Replaces the "Loading..." flash with shimmering
   placeholder cards. */
.browse-card-skeleton {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    min-height: 160px;
    position: relative;
    overflow: hidden;
}
.browse-card-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.04) 50%,
        transparent 100%
    );
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.browse-card-skeleton .sk-line {
    background: var(--border);
    border-radius: 4px;
    height: 12px;
    margin-bottom: 10px;
}
.browse-card-skeleton .sk-line.title { width: 65%; height: 18px; }
.browse-card-skeleton .sk-line.short { width: 40%; }
.browse-card-skeleton .sk-line.long  { width: 85%; }
.browse-card-skeleton .sk-line.last  { width: 60%; margin-bottom: 0; }

/* Browse "Show more" spinner — small inline indicator while fetching
   the next batch. Hidden by default, JS toggles the loading class. */
.browse-more.is-loading {
    pointer-events: none;
    opacity: 0.75;
}
.browse-more.is-loading::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: browse-spinner 0.7s linear infinite;
    vertical-align: -2px;
}
@keyframes browse-spinner {
    to { transform: rotate(360deg); }
}

/* Reduce motion — disable the shimmer + spinner for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .browse-card-skeleton::after,
    .browse-more.is-loading::before {
        animation: none;
    }
}

/* Contrast fixes — the a11y audit flagged 5 pairs that fail WCAG AA
   (4.5:1 for body text). Bumping the dim coral + tertiary text to
   meet the bar against surface-2/3 backgrounds. Existing --coral-mid
   token stays for backgrounds/borders (where 3:1 UI ratio is OK);
   --coral-mid-text is a new token specifically for text-on-surface.
   --text-tertiary already bumped to #7a8294 earlier today; nudging
   the on-surface variant a touch lighter to clear AA on .surface-2
   too. */
:root {
    --coral-mid-text: #ff7079;       /* AA on var(--surface-2): 5.0:1 */
    --text-tertiary-on-surface: #8a93a8; /* AA on var(--surface-2)/(--surface-3): 5.1:1 */
}

/* ════════════════════════ END A11Y + UX MICRO ═════════════════════ */
