/* ============================================================
   Home page — flower.codes-inspired minimal design
   One column. One typeface. One graphic. Oversized type.
   Ported from explorations/flower-minimal.html.
   ============================================================ */
:root {
    --ink: #000;
    --paper: #fff;
    --link: #0000ee;
    --muted: #888;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, "Courier New", monospace;
    background: var(--paper);
    color: var(--ink);
    font-size: 18px;
    line-height: 1.7;
}

main { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* breakout: let a section escape the 760px column without leaving the grid.
   Centered with a negative margin instead of translateX(-50%): a transform
   here puts the text on a composited layer at half-pixel offsets, which
   breaks ClearType subpixel antialiasing (red/blue fringing on Windows). */
/* 1112px = the header's content width (1160px border-box minus its
   24px side paddings), so wide sections align with the header text */
.wide {
    width: min(1112px, calc(100vw - 48px));
    margin-left: calc((100% - min(1112px, calc(100vw - 48px))) / 2);
}

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
    font-family: inherit;
    line-height: 1.1;
    letter-spacing: -0.03em;
}
h1 { font-size: clamp(3rem, 9vw, 5.5rem); font-weight: 700; }
h2 { font-size: clamp(2.2rem, 6vw, 3.5rem); font-weight: 700; margin-bottom: 1.5rem; }
h3 { font-size: 1.35rem; font-weight: 700; }

/* Shared-layout neutralizers: the prototype is standalone, while
   production loads shared CSS first. Keep the home page visually owned here. */
section { margin: 8rem 0; padding: 0; }
p { font-size: inherit; font-weight: 400; line-height: inherit; margin-bottom: 0; }
p + p { margin-top: 1.2rem; }

.muted { color: var(--muted); }
.cmd {
    display: inline-block;
    background: var(--ink);
    color: var(--paper);
    padding: 0.5rem 1.2rem;
    font-size: 1.1rem;
}
.cmd::before { content: "$ "; color: var(--muted); }

/* hero: two columns, everything above the fold */
/* headline and elephant form the top band; subtitle, CTAs, and proof
   funnel into a centered stack spanning both columns below it */
.hero {
    width: min(860px, calc(100vw - 48px));
    margin-left: calc((100% - min(860px, calc(100vw - 48px))) / 2);
    margin-top: 2rem;
    margin-bottom: 5rem;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 0 2.5rem;
    align-items: center;
}
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
.hero .sub, .hero .actions { grid-column: 1 / -1; }
/* keep the "?" glued to the agent name: line breaks are otherwise
   allowed after the inline-block span */
.hero-agent-wrap { white-space: nowrap; }
.hero-agent { color: var(--ink); }
/* terminal-style cursor after the "?": blinks while idle, solid while
   the agent name is being deleted/typed */
.hero-cursor {
    display: inline-block;
    width: 3px;
    height: 0.85em;
    margin-left: 0.06em;
    vertical-align: baseline;
    background: var(--ink);
    animation: cursor-blink 1.1s step-end infinite;
}
.hero-agent-wrap.is-typing .hero-cursor { animation: none; }
@keyframes cursor-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-cursor { animation: none; } }
.hero .sub { font-size: clamp(1.00rem, 2vw, 1.2rem); margin-top: 1rem; max-width: 46ch; }
.hero .actions { margin-top: 2rem; font-size: 1rem; display: flex; gap: 1.2rem; flex-wrap: wrap; }
.hero .actions a {
    display: inline-block;
    border: 1px solid var(--ink);
    padding: 0.35rem 0.9rem;
}
.hero .actions a:hover {
    text-decoration: none;
    background: var(--ink);
    color: var(--paper);
}
.hero-logo { width: min(100%, 340px); height: auto; justify-self: center; position: relative; top: 3rem; image-rendering: pixelated; }
@media (max-width: 800px) {
    .hero { grid-template-columns: 1fr; gap: 0; padding-top: 0; padding-bottom: 0; }
    .hero-logo { order: 1; width: clamp(110px, 30vw, 180px); justify-self: center; top: 0; margin-top: 2rem; margin-bottom: 0; }
}

/* works with: marquee ticker */
.works-with { margin-top: 5rem; margin-bottom: 5rem; }
.works-with .label { color: var(--muted); margin-bottom: 1.2rem; }
.ticker { overflow: hidden; }
.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.ticker:hover .marquee-track { animation-play-state: paused; }
.marquee-items { display: flex; align-items: center; gap: 4rem; padding-right: 4rem; }
.marquee-items img {
    height: 34px; width: auto; display: block;
    filter: grayscale(1); opacity: 0.75;
}
.marquee-items .wordmark img { height: 22px; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* lists of things (problems, capabilities, details) */
ol.big, ul.big { list-style: none; counter-reset: item; }
ol.big > li, ul.big > li { margin: 3.5rem 0; }
ol.big > li { counter-increment: item; }
ol.big > li h3::before {
    content: "0" counter(item) " ";
    color: var(--muted);
    font-weight: 400;
}
.big h3 { margin-bottom: 0.5rem; }
.big p { max-width: 58ch; }
.tags { margin-top: 0.6rem; color: var(--muted); font-size: 0.9rem; }
.tags span::after { content: " · "; }
.tags span:last-child::after { content: ""; }

.lede { font-size: clamp(1.1rem, 2.5vw, 1.35rem); max-width: 48ch; }

/* workflow: scroll-pinned beats; the active video grows from its
   docked spot to a centered overlay, holds, then shrinks back */
.workflow-track { height: 480vh; }
.workflow-sticky {
    position: sticky; top: 0;
    height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
}
.workflow-head { margin-bottom: 2.5rem; }
.workflow-cols {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
}
.beat-link { margin-top: 1.4rem; cursor: pointer; opacity: 0.35; transition: opacity 0.3s ease; }
.beat-link.is-active { opacity: 1; }
.beat-link .who { color: var(--muted); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.1em; }
.beat-link h3 { font-size: 1rem; }
.beat-link p { font-size: 0.85rem; line-height: 1.55; max-width: 48ch; }
.workflow-right { position: relative; aspect-ratio: 16 / 9; }
.capture {
    position: absolute; inset: 0;
    margin: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.capture.is-active { opacity: 1; z-index: 12; }
.capture .frame {
    border: 1px solid var(--ink);
    background: #000;
    will-change: transform;
}
.capture .frame.is-overlay { position: relative; z-index: 12; }
.capture-title {
    position: fixed;
    top: var(--capture-title-top, 1rem);
    left: var(--capture-title-left, 1rem);
    margin: 0;
    max-width: calc(100vw - 2rem);
    color: var(--ink);
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    font-weight: 700;
    line-height: 1.2;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.35rem);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}
.capture.is-fully-grown .capture-title {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}
.capture video { width: 100%; display: block; }
.grow-backdrop {
    position: fixed; inset: 0;
    background: rgba(255, 255, 255, 0.94);
    opacity: 0;
    pointer-events: none;
    z-index: 11;
}
@media (max-width: 800px) {
    .workflow-track { height: auto; }
    .workflow-sticky { position: static; height: auto; overflow: visible; }
    .workflow-cols { grid-template-columns: 1fr; gap: 2rem; }
    .workflow-left, .workflow-right { display: contents; }
    .workflow-right { aspect-ratio: auto; }
    .capture { position: static; opacity: 1; margin-top: 1.5rem; }
    .capture-title { display: none; }
    .beat-link { opacity: 1; }
    .grow-backdrop { display: none; }
    /* interleave step/demo pairs: step, demo, step, demo, step, demo */
    .workflow-left > .beat-link:nth-child(1) { order: 1; }
    .workflow-right > .capture:nth-child(1) { order: 2; }
    .workflow-left > .beat-link:nth-child(2) { order: 3; }
    .workflow-right > .capture:nth-child(2) { order: 4; }
    .workflow-left > .beat-link:nth-child(3) { order: 5; }
    .workflow-right > .capture:nth-child(3) { order: 6; }
}

/* stats */
.stats-row { display: flex; gap: 4rem; flex-wrap: wrap; margin-top: 3rem; }
.stat { flex: 1 1 180px; }
.stat .value { font-size: clamp(3.5rem, 8vw, 5rem); font-weight: 700; line-height: 1; letter-spacing: -0.04em; }
.stat .label { font-weight: 700; margin: 0.5rem 0 0.8rem; }
.stat p { font-size: 0.95rem; }
.stat em { font-style: normal; background: #f0f0f0; padding: 0 0.3em; }

/* testimonial */
blockquote { font-size: clamp(1.3rem, 3.5vw, 1.9rem); line-height: 1.4; letter-spacing: -0.02em; }
blockquote::before { content: "\201C"; }
blockquote::after { content: "\201D"; }
cite { display: block; margin-top: 2rem; font-style: normal; color: var(--muted); }

/* steps */
.step { margin: 3rem 0; }
.step .num { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; }
.step h3 { margin: 0.3rem 0 0.5rem; }
.step .cmd { margin-top: 1rem; }

/* faq */
details { border-top: 1px solid #ddd; padding: 1.4rem 0; }
details:last-of-type { border-bottom: 1px solid #ddd; }
summary { cursor: pointer; font-weight: 700; font-size: 1.15rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); }
details[open] summary::after { content: "\2212"; }
details p { margin-top: 1rem; max-width: 60ch; }
details code { background: #f0f0f0; padding: 0 0.3em; }

/* closing calls to action */
.final .actions,
.herd-cta .actions { margin-top: 2.5rem; font-size: 1.25rem; display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.final .actions a,
.herd-cta .actions a {
    display: inline-block;
    font-size: 1rem;
    border: 1px solid var(--ink);
    padding: 0.35rem 0.9rem;
}
.final .actions a:hover,
.herd-cta .actions a:hover {
    text-decoration: none;
    background: var(--ink);
    color: var(--paper);
}
