/* The landing pages (`templates/landing/`): standalone pages outside the docs
   mdBook, in the docs' default ayu palette. The hero rules below came from the
   docs' custom.css; `.content` is the landing's <main>, as in mdBook. */

/* The docs' fonts (mdBook's Open Sans and Source Code Pro, licenses next to
   them in assets/fonts). The versioned names never change, so the `immutable`
   /assets cache is safe without a content hash. */
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/open-sans-v17-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/open-sans-v17-italic.woff2') format('woff2');
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/open-sans-v17-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/open-sans-v17-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('/assets/fonts/open-sans-v17-800.woff2') format('woff2');
}

@font-face {
    font-family: 'Source Code Pro';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/assets/fonts/source-code-pro-v11-500.woff2') format('woff2');
}

:root {
    --bg: hsl(210, 25%, 8%);
    --fg: #c5c5c5;
    --sidebar-fg: #c8c9db;
    --links: #0096cf;
    --inline-code-color: #ffb454;
    /* mdBook's, for code in the content */
    --mono-font: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace;
    /* the docs' hp-topnav's */
    --nav-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
    --nav-bg: #0d0d0d;
    --nav-border: rgba(255, 255, 255, 0.1);
    --ember: #ffb454;
    --prompt-green: #98c379;
    --nav-fg-dim: rgba(230, 225, 214, 0.65);
    color-scheme: dark;
}

/* 1rem = 10px, as in mdBook, so the hero rules keep their sizes */
html {
    font-size: 62.5%;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: "Open Sans", sans-serif;
    font-size: 1.6rem;
    line-height: 1.6;
}

a {
    color: var(--links);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    font-family: var(--mono-font);
    font-size: 0.875em;
    color: var(--inline-code-color);
}

/* Inline code as mdBook's ayu theme draws it */
:not(pre) > code {
    padding: 0.1em 0.3em;
    border-radius: 3px;
    background: #191f26;
}

img,
video {
    max-width: 100%;
    height: auto;
}

.content {
    max-width: 750px;
    margin: 0 auto;
    padding: 2rem 16px 6rem;
}

.content p,
.content li {
    line-height: 1.6;
}

.content h1 {
    margin: 2rem 0 1rem;
    font-size: 3.2rem;
    line-height: 1.25;
    color: var(--fg);
}

.content h2 {
    margin: 3rem 0 1rem;
    font-size: 2.4rem;
    color: var(--fg);
}

.landing-next {
    margin-top: 3rem;
    font-size: 1.8rem;
    font-weight: 600;
}

/* Top nav: a copy of the docs' and blog's hp-topnav (hotpath-rs
   docs/theme/hotpath-nav.css, whose built name changes on every docs build).
   Keep the two in step. */
.landing-nav {
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    font-family: var(--nav-mono);
}

.landing-nav-inner {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    height: 48px;
    padding: 0 16px;
}

.landing-nav .brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--ember);
    text-decoration: none;
}

.landing-nav .brand:hover {
    text-shadow: 0 0 12px rgba(255, 180, 84, 0.45);
}

.navlink {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
    flex: 0 0 auto;
    color: var(--nav-fg-dim);
    font-size: 14px;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: color 0.15s ease;
}

.navlink:hover {
    color: #e6e1d6;
    text-decoration: none;
}

/* Heat strip: flamegraph-gradient underline marks the active route; the
   brand is the home page's route (landing only, the docs and blog have none) */
.navlink::after,
.landing-nav .brand-cmd::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, #ff8a3d, #ffb454);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.navlink.active {
    color: var(--ember);
}

.navlink.active::after,
.landing-nav .brand.active .brand-cmd::after {
    opacity: 1;
    box-shadow: 0 2px 10px rgba(255, 180, 84, 0.35);
}

/* Cloud: the primary product entry point. Flame-gradient label, muted
   outside the cloud section so it never reads as a second active route */
.cloud-label {
    font-weight: 700;
    background: linear-gradient(90deg, #ff6b3d, #ffb454 55%, #ffd88a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    transition: filter 0.15s ease, opacity 0.15s ease;
}

.navlink-cloud:not(.active) .cloud-label {
    opacity: 0.9;
}

.navlink-cloud:hover .cloud-label {
    opacity: 1;
}

.navlink-cloud:hover .cloud-label,
.navlink-cloud.active .cloud-label {
    filter: drop-shadow(0 0 6px rgba(255, 140, 60, 0.55));
}

.landing-nav .brand:focus-visible,
.navlink:focus-visible {
    outline: 2px solid var(--ember);
    outline-offset: -2px;
}

/* The repository's GitHub stars and crates.io downloads, right-aligned;
   left out where the bar has no room for them */
.landing-nav-badges {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: auto;
}

.landing-nav-badges img {
    display: block;
    height: 20px;
    width: auto;
}

@media (max-width: 560px) {
    .landing-nav-badges {
        display: none;
    }
}

.landing-nav .brand-prompt {
    color: var(--prompt-green);
    margin-right: 0.5em;
    user-select: none;
}

/* Carries the home page's heat strip, so the prompt stays outside it */
.landing-nav .brand-cmd {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

/* Hero Row: the pill, its note and the SSH demo share the middle column,
 * centered on the page, and Ferris sits in the left column spanning them.
 * Ferris has a column of his own, so he can never overlap the text. */
.hero-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    /* The flexible first and last rows absorb Ferris's extra height, so the
     * pill, note and SSH demo stay together as a vertically centered stack. */
    grid-template-rows: 1fr auto auto auto 1fr;
    align-items: center;
    column-gap: 2rem;
    margin: 2.4rem 0;
}

.hero-row .ferris-hero {
    grid-column: 1;
    grid-row: 1 / -1;
    justify-self: end;
}

.hero-row .agent-pill {
    grid-column: 2;
    grid-row: 2;
    margin: 0 auto;
}

.hero-row .hero-cta-note {
    grid-column: 2;
    grid-row: 3;
}

.hero-row .ssh-demo {
    grid-column: 2;
    grid-row: 4;
}

/* Side by side needs room for Ferris on both sides of the middle column, so
 * the breakpoint follows the content width (narrower with the sidebar open),
 * not the viewport. */
main:has(> .hero-row) {
    container-type: inline-size;
}

@container (max-width: 680px) {
    .hero-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        margin: 1.5rem 0 2rem 0;
    }

    .hero-row .ferris-hero {
        width: 120px;
        margin-bottom: 1.5rem;
    }
}

.ferris-hero {
    position: relative;
    width: 140px;
    flex-shrink: 0;
    rotate: var(--ferris-tilt, 0deg);
    transform-origin: 50% 90%;
    transition: rotate 0.3s ease-out;
}

.ferris-img-hero {
    display: block;
    width: 100%;
}

/* Overlay positions are percentages of the 500x491 source image. */
.ferris-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

/* Each mood repaints the baked-in angry face from the image. */
.ferris-face-plate,
.ferris-mood-neutral,
.ferris-mood-happy,
.ferris-mood-joy,
.ferris-hearts {
    display: none;
}

.ferris-hero:not([data-mood="angry"]) .ferris-face-plate,
.ferris-hero[data-mood="neutral"] .ferris-mood-neutral,
.ferris-hero[data-mood="happy"] .ferris-mood-happy,
.ferris-hero[data-mood="joy"] .ferris-mood-joy {
    display: inline;
}

.ferris-glint {
    position: absolute;
    top: 69.95%;
    width: 1.4%;
    height: 1.43%;
    background: #fff;
    transition: transform 0.12s ease-out;
}

/* Joy closes the eyes into ^ ^, so the glints go away. */
.ferris-hero[data-mood="joy"] .ferris-glint {
    display: none;
}

.ferris-glint.ferris-eye-left {
    left: 41.1%;
}

.ferris-glint.ferris-eye-right {
    left: 57.1%;
}

.ferris-hero.jumping {
    animation: ferris-happy-jump 1s cubic-bezier(0.3, 0.7, 0.4, 1);
}

@keyframes ferris-happy-jump {
    0% { transform: translateY(0) scale(1, 1); }
    12% { transform: translateY(0) scale(1.12, 0.86); }
    32% { transform: translateY(-30%) scale(0.92, 1.1); }
    50% { transform: translateY(0) scale(1.1, 0.9); }
    64% { transform: translateY(-14%) scale(0.96, 1.05); }
    80% { transform: translateY(0) scale(1.04, 0.96); }
    100% { transform: translateY(0) scale(1, 1); }
}

.ferris-hero.jumping .ferris-hearts {
    display: inline;
}

.ferris-heart {
    transform-box: fill-box;
    transform-origin: center;
    opacity: 0;
}

/* Chromium runs SVG animations under a display: none parent, so the hearts
   would finish at page load. Attach the animation only while jumping. */
.ferris-hero.jumping .ferris-heart {
    animation: ferris-heart-float 1.2s ease-out forwards;
}

.ferris-hero.jumping .ferris-heart:nth-child(2) {
    animation-delay: 0.15s;
}

.ferris-hero.jumping .ferris-heart:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes ferris-heart-float {
    0% { opacity: 0; transform: translateY(40px) scale(0.4); }
    25% { opacity: 1; transform: translateY(0) scale(1.1); }
    100% { opacity: 0; transform: translateY(-110px) scale(0.9); }
}

/* Short muted explanation right under the AI setup pill */
.content .hero-cta-note {
    margin: 1rem 0 0 0;
    text-align: center;
    font-size: 1.4rem;
    color: var(--fg);
    opacity: 0.7;
}

/* SSH demo: an inline command under the AI setup pill, styled as the
 * page's inline code */
.content .ssh-demo {
    margin: 1.4rem 0 0 0;
    text-align: center;
}

.ssh-demo-command {
    padding: 0;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
}

.ssh-demo-command:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 2px;
}

.copy-tooltip {
    position: relative;
}

.copy-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 0.6rem);
    left: 50%;
    transform: translate(-50%, 4px);
    padding: 0.45rem 1.1rem;
    border-radius: 8px;
    background: #f5f5f5;
    color: #111;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
}

.copy-tooltip.copied::after {
    content: attr(data-tooltip-copied);
}

.copy-tooltip.copied::after,
.copy-tooltip[data-tooltip]:hover::after,
.copy-tooltip[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.agent-logos {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.agent-logo {
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
    fill: currentColor;
}

.agent-logo-claude {
    fill: #d97757;
}

.agent-pill-status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* Subtitle annotation under the H1 - keyword-rich but visually small */
.content h2.hero-subtitle {
    margin: 1.2rem 0 1.5rem 0;
    padding: 0;
    border: none;
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--fg, #c8c8c8);
    opacity: 0.9;
}

.content h2.hero-subtitle b,
.content h2.hero-subtitle strong {
    font-weight: 600;
}

/* Two side-by-side "next step" blocks under the hero */
.hero-paths {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 2.5rem;
    margin: 1.5rem 0 2rem 0;
}

.content .hero-path p {
    margin: 0 0 0.3rem 0;
    line-height: 1.5;
}

.content .hero-path .hero-path-title {
    font-weight: 600;
    font-size: 1.15em;
}

@media (max-width: 768px) {
    .hero-paths {
        grid-template-columns: 1fr;
    }
}

/* Trusted By */
.trusted-by {
    text-align: center;
    margin: 2rem 0;
}

.trusted-by-tagline {
    color: var(--sidebar-fg);
    margin-bottom: 1rem;
    text-align: left;
}

.trusted-by-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}

.trusted-by-project {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.5rem 1rem;
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-decoration: none;
    color: #ffb454;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.trusted-by-project,
.trusted-by-project:hover,
.trusted-by-project:active,
.trusted-by-project:visited,
.trusted-by-project:link {
    text-decoration: none !important;
}

.trusted-by-project:hover {
    border-color: rgba(255, 180, 84, 0.4);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 50px rgba(255, 180, 84, 0.1);
}

.trusted-by-name {
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #ffb454;
    -webkit-text-fill-color: #ffb454;
    text-decoration: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trusted-by-project:hover .trusted-by-name {
    text-decoration: none;
}

.trusted-by-project img {
    height: 20px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .trusted-by-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .trusted-by-project {
        padding: 0.3rem 0.6rem;
    }

    .trusted-by-name {
        font-size: 0.85em;
    }
}

/* Also in the docs' custom.css: the cloud docs' Getting Started uses the same pill */
.agent-pill {
    display: flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    gap: 0.75rem;
    margin: 0 auto;
    padding: 0.9rem 2rem;
    background: #33230f;
    border: 1px solid rgba(255, 180, 84, 0.8);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 1.45rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 0 40px rgba(255, 180, 84, 0.08);
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.agent-pill:hover,
.agent-pill:focus-visible {
    background: #3d2a12;
    border-color: #ffb454;
    box-shadow: 0 0 32px rgba(255, 180, 84, 0.2);
    outline: none;
}

.agent-pill-copy {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    color: #ffb454;
}

@media (max-width: 768px) {
    .agent-pill {
        font-size: 1.15rem;
        padding: 0.65rem 1.25rem;
    }
}

/* Cloud landing hero */
.ferris-img {
    float: left;
    margin-right: 15px;
    width: 20%;
}

@media (max-width: 768px) {
    .ferris-img {
        float: none;
        display: block;
        margin: 0 auto 15px auto;
        width: 80%;
    }
}

/* Cloud page hero: the install button with the setup offer and a muted
   reassurance line right under it */
.cloud-cta {
    /* Its own formatting context keeps the whole block beside the floated
       Ferris instead of wrapping half of it underneath him */
    display: flow-root;
    margin: 1.5rem 0 2rem 0;
}

/* Left edges line up with the offer text, inside its 3px accent border and
   1.2rem padding */
.cloud-cta .agent-pill {
    margin: 1.6rem 0 0 calc(3px + 1.2rem);
}

/* The hands-on setup offer: its own bold title, tied to the text by a thin
   amber accent rather than a colored banner */
.cloud-cta-offer {
    max-width: 60ch;
    margin: 0;
    padding-left: 1.2rem;
    border-left: 3px solid #ffb454;
}

.content .cloud-cta-offer p {
    margin: 0;
    line-height: 1.5;
}

.content .cloud-cta-offer .cloud-cta-offer-title {
    margin-bottom: 0.3rem;
    font-size: 1.9rem;
    font-weight: 700;
}

/* The self-service path, after the install button and its reassurance line:
   quieter than both, so the button stays the main action */
.content .cloud-cta-alt {
    max-width: 60ch;
    margin: 2rem 0 0 calc(3px + 1.2rem);
    line-height: 1.5;
    color: var(--fg);
    opacity: 0.85;
}


@media (max-width: 768px) {
    /* Centered between the headline and the intro, small enough to keep the
       install button near the top */
    .ferris-img-cloud {
        float: none;
        display: block;
        width: 40%;
        max-width: 180px;
        margin: 0 auto 1rem auto;
    }

    .cloud-cta {
        clear: both;
    }
}

/* Also in the docs' custom.css, for the cloud docs' install button */
/* Link CTAs styled as the home page's agent pill (white label on its own
   dark fill, so it reads on the light mdbook themes too) */
.content a.cta-link,
.content a.cta-link:visited,
.content a.cta-link:hover {
    color: #fff;
    text-decoration: none;
}

/* Compact pricing and permissions reassurance under the install button */
.content .cloud-cta-meta {
    margin: 1rem 0 0 calc(3px + 1.2rem);
    font-size: 0.9em;
    color: var(--fg);
    opacity: 0.75;
}

.content .cloud-cta-meta a,
.content .cloud-cta-meta a:visited {
    color: inherit;
    text-decoration: underline dotted;
    text-underline-offset: 0.2em;
    /* On narrow screens the line breaks between the phrases, not inside one */
    white-space: nowrap;
}

.content pre {
    overflow-x: auto;
    padding: 1.2rem 1.6rem;
    background: #191f26;
    border-radius: 6px;
}

.content pre code {
    color: var(--fg);
}

/* Site footer: a copy of the docs' (markup in docs/theme/index.hbs, styles in
   hotpath-nav.css). Keep the two in step. */
.site-footer {
    margin-top: 6rem;
    padding: 1.5rem 0;
    border-top: 1px solid hsl(226, 15%, 22%);
    text-align: center;
    color: var(--inline-code-color);
    font-size: 1.4rem;
}

.content .site-footer p {
    margin: 0;
}

.site-footer .site-footer-links {
    margin-bottom: 0.5rem;
}

.site-footer a {
    color: var(--inline-code-color);
}
