/* =========================================================================
   home.css — the KDCube homepage (index.html).

   Self-contained: index.html is a standalone landing page and deliberately
   does NOT load styles.css or script.js (no shared header/nav). Every class
   here is `hv-` prefixed so this file can never collide with the site-wide
   stylesheet if the two are ever loaded together.

   Theming: the pre-paint script in index.html always stamps an explicit
   data-theme (saved pref -> OS pref -> light), so light is the base palette
   and [data-theme="dark"] overrides it.
   ========================================================================= */

:root {
    /* Colours and fonts come from the site stylesheet (styles.css), so the
       homepage reads as the same product as every other page and themes with
       it via [data-theme]. The --hv-* names are kept only as thin aliases onto
       the shared tokens; nothing here defines its own palette. Only tokens the
       site doesn't provide (the fixed terminal code block, the dark-mode logo
       plate, scrim/shadow) stay local. */
    --hv-bg: var(--bg);
    --hv-surface: var(--card-bg);
    --hv-surface-alt: var(--bg-alt);
    --hv-border: var(--card-border);

    --hv-text: var(--text);
    --hv-text-dim: var(--text-dim);
    --hv-text-muted: var(--text-muted);

    --hv-accent: var(--accent);
    --hv-accent-text: var(--accent);
    --hv-accent-solid: var(--accent);
    --hv-accent-dim: rgba(var(--accent-rgb), 0.10);
    --hv-accent-line: rgba(var(--accent-rgb), 0.32);
    --hv-accent-contrast: #FFFFFF;

    --hv-warn: var(--color-warn);

    /* The code block reads as a terminal: fixed dark in both themes. */
    --hv-code-bg: #0E172B;
    --hv-code-border: #1E293B;
    --hv-code-text: #F9FAFC;
    --hv-code-dim: #94A3B8;

    --hv-scrim: rgba(13, 20, 36, 0.5);
    --hv-shadow: 0 24px 48px rgba(13, 30, 44, 0.12);

    /* Partner logos sit directly on the page in light mode. */
    --hv-logo-plate: transparent;
    --hv-logo-plate-pad: 0;

    --hv-font: var(--font);
    --hv-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Dark mode: the colour tokens above already flip through the site stylesheet.
   Only the homepage-specific bits the site doesn't carry are overridden here —
   a dark ground for white button text, a heavier scrim/shadow, and the light
   plate that keeps the five partner logos legible on a dark background. */
[data-theme="dark"] {
    --hv-accent-contrast: #06101E;

    --hv-scrim: rgba(6, 16, 30, 0.65);
    --hv-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);

    --hv-logo-plate: #FFFFFF;
    --hv-logo-plate-pad: 6px 10px;
}

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

body.hv-home {
    background: var(--hv-bg);
    color: var(--hv-text);
    font-family: var(--hv-font);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    /* styles.css makes <body> a sticky-footer flex column; the homepage keeps
       its own block layout, so opt back out of that here. */
    display: block;
    /* full-bleed bands use 50vw (which counts the scrollbar); clip the few px of
       horizontal overshoot so it never shows a horizontal scrollbar. */
    overflow-x: hidden;
}

.hv-home :focus-visible {
    outline: 2px solid var(--hv-accent-text);
    outline-offset: 2px;
    border-radius: 4px;
}

.hv-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--hv-accent-solid);
    color: var(--hv-accent-contrast);
    padding: 10px 16px;
    border-radius: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.hv-skip-link:focus { left: 0; }

.hv-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* === LAYOUT === */
.hv-page {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 280px;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

.hv-sidebar-left,
.hv-sidebar-right {
    padding: 24px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--hv-border) transparent;
}

.hv-main {
    padding: 32px 40px;
    border-left: 1px solid var(--hv-border);
    border-right: 1px solid var(--hv-border);
    min-height: 100vh;
    min-width: 0;
}

/* === LEFT SIDEBAR CARDS === */
.hv-card {
    display: block;
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
    background: var(--hv-surface);
    border: 1px solid var(--hv-border);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
}

.hv-card:hover { border-color: var(--hv-text-muted); }

.hv-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
}

.hv-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--hv-accent-text);
}

.hv-card-toggle {
    color: var(--hv-text-dim);
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s;
}

.hv-card[aria-expanded="true"] .hv-card-toggle { transform: rotate(45deg); }

/* The cards are <button>s, so their innards are all phrasing content
   (spans) rather than the <p>/<h4> the mock used. */
.hv-card-preview {
    display: block;
    padding: 0 16px 14px;
}

.hv-card-preview-text {
    display: block;
    font-size: 13px;
    color: var(--hv-text-dim);
    line-height: 1.5;
}

.hv-preview-images {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.hv-preview-img {
    width: 72px;
    height: 52px;
    border-radius: 4px;
    background: var(--hv-accent-dim);
    border: 1px solid var(--hv-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.hv-preview-img--teal { border-color: var(--hv-accent-line); }

/* === HERO === */
.hv-hero { margin-bottom: 20px; }

.hv-hero-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.hv-badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--hv-accent-dim);
    color: var(--hv-accent-text);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--hv-accent-line);
}

/* Stack the live h1 and one ghost per phrase in a single grid cell. The row is
   as tall as the tallest phrase, so rotating never reflows the page. Which
   phrase is tallest depends on the viewport, hence a ghost for every one. The
   ghosts sit beside the h1 rather than inside it, so the headline's own text
   content stays the single real sentence.

   The h1 and the ghosts must declare identical typography rather than inherit
   it: `font: inherit` on the h1 resets font properties the shorthand covers,
   which shifts glyph advances just enough to change where the headline wraps. */
.hv-hero-title {
    display: grid;
    margin-bottom: 24px;
}

.hv-hero-title > * {
    grid-area: 1 / 1;
    margin: 0;
}

.hv-hero h1,
.hv-title-ghost {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
/* Ghosts reserve the headline height, so their rotating accent must wrap
   exactly like the visible one (its own line, never wrapping) — otherwise a
   long phrase makes a ghost 4 lines tall and opens a gap under the headline. */
.hv-title-ghost .hv-rotate,
.hv-title-ghost .hv-rotate-text { white-space: nowrap; }

.hv-title-ghost {
    visibility: hidden;
    pointer-events: none;
}

.hv-rotate { color: var(--hv-accent-text); }

.hv-rotate-text {
    display: inline-block;
    transition: opacity 0.3s, transform 0.3s;
}

.hv-hero-subhead {
    font-size: 16px;
    line-height: 1.7;
    color: var(--hv-text-dim);
    max-width: 600px;
    margin-bottom: 32px;
}

.hv-cta-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* === BUTTONS === */
.hv-btn-primary,
.hv-btn-secondary {
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.hv-btn-primary {
    background: var(--hv-accent-solid);
    color: var(--hv-accent-contrast);
    font-weight: 600;
    border: 1px solid var(--hv-accent-solid);
    transition: opacity 0.2s;
}

.hv-btn-primary:hover { opacity: 0.9; }

.hv-btn-secondary {
    background: transparent;
    color: var(--hv-text);
    font-weight: 500;
    border: 1px solid var(--hv-border);
    transition: border-color 0.2s;
}

.hv-btn-secondary:hover { border-color: var(--hv-text-muted); }

.hv-text-link {
    display: inline-block;
    padding: 3px 0;
    font-size: 14px;
    color: var(--hv-accent-text);
    text-decoration: none;
    font-weight: 500;
}

.hv-text-link:hover { text-decoration: underline; }

/* === COMPARISON TABLE === */
/* Full-bleed white band (like the RUNNING band): the white breaks out to the
   viewport edges while the table/header/footer stay aligned to the page column. */
.hv-comparison {
    margin: 48px calc(50% - 50vw);
    padding: 8px calc(50vw - 50%) 12px;
    background: #fff;
    border: 0;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    border-radius: 0;
    overflow: hidden;
}
[data-theme="dark"] .hv-comparison { background: var(--bg-alt); }

.hv-comparison-header {
    padding: 16px 20px;
    background: var(--hv-surface);
    border-bottom: 1px solid var(--hv-border);
}

.hv-table-scroll { overflow-x: auto; }

.hv-comparison table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.hv-comparison thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--hv-text-dim);
    border-bottom: 1px solid var(--hv-border);
    background: var(--hv-surface);
}

.hv-comparison thead th:last-child { color: var(--hv-accent-text); }

.hv-comparison td,
.hv-comparison tbody th {
    padding: 10px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--hv-border);
    color: var(--hv-text-dim);
}

/* Row headers carry the concern name — same look the mock gave td:first-child. */
.hv-comparison tbody th {
    text-align: left;
    color: var(--hv-text);
    font-weight: 500;
}

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

.hv-check { color: var(--hv-accent-text); }
.hv-cross { color: var(--hv-text-muted); }

.hv-comparison-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--hv-border);
    background: var(--hv-surface);
    font-size: 13px;
    color: var(--hv-text-dim);
}

/* === ARCHITECTURE DIAGRAM === */
/* === "IS THIS FOR YOU" GRID === */
.hv-for-you { margin: 48px 0; }

.hv-for-you-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.hv-for-you-card {
    display: block;
    background: var(--hv-surface);
    border: 1px solid var(--hv-border);
    border-left: 3px solid var(--hv-accent);
    border-radius: 6px;
    padding: 20px;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}

.hv-for-you-card:hover {
    border-color: var(--hv-text-muted);
    border-left-color: var(--hv-accent);
    transform: translateY(-1px);
}

.hv-for-you-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--hv-text);
}

.hv-for-you-card p {
    font-size: 13px;
    color: var(--hv-text-dim);
    line-height: 1.5;
}

.hv-for-you-card span {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    color: var(--hv-accent-text);
    font-weight: 500;
}

/* === CLOSER === */
.hv-closer {
    text-align: center;
    padding: 48px 0 32px;
    margin-top: 48px;
    border-top: 1px solid var(--hv-border);
}

.hv-closer h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.hv-closer-lede {
    max-width: 520px;
    margin: 0 auto 24px;
    color: var(--hv-text-dim);
    font-size: 15px;
    line-height: 1.7;
}

.hv-closer-cta {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* === PARTNER LOGOS === */
.hv-logo-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    padding: 16px 0;
}

.hv-partner-logo {
    height: 24px;
    /* The width/height attrs carry the intrinsic size (for aspect-ratio and
       to reserve space); without width:auto the attr wins and each logo
       claims its full pixel width, wrapping the bar one logo per row. */
    width: auto;
    opacity: 0.75;
    transition: opacity 0.2s;
    object-fit: contain;
    background: var(--hv-logo-plate);
    padding: var(--hv-logo-plate-pad);
    border-radius: 6px;
    box-sizing: content-box;
}

.hv-partner-logo:hover { opacity: 1; }

.hv-partner-logo--tall { height: 28px; }
.hv-partner-logo--short { height: 22px; }

/* === HOW WE BUILT IT: ARTICLE LIBRARY === */
.hv-overlay .hv-overlay-content--built { max-width: 1040px; }

.hv-built-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.hv-built-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    color: var(--hv-text);
    text-decoration: none;
    background: var(--hv-surface-alt);
    border: 1px solid var(--hv-border);
    border-radius: 12px;
    transition: border-color .18s, transform .18s, box-shadow .18s;
}

.hv-built-card:hover {
    border-color: rgba(var(--accent-rgb), .55);
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(var(--accent-rgb), .11);
}

.hv-built-card--lead {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
    min-height: 276px;
}

.hv-built-card-art {
    height: 188px;
    overflow: hidden;
    background: #f3f8f7;
    border-bottom: 1px solid var(--hv-border);
}

.hv-built-card-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Absolute-fill: the art pane takes the height the copy column produces
   (instead of stretching the card to the image's intrinsic aspect), and the
   cover-crop from the top shows the first rows of the map. */
.hv-built-card--lead .hv-built-card-art {
    position: relative;
    height: auto;
    min-height: 276px;
    border-bottom: 0;
    border-left: 1px solid var(--hv-border);
}

.hv-built-card--lead .hv-built-card-art img {
    position: absolute;
    inset: 0;
    object-fit: cover;
    object-position: center top;
}

.hv-built-card-copy { padding: 20px 22px 22px; }

.hv-built-card--lead .hv-built-card-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 30px;
}

.hv-built-card-kicker {
    display: block;
    margin-bottom: 9px;
    color: var(--hv-accent-text);
    font-family: var(--hv-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .11em;
    line-height: 1.4;
    text-transform: uppercase;
}

.hv-overlay .hv-built-card h3 {
    margin: 0 0 9px;
    color: var(--hv-text);
    font-size: 18px;
    line-height: 1.28;
}

.hv-overlay .hv-built-card--lead h3 {
    font-family: var(--hv-display);
    font-size: 25px;
    font-weight: 600;
}

.hv-overlay .hv-built-card p {
    margin: 0;
    color: var(--hv-text-dim);
    font-size: 13.5px;
    line-height: 1.55;
}

.hv-built-card-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--hv-accent-text);
    font-size: 12.5px;
    font-weight: 700;
}

.hv-built-card:hover .hv-built-card-link { text-decoration: underline; }

/* === THE SOLUTION: ADOPTION MAP === */
.hv-overlay .hv-overlay-content--problem,
.hv-overlay .hv-overlay-content--solution,
.hv-overlay .hv-overlay-content--why { max-width: 1040px; }

.hv-solution-lede {
    max-width: 780px;
    color: var(--hv-text) !important;
    font-size: 17px !important;
    line-height: 1.62 !important;
}

.hv-solution-map {
    display: grid;
    grid-template-columns: minmax(270px, .78fr) minmax(430px, 1.42fr);
    min-height: 330px;
    margin-top: 28px;
    overflow: hidden;
    color: var(--hv-text);
    text-decoration: none;
    background: var(--hv-surface-alt);
    border: 1px solid var(--hv-border);
    border-radius: 12px;
    transition: border-color .18s, transform .18s, box-shadow .18s;
}

.hv-solution-map:hover {
    border-color: rgba(var(--accent-rgb), .55);
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(var(--accent-rgb), .11);
}

.hv-solution-map-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
}

.hv-solution-map-art {
    min-width: 0;
    background: #f3f8f7;
    border-left: 1px solid var(--hv-border);
}

.hv-solution-map-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hv-solution-map-art picture {
    display: block;
    width: 100%;
    height: 100%;
}

.hv-solution-kicker {
    display: block;
    margin-bottom: 9px;
    color: var(--hv-accent-text);
    font-family: var(--hv-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .11em;
    line-height: 1.4;
    text-transform: uppercase;
}

.hv-overlay .hv-solution-map h3 {
    margin: 0 0 10px;
    color: var(--hv-text);
    font-family: var(--hv-display);
    font-size: 25px;
    font-weight: 600;
    line-height: 1.28;
}

.hv-overlay .hv-solution-map p {
    margin: 0;
    color: var(--hv-text-dim);
    font-size: 13.5px;
    line-height: 1.6;
}

.hv-solution-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.hv-solution-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 230px;
    flex-direction: column;
    padding: 22px;
    color: var(--hv-text);
    text-decoration: none;
    background: var(--hv-surface-alt);
    border: 1px solid var(--hv-border);
    border-radius: 12px;
    transition: border-color .18s, transform .18s, box-shadow .18s;
}

.hv-solution-card:hover {
    border-color: rgba(var(--accent-rgb), .55);
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(var(--accent-rgb), .11);
}

.hv-solution-card-no {
    position: absolute;
    top: 18px;
    right: 20px;
    color: var(--hv-text-muted);
    font-family: var(--hv-display);
    font-size: 29px;
    font-weight: 600;
    line-height: 1;
}

.hv-overlay .hv-solution-card h3 {
    max-width: 82%;
    margin: 0 0 9px;
    color: var(--hv-text);
    font-size: 18px;
    line-height: 1.3;
}

.hv-overlay .hv-solution-card p {
    margin: 0;
    color: var(--hv-text-dim);
    font-size: 13.5px;
    line-height: 1.55;
}

.hv-solution-link {
    display: inline-block;
    margin-top: auto;
    padding-top: 15px;
    color: var(--hv-accent-text);
    font-size: 12.5px;
    font-weight: 700;
}

.hv-solution-map:hover .hv-solution-link,
.hv-solution-card:hover .hv-solution-link { text-decoration: underline; }

/* === CODE BLOCK === */
.hv-code-block {
    background: var(--hv-code-bg);
    border: 1px solid var(--hv-code-border);
    border-radius: 6px;
    padding: 12px 16px;
    font-family: var(--hv-mono);
    font-size: 12px;
    color: var(--hv-code-dim);
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.hv-code-block code {
    color: var(--hv-code-text);
    overflow-x: auto;
    white-space: nowrap;
}

/* The main quickstart is the three commands from docs/quickstart.html, so it
   needs real line breaks; the copy button rides the first line. */
.hv-code-block--multi {
    align-items: flex-start;
    padding: 14px 16px;
}

.hv-code-block--multi code {
    display: block;
    white-space: pre;
    line-height: 1.9;
}

.hv-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    background: none;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    padding: 2px 4px;
    transition: color 0.2s;
}

.hv-copy-btn:hover { color: var(--hv-code-text); }

.hv-quickstart { margin-top: 32px; }

.hv-quickstart-note {
    text-align: center;
    margin-top: 8px;
    font-size: 12px;
    color: var(--hv-text-muted);
}

/* === MAIN FOOTER === */
.hv-footer {
    text-align: center;
    padding: 24px 0;
    margin-top: 16px;
    font-size: 12px;
    color: var(--hv-text-muted);
    border-top: 1px solid var(--hv-border);
}

.hv-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 0;
    margin-bottom: 10px;
}

.hv-footer a {
    display: inline-block;
    padding: 4px 8px;
    color: var(--hv-text-dim);
    text-decoration: none;
}

.hv-footer a:hover { color: var(--hv-text); }

/* === RIGHT SIDEBAR === */
.hv-right-card {
    background: var(--hv-surface);
    border: 1px solid var(--hv-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 12px;
    text-decoration: none;
    display: block;
    transition: border-color 0.2s;
}

a.hv-right-card:hover { border-color: var(--hv-text-muted); }

.hv-right-card p {
    font-size: 13px;
    color: var(--hv-text-dim);
    line-height: 1.5;
    margin-bottom: 12px;
}

.hv-right-card .hv-btn-primary {
    width: 100%;
    text-align: center;
    margin-bottom: 12px;
}

.hv-right-card-note {
    margin: 8px 0;
    font-size: 12px;
    color: var(--hv-text-muted);
}

.hv-right-link {
    display: inline-block;
    padding: 4px 0;
    font-size: 13px;
    color: var(--hv-text-dim);
    text-decoration: none;
}

.hv-right-link:hover { color: var(--hv-text); }

/* === SIDEBAR BRAND / SOCIAL BLOCK === */
.hv-brand-block { padding: 16px; }

.hv-social-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.hv-social-row a {
    display: inline-block;
    padding: 3px 0;
    color: var(--hv-text-muted);
    text-decoration: none;
    font-size: 14px;
}

.hv-social-row a:hover { color: var(--hv-text); }

.hv-mini-links {
    font-size: 11px;
    margin-bottom: 16px;
}

.hv-mini-links a {
    display: inline-block;
    padding: 5px 8px 5px 0;
    color: var(--hv-text-muted);
    text-decoration: none;
}

.hv-mini-links a:hover { color: var(--hv-text); }

/* === THEME TOGGLE === */
.hv-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--hv-border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--hv-text-dim);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.hv-theme-toggle:hover {
    border-color: var(--hv-text-muted);
    color: var(--hv-text);
}

.hv-theme-toggle .hv-icon-sun { display: none; }
.hv-theme-toggle .hv-icon-moon { display: block; }

[data-theme="dark"] .hv-theme-toggle .hv-icon-sun { display: block; }
[data-theme="dark"] .hv-theme-toggle .hv-icon-moon { display: none; }

/* === OVERLAYS === */
.hv-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--hv-scrim);
    backdrop-filter: blur(4px);
    z-index: 100;
    overflow-y: auto;
    padding: 40px;
}

.hv-overlay.hv-open { display: block; }

.hv-overlay-content {
    background: var(--hv-surface);
    border: 1px solid var(--hv-border);
    border-radius: 12px;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 48px;
    position: relative;
    box-shadow: var(--hv-shadow);
}

.hv-overlay-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: var(--hv-text-dim);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}

.hv-overlay-close:hover { color: var(--hv-text); }

.hv-overlay h2 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 8px 0 24px;
    letter-spacing: -0.01em;
}

.hv-overlay h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 32px 0 12px;
}

.hv-overlay p {
    color: var(--hv-text-dim);
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.7;
}

.hv-overlay strong { color: var(--hv-text); }

.hv-overlay-flow {
    text-align: center;
    padding: 24px 0;
    margin-top: 32px;
    border-top: 1px solid var(--hv-border);
    font-family: var(--hv-mono);
    font-size: 14px;
    color: var(--hv-text-dim);
    letter-spacing: 0.05em;
}

.hv-overlay-flow span { color: var(--hv-accent-text); }

/* Deep links out of an overlay into the long-form pages. */
.hv-overlay-more {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--hv-border);
}

/* === BUILDERS === */
.hv-builder-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.hv-builder-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--hv-accent-dim);
    border: 1px solid var(--hv-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--hv-accent-text);
    flex-shrink: 0;
}

.hv-builder-info {
    display: block;
}

.hv-builder-info h3,
.hv-builder-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--hv-text);
}

.hv-builder-role {
    font-size: 12px;
    color: var(--hv-text-dim);
    margin-top: 2px;
    display: block;
}

.hv-builder-desc {
    font-size: 13px;
    color: var(--hv-text-dim);
    margin-top: 6px;
    line-height: 1.5;
}

/* =========================================================================
   RUNNING ON KDCUBE — live production telemetry (the "stats widget").
   Layout from docs/Guidelines/running-on-kdcube-layout-v3.html, rebuilt on
   the site's hv-* tokens. Feed left, telemetry right on desktop; on mobile
   the two panels stack telemetry-first, feed below.
   ========================================================================= */
/* Full-bleed white band: the white breaks out to the viewport edges while its
   contents (intro + both widgets) stay aligned to the page column. */
.hv-runtime {
    margin: 4px calc(50% - 50vw) 0;
    padding: 26px calc(50vw - 50%) 44px;
    background: #fff;
    border-top: 1px solid var(--card-border);
}
[data-theme="dark"] .hv-runtime { background: var(--bg-alt); border-color: var(--card-border); }

.hv-runtime-intro { margin-bottom: 20px; }
.hv-runtime-intro h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--hv-text);
    margin: 10px 0 8px;
}
/* Full width so it reads as a header over both panels, not just the left one. */
.hv-runtime-intro p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--hv-text-muted);
    max-width: none;
}
/* The eyebrow reads as teal — use the AA-safe accent-text, not the raw fill. */
.hv-label--accent { color: var(--hv-accent-text); }

.hv-runtime-panels {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
    align-items: start;
}

.hv-panel {
    background: var(--hv-surface);
    border: 1px solid var(--hv-border);
    border-radius: 8px;
    overflow: hidden;
}
.hv-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--hv-code-bg);
}
.hv-panel-head h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--hv-code-text);
    margin: 0;
}
.hv-panel-tag {
    font-size: 10px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--hv-accent);
    white-space: nowrap;
}
.hv-panel-body { padding: 16px; }
/* A panel body that holds a live widget iframe: the widget paints its own
   padding/chrome, so the frame sits edge-to-edge and fills the panel. */
.hv-panel-body--frame { padding: 0; }
.hv-panel-frame {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
}
/* A panel whose embedded widget draws its own card (header + body): drop this
   panel's border/background so the widget's frame is the only one shown. */
.hv-panel--bare {
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}

/* Feed */
.hv-news-item { padding: 12px 0; border-bottom: 1px solid var(--hv-border); }
.hv-news-item:first-child { padding-top: 0; }
.hv-news-item:last-child { padding-bottom: 0; border-bottom: none; }
.hv-news-headline {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--hv-text);
    margin: 0 0 4px;
}
.hv-news-dot {
    width: 7px;
    height: 7px;
    min-width: 7px;
    border-radius: 50%;
    background: var(--hv-accent);
    margin-top: 5px;
}
.hv-news-meta {
    font-size: 11px;
    color: var(--hv-text-muted);
    margin: 0;
    padding-left: 15px;
}

/* Telemetry — spend hero, 2x2 metric grid, tenant footer. Numbers are
   tabular so live updates don't jitter the layout. */
.hv-spend {
    text-align: center;
    padding: 2px 0 16px;
    border-bottom: 1px solid var(--hv-border);
}
.hv-metric-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hv-text-muted);
    margin-bottom: 4px;
}
.hv-spend-value {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    color: var(--hv-accent-text);
    font-variant-numeric: tabular-nums;
}
.hv-metric-grid { display: grid; grid-template-columns: 1fr 1fr; }
.hv-metric { padding: 14px 0; border-bottom: 1px solid var(--hv-border); }
.hv-metric:nth-child(odd) { padding-right: 12px; }
.hv-metric:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--hv-border); }
.hv-metric:nth-last-child(-n+2) { border-bottom: none; }
.hv-metric-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--hv-text);
    font-variant-numeric: tabular-nums;
}
.hv-tenant { padding-top: 12px; margin-top: 4px; }
.hv-tenant-value {
    font-family: var(--hv-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--hv-text);
}

/* Telemetry status chip states. "offline" is deliberately quiet, not alarming:
   the panel simply hasn't reached the runtime, and no fake numbers are shown. */
.hv-panel-tag[data-state="loading"] { color: var(--hv-text-muted); }
.hv-panel-tag[data-state="live"] { color: var(--hv-accent); }
.hv-panel-tag[data-state="offline"] { color: var(--hv-text-muted); }

/* =========================================================================
   RESPONSIVE — the source mock was desktop-only (a fixed 280 / 1fr / 280
   grid with sticky full-height sidebars). Everything below is new.
   ========================================================================= */

/* Below the three-column comfort zone: drop the right rail under the main
   column, keep the left rail as a nav strip. */
@media (max-width: 1100px) {
    .hv-page {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .hv-sidebar-right {
        grid-column: 1 / -1;
        position: static;
        height: auto;
        overflow: visible;
        border-top: 1px solid var(--hv-border);
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 12px;
        align-items: start;
    }

    .hv-sidebar-right .hv-right-card { margin-bottom: 0; }

    .hv-main { border-right: none; }
}

/* Single column: sidebars unstick and stack, grids collapse. */
@media (max-width: 820px) {
    .hv-page {
        display: block;
        max-width: 100%;
    }

    .hv-sidebar-left,
    .hv-sidebar-right {
        position: static;
        height: auto;
        overflow: visible;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 12px;
        align-items: start;
    }

    .hv-sidebar-left { border-bottom: 1px solid var(--hv-border); }
    .hv-sidebar-right { border-top: 1px solid var(--hv-border); }

    .hv-card,
    .hv-sidebar-right .hv-right-card { margin-bottom: 0; }

    .hv-brand-block { grid-column: 1 / -1; }

    .hv-main {
        border-left: none;
        border-right: none;
        padding: 24px 20px;
        min-height: 0;
    }

    .hv-hero h1,
    .hv-title-ghost { font-size: 34px; }

    .hv-for-you-grid { grid-template-columns: 1fr; }

    /* Stack the runtime panels: the app's output (news feed) first, its runtime
       telemetry below — the same reading order as the desktop left→right. */
    .hv-runtime-panels { grid-template-columns: 1fr; }
    .hv-panel--feed { order: -1; }

    .hv-overlay { padding: 16px; }

    .hv-overlay-content { padding: 32px 24px; }

    .hv-overlay h2 { font-size: 26px; }

    .hv-built-grid { grid-template-columns: 1fr; }

    .hv-built-card--lead {
        grid-column: auto;
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .hv-built-card--lead .hv-built-card-art {
        min-height: 230px;
        border-top: 1px solid var(--hv-border);
        border-left: 0;
    }

    .hv-solution-map {
        grid-template-columns: 1fr;
    }

    .hv-solution-map-art {
        min-height: 300px;
        border-top: 1px solid var(--hv-border);
        border-left: 0;
    }

    .hv-solution-map-art picture { height: auto; }

    .hv-solution-map-art img { height: auto; }

    .hv-solution-grid { grid-template-columns: 1fr; }

    .hv-logo-bar { gap: 20px; }
}

@media (max-width: 480px) {
    .hv-hero h1,
    .hv-title-ghost { font-size: 28px; }

    .hv-cta-row .hv-btn-primary,
    .hv-cta-row .hv-btn-secondary { flex: 1 1 100%; text-align: center; }

    .hv-preview-img { width: 100%; }

    .hv-built-card-art { height: 164px; }

    .hv-built-card--lead .hv-built-card-copy { padding: 22px; }

    .hv-built-card--lead .hv-built-card-art { min-height: 200px; }

    .hv-solution-map-copy { padding: 24px 22px; }

    .hv-solution-map-art { min-height: 240px; }

    .hv-solution-card { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hv-home *,
    .hv-home *::before,
    .hv-home *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hv-for-you-card:hover { transform: none; }

    /* home.js leaves the headline static here, so drop the reserved rows. */
    .hv-hero-title { display: block; }
    .hv-title-ghost { display: none; }
}

@media print {
    .hv-sidebar-left,
    .hv-sidebar-right,
    .hv-overlay { display: none; }

    .hv-page { display: block; }
    .hv-main { border: none; }
}

/* =========================================================================
   FULL-WIDTH LANDING (approved look) — overrides the earlier 3-rail ribbon.
   The page is now a single centered column (max 1240px) under the shared site
   header, with a hero (left copy + right floating field chips), a running band
   with the live widgets, "clouds", a triptych, the compare tables, a dark
   architecture treemap teaser, and a closing CTA. Fonts: Inter + Fraunces.
   Colours reuse the site tokens (styles.css): teal var(--accent) #01BEB2,
   navy var(--text) #0D1E2C, mint var(--bg), teal-tinted var(--card-border).
   ========================================================================= */
:root {
    --hv-display: 'Fraunces', Georgia, serif;
}

/* Single full-width column under the fixed shared header. */
.hv-page {
    display: block;
    max-width: 1240px;
    margin: 0 auto;
    min-height: 0;
    /* clear the fixed .header (~76-80px) — tight so the running band reaches the fold */
    padding: clamp(68px, 6vh, 82px) 40px 0;
}

.hv-main {
    padding: 0;
    border: 0;
    min-height: 0;
    min-width: 0;
}

/* On-page nav dots — fixed left rail. */
.hv-dots {
    position: fixed;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 13px;
}
.hv-dots a { display: flex; align-items: center; gap: 8px; color: var(--hv-text-muted); font-size: 11px; font-weight: 600; text-decoration: none; }
.hv-dots a .n { width: 18px; text-align: right; font-variant-numeric: tabular-nums; }
.hv-dots a .d { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--hv-text-muted); }
.hv-dots a .lbl { opacity: 0; transition: opacity .2s; text-transform: uppercase; letter-spacing: .04em; }
.hv-dots a:hover .lbl { opacity: 1; }
.hv-dots a:hover .d, .hv-dots a.hv-on .d { background: var(--hv-accent); border-color: var(--hv-accent); }
.hv-dots a:hover, .hv-dots a.hv-on { color: var(--hv-accent-text); }
@media (max-width: 1280px) { .hv-dots { display: none; } }

/* Shared bits */
.hv-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--hv-accent-text);
}
.hv-eyebrow--muted { color: var(--hv-text-muted); }
.hv-eyebrow--accent { color: var(--hv-accent); }

.hv-btn-sm { padding: 8px 16px; font-size: 13px; }

/* === HERO (full-width) === */
.hv-hero { margin: 0; padding: 26px 0 6px; }
.hv-hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.hv-hero-side { padding-top: 6px; }

.hv-hero-copy h1 { font-size: 38px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
/* Lock the headline to a stable 3 lines: the stem wraps to 2, the rotating
   accent is forced onto its own line (a <br> in the markup) and never wraps,
   so swapping phrases can't change the line count or jump the page. */
.hv-hero-copy .hv-hero-title { margin: 14px 0 0; min-height: calc(38px * 1.1 * 3); }
.hv-hero-copy h1 .hv-rotate,
.hv-hero-copy h1 .hv-rotate-text { color: var(--hv-accent); white-space: nowrap; }

.hv-lede {
    margin: 20px 0 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--hv-text-dim);
    max-width: 62ch;
}
.hv-lede b { color: var(--hv-text); font-weight: 600; }

/* Install boxes — thin dark code boxes, hugging their content and right-aligned
   under the scattered chips. Height tuned to read as light as the widget bars. */
/* Two install commands, side by side under the subhead. Static dark boxes. */
.hv-install { margin: 26px 0 0; display: flex; gap: 12px; flex-wrap: wrap; }
.hv-install-col { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hv-install-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--hv-text-muted);
}
.hv-install-box { margin: 0; padding: 9px 14px; font-size: 12px; border-radius: 6px; width: fit-content; max-width: 100%; gap: 14px; }
.hv-install-box .hv-copy-btn { min-height: 18px; }
.hv-install-box code { color: #DDECEA; }
.hv-install-p { color: var(--hv-accent); }
/* Chip beside the label (not inside the copyable command). */
.hv-install-soon {
    font-family: var(--hv-font);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--hv-accent-text);
    background: rgba(var(--accent-rgb), .10);
    border: 1px solid var(--hv-accent-line);
    border-radius: 999px;
    padding: 1px 7px;
    flex-shrink: 0;
}

.hv-cta-links {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 18px 0 0;
    font-size: 14px;
    font-weight: 600;
    flex-wrap: wrap;
}
.hv-cta-links a { color: var(--hv-text-dim); text-decoration: none; }
.hv-cta-links a:hover { color: var(--hv-accent-text); }
.hv-cta-links .hv-go { color: var(--hv-accent-text); }

/* === FIELD CHIPS — gently scattered, content-sized === */
.hv-fly { position: relative; min-height: 234px; }
.hv-fly::before {
    content: "";
    position: absolute;
    inset: -12% -12%;
    border-radius: 44%;
    background: radial-gradient(circle at 56% 38%, rgba(var(--accent-rgb), .08), transparent 68%);
    pointer-events: none;
    z-index: 0;
}
.hv-chip {
    position: absolute;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--hv-text-dim);
    cursor: pointer;
    text-decoration: none;
    /* Opaque bg — NO backdrop-filter: animating a blur under a running
       transform repaints the whole page every frame (the flicker). */
    background: #FBFDFD;
    border: 1px solid var(--hv-border);
    border-radius: 10px;
    padding: 8px 14px;
    white-space: nowrap;
    box-shadow: 0 8px 22px rgba(13, 30, 44, .05);
    opacity: 0;
    animation: hvChipIn .5s ease forwards, hvBob 6.5s ease-in-out infinite;
    /* isolate the bob onto its own compositor layer so it never repaints siblings */
    will-change: transform;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
/* Hover feedback via colour only — no transform, so it can't fight the
   transform-based bob (which would jitter). The bob just pauses. */
.hv-chip:hover {
    border-color: rgba(var(--accent-rgb), .55);
    background: #fff;
    box-shadow: 0 12px 26px rgba(var(--accent-rgb), .14);
    color: var(--hv-text);
    animation-play-state: paused, paused;
}
.hv-chip .tx { color: inherit; }
.hv-chip .act { color: var(--hv-text-muted); font-size: 13px; font-weight: 700; }
.hv-chip--teal { color: var(--hv-accent-text); border-color: rgba(var(--accent-rgb), .35); background: rgba(var(--accent-rgb), .06); }
.hv-chip--teal .act { color: var(--hv-accent); }
@keyframes hvChipIn { to { opacity: 1; } }
@keyframes hvBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
/* Gentler float for the wrapping mobile row, so bobbing chips can't touch across rows. */
@keyframes hvBobSm { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
/* Scattered placement; the second delay desyncs each chip's bob so they don't
   rise and fall in lockstep. */
.hv-k1 { top: 0;   left: 6%;  animation-delay: .05s, 0s; }
.hv-k2 { top: 5%;  left: 52%; animation-delay: .12s, .7s; }
.hv-k3 { top: 25%; left: 24%; animation-delay: .19s, 1.2s; }
.hv-k4 { top: 30%; left: 60%; animation-delay: .26s, .3s; }
.hv-k5 { top: 50%; left: 2%;  animation-delay: .33s, 1.5s; }
.hv-k6 { top: 53%; left: 42%; animation-delay: .40s, .9s; }
.hv-k7 { top: 74%; left: 26%; animation-delay: .47s, .4s; }
.hv-k8 { top: 77%; left: 54%; animation-delay: .54s, 1.1s; }

/* Dark theme: chips read on the darker ground */
[data-theme="dark"] .hv-chip { background: #1B2335; }
[data-theme="dark"] .hv-chip:hover { background: var(--hv-surface-alt); }

/* Draggable chips: grab one, drag it, let go — home.js springs it home. Drag
   uses the independent `translate` property so it composes with the bob's
   `transform` (no conflict); while held the bob is merely paused and the chip
   lifts. */
.hv-chip { cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; }
.hv-chip.hv-dragging {
    animation-play-state: paused;
    cursor: grabbing;
    z-index: 20;
    box-shadow: 0 18px 40px rgba(13, 30, 44, .18);
}

/* === RUNNING band — live-cap pulse (widgets themselves are preserved) === */
.hv-live-cap { display: inline-flex; align-items: center; gap: 8px; }
.hv-pulse {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--hv-accent);
    animation: hvPulse 2.4s infinite;
}
@keyframes hvPulse {
    0%   { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .45); }
    70%  { box-shadow: 0 0 0 9px rgba(var(--accent-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

/* === CHOOSE THE HELP YOU NEED — 2×2 card grid === */
.hv-help { padding: 44px 0 8px; }
.hv-help-lead { max-width: 56ch; }
.hv-help-lead h2 {
    font-family: var(--hv-display);
    font-weight: 600;
    font-size: 30px;
    letter-spacing: -.01em;
    margin: 8px 0 0;
}
.hv-help-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 26px;
}
.hv-hcard {
    display: block;
    background: var(--hv-surface);
    border: 1px solid var(--hv-border);
    border-radius: 10px;
    padding: 20px 22px;
    text-decoration: none;
    color: var(--hv-text);
    transition: border-color .18s, transform .18s, box-shadow .18s;
}
/* No permanent accent bar; on hover the whole card warms to teal and lifts. */
.hv-hcard:hover {
    border-color: rgba(var(--accent-rgb), .5);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(var(--accent-rgb), .12);
}
/* the link arrow nudges forward on hover for a little life */
.hv-hcard-lk { transition: transform .18s; }
.hv-hcard:hover .hv-hcard-lk { transform: translateX(3px); }
.hv-hcard h3 { font-size: 16px; font-weight: 700; margin: 0 0 6px; color: var(--hv-text); }
.hv-hcard p { font-size: 13.5px; color: var(--hv-text-dim); line-height: 1.55; margin: 0; }
.hv-hcard-lk { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--hv-accent-text); }
.hv-hcard:hover .hv-hcard-lk { text-decoration: underline; }

/* === TRIPTYCH === */
.hv-trip { padding: 24px 0 8px; }
.hv-trip-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.hv-trip-head h2 { font-family: var(--hv-display); font-weight: 600; font-size: 32px; letter-spacing: -.01em; margin: 6px 0 0; }
.hv-trip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.hv-feat h3 { font-family: var(--hv-display); font-weight: 600; font-size: 23px; margin: 0 0 12px; line-height: 1.15; }
.hv-feat-img {
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    border: 1px solid var(--hv-border);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), .12), rgba(var(--accent-rgb), .02));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hv-text-muted);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.hv-feat-art {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hv-feat p { margin: 13px 0 0; font-size: 14px; color: var(--hv-text-dim); line-height: 1.55; }
.hv-feat-lk { display: inline-block; margin: 11px 0 0; font-size: 13px; font-weight: 600; color: var(--hv-accent-text); text-decoration: none; }
.hv-feat-lk:hover { text-decoration: underline; }

/* === KDCUBE RUNTIME ARCHITECTURE TEASER === */
/* Full-bleed dark navy band: the fill breaks out to the viewport edges while
   the inner content stays centred in the page column. */
.hv-archband {
    /* Fixed warm navy in BOTH themes (like the terminal code block): the band's
       inner cells and text are authored for a dark ground, and --hv-text flips
       light in dark mode — which washed the whole map out. */
    background: #0D1E2C;
    color: #fff;
    padding: 60px 0;
    margin: 48px calc(50% - 50vw);
    position: relative;
    overflow: hidden;
    border-radius: 0;
}
.hv-archband::before {
    content: "";
    position: absolute;
    right: -120px; top: -80px;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--accent-rgb), .16), transparent 68%);
    pointer-events: none;
}
.hv-archband-in { max-width: 1240px; margin: 0 auto; padding: 0 40px; position: relative; }
.hv-archband h2 { font-family: var(--hv-display); font-weight: 600; font-size: 34px; letter-spacing: -.01em; margin: 8px 0 8px; color: #fff; }
.hv-archband-sub { color: #9FB6C4; max-width: 78ch; margin: 0 0 30px; font-size: 15.5px; line-height: 1.6; }

.hv-system-map {
    max-width: 1120px;
    display: flex;
    flex-direction: column;
    position: relative;
}
.hv-system-layer {
    display: grid;
    grid-template-columns: 154px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    background: rgba(255, 255, 255, .035);
}
.hv-system-layer-label {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 5px;
    color: #DCE8EF;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.hv-system-layer-label span {
    display: inline-grid;
    place-items: center;
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    color: #82E5DF;
    font-family: var(--hv-mono);
    font-size: 9px;
    letter-spacing: 0;
}
.hv-system-nodes {
    display: grid;
    gap: 8px;
    min-width: 0;
}
.hv-system-nodes--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hv-system-nodes--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hv-system-node {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 7px;
    background: rgba(5, 15, 25, .4);
}
.hv-system-node strong,
.hv-system-node small { display: block; }
.hv-system-node strong {
    color: #F2FBFC;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 650;
}
.hv-system-node small {
    margin-top: 5px;
    color: #8FA8B7;
    font-size: 10.5px;
    line-height: 1.35;
}
.hv-system-layer--clients { border-color: rgba(255, 255, 255, .15); }
.hv-system-layer--governance {
    border-color: rgba(92, 145, 225, .34);
    background: rgba(67, 114, 195, .1);
}
.hv-system-layer--governance .hv-system-node { border-color: rgba(92, 145, 225, .26); }
.hv-system-layer--ingress { border-color: rgba(255, 255, 255, .18); }
.hv-system-layer--fabric {
    border-style: dashed;
    border-color: rgba(var(--accent-rgb), .45);
    background: rgba(var(--accent-rgb), .08);
}
.hv-system-layer--fabric .hv-system-node { border-color: rgba(var(--accent-rgb), .27); }
.hv-system-layer--apps {
    border-color: rgba(var(--accent-rgb), .58);
    background: linear-gradient(110deg, rgba(var(--accent-rgb), .19), rgba(67, 114, 195, .1));
    box-shadow: inset 3px 0 0 rgba(var(--accent-rgb), .8);
}
.hv-system-layer--infra {
    border-color: rgba(198, 243, 241, .2);
    background: rgba(198, 243, 241, .045);
}
.hv-system-flow {
    height: 32px;
    margin-left: 168px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7F9AA9;
}
.hv-system-flow::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: rgba(var(--accent-rgb), .5);
}
.hv-system-flow::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: 7px;
    height: 7px;
    border-right: 1px solid rgba(var(--accent-rgb), .8);
    border-bottom: 1px solid rgba(var(--accent-rgb), .8);
    transform: translateX(-3px) rotate(45deg);
}
.hv-system-flow span {
    position: relative;
    z-index: 1;
    padding: 2px 9px;
    /* masks the connector line — must match the band's fixed navy in both themes */
    background: #0D1E2C;
    font-family: var(--hv-mono);
    font-size: 9px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.hv-app-runtime {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(var(--accent-rgb), .34);
    border-radius: 8px;
    background: rgba(4, 18, 27, .55);
}
.hv-app-runtime-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}
.hv-app-runtime-head strong { color: #EAFBF9; font-size: 12px; font-weight: 650; }
.hv-app-runtime-head span { color: #89AAA9; font-size: 10px; }
.hv-app-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.hv-app-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid rgba(var(--accent-rgb), .4);
    border-radius: 6px;
    background: rgba(var(--accent-rgb), .12);
}
.hv-app-card strong { color: #FFFFFF; font-size: 12px; }
.hv-app-card span { color: #A9CFCD; font-size: 10px; text-align: right; }
.hv-app-runtime-foot {
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid rgba(var(--accent-rgb), .18);
    color: #9FC5C3;
    font-size: 10.5px;
    line-height: 1.4;
    text-align: center;
}
.hv-arch-key {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin: 22px 0 0;
    color: #9FB6C4;
    font-size: 11.5px;
}
.hv-arch-key span { display: inline-flex; align-items: center; gap: 7px; }
.hv-arch-key i {
    width: 18px;
    height: 9px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 2px;
    display: inline-block;
}
.hv-key-client { background: rgba(255, 255, 255, .07); }
.hv-key-platform { background: rgba(67, 114, 195, .24); }
.hv-key-app { background: rgba(var(--accent-rgb), .32); }
.hv-key-infra { background: rgba(198, 243, 241, .1); }
.hv-archband-cta { margin-top: 26px; display: flex; gap: 12px; }

/* === PLATFORM COMPARISON MATRIX === */
/* Builds on the existing .hv-comparison chrome; the matrix centers the framework
   and KDCube columns, bolds the first column, and tints the KDCube column. */
.hv-matrix .hv-cmp { width: 100%; border-collapse: collapse; min-width: 640px; }
.hv-matrix .hv-cmp th,
.hv-matrix .hv-cmp td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--hv-border);
    color: var(--hv-text-dim);
}
.hv-matrix .hv-cmp thead th {
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--hv-text-dim);
    background: var(--hv-surface);
    text-transform: none;
    letter-spacing: 0;
}
/* Center the framework + KDCube columns (header + data). First column stays left. */
.hv-matrix .hv-cmp .hv-c { text-align: center; }
/* First column: the production concern, bold. */
.hv-matrix .hv-cmp tbody th[scope="row"] {
    text-align: left;
    color: var(--hv-text);
    font-weight: 700;
}
/* Small grey sublabel under a column header ("$39 / seat", "self-hosted"). */
.hv-matrix .hv-cmp .hv-c-sub {
    display: block;
    margin-top: 3px;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--hv-text-muted);
}
/* KDCube column: teal header + faint teal tint down the column. */
.hv-matrix .hv-cmp thead th.hv-kd { color: var(--hv-accent-text); }
.hv-matrix .hv-cmp thead th.hv-kd .hv-c-sub { color: var(--hv-accent-text); opacity: .7; }
.hv-matrix .hv-cmp td.hv-kd {
    background: rgba(1, 190, 178, .05);
    color: var(--hv-text);
    font-weight: 500;
}
.hv-matrix .hv-cmp .hv-dim { color: var(--hv-text-muted); }
.hv-matrix .hv-cmp .hv-ok { color: var(--hv-text-muted); font-weight: 600; }
.hv-matrix .hv-cmp .hv-kdcheck { color: var(--hv-accent-text); font-weight: 700; }
.hv-matrix .hv-cmp tbody tr:last-child th,
.hv-matrix .hv-cmp tbody tr:last-child td { border-bottom: none; }

/* === CLOSING CTA === */
.hv-close { padding: 60px 0 30px; text-align: center; }
.hv-close .hv-eyebrow { display: block; margin-bottom: 10px; }
.hv-close h2 { font-family: var(--hv-display); font-weight: 600; font-size: 34px; margin: 0 0 10px; }
.hv-close p { color: var(--hv-text-dim); margin: 0 auto 24px; max-width: 56ch; font-size: 16px; }
.hv-close-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hv-close-more { margin-top: 18px; }

/* === RESPONSIVE (landing) === */
@media (max-width: 900px) {
    /* minmax(0,…) lets the column shrink below its content's min width; without
       it the nowrap headline forces the track wider than the phone and the text
       gets clipped on the right. */
    .hv-hero-grid { grid-template-columns: minmax(0, 1fr); }
    /* Ghosts must match the visible h1 exactly (font too) so they reserve the
       right height and nothing shows a gap. */
    .hv-hero-copy h1,
    .hv-title-ghost { font-size: 32px; }
    /* On a phone the rotating accent wraps — for the visible h1 AND the ghosts —
       so the headline never forces width. The ghosts stay (visibility:hidden) to
       reserve the tallest phrase's height, so rotating can't jump the page. */
    .hv-hero-copy h1 .hv-rotate,
    .hv-hero-copy h1 .hv-rotate-text,
    .hv-title-ghost .hv-rotate,
    .hv-title-ghost .hv-rotate-text { white-space: normal; }
    /* Always reserve 5 rows on mobile (stem wraps to 3 + accent to 2), so the
       headline block is a fixed height and rotating phrases never jump the page.
       Match the desktop rule's specificity so this floor actually applies. */
    .hv-hero-copy .hv-hero-title { min-height: calc(32px * 1.1 * 5); }

    /* Show the chips as a wrapping row (the desktop scatter needs width we lack);
       static + no bob so they read as a tidy tag list, and taps/scroll are free. */
    .hv-hero-side { padding-top: 18px; }
    .hv-fly { display: flex; flex-wrap: wrap; gap: 14px 8px; position: static; min-height: 0; }
    .hv-fly::before { display: none; }
    /* Keep the entrance + a gentler bob (swap only the keyframe name, so the
       per-chip delays/timing from the base rule still desync each chip). */
    .hv-chip { position: static; animation-name: hvChipIn, hvBobSm; touch-action: auto; cursor: default; }

    .hv-help-grid { grid-template-columns: 1fr; }
    .hv-trip-grid { grid-template-columns: 1fr; }
    .hv-system-layer { grid-template-columns: 1fr; gap: 10px; }
    .hv-system-layer-label { padding: 0 2px; }
    .hv-system-nodes--3,
    .hv-system-nodes--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hv-system-flow { margin-left: 0; }
}
@media (max-width: 820px) {
    .hv-page { padding-left: 20px; padding-right: 20px; }
    .hv-archband-in { padding: 0 20px; }
}
@media (max-width: 600px) {
    .hv-archband { padding: 44px 0; }
    .hv-archband h2 { font-size: 29px; }
    .hv-system-nodes--3,
    .hv-system-nodes--4,
    .hv-app-cards { grid-template-columns: 1fr; }
    .hv-app-runtime-head { align-items: flex-start; flex-direction: column; gap: 4px; }
    .hv-app-card span { text-align: left; }
    .hv-arch-key { display: grid; grid-template-columns: 1fr; gap: 9px; }
}

@media (prefers-reduced-motion: reduce) {
    .hv-chip { animation: none; opacity: 1; }
    .hv-pulse { animation: none; }
}
