/* ============================================================================
   KCB BUNI home page — content styling. RUNTIME file (edit + refresh, NO rebuild).
   ALL selectors are scoped under .kcb-home so nothing leaks into the DevPortal shell.
   The DevPortal's own header/nav wraps this content; only the page BODY is styled here.
   Brand: navy #003057 · green #84bc02 · Outfit.
   ============================================================================ */

/* KCB: use the DevPortal's own bundled 'Outfit' font (declared in site/public/css/overrides.css,
   a variable font 300–700) so the marketing pages render IDENTICALLY to the rest of the portal
   and the design. (Previously a separate 'OutfitHome' face declared 300–800; requesting weights
   the file doesn't have made the browser synthesize faux-bold — headings looked too heavy.) */

.kcb-home {
    /* Palette aligned to the Figma "Home — Buni Developer Portal" frame. */
    --navy: #002b4d;
    /* Slightly lighter navy for the CTA band, so the "Ready to build" bar and the
       footer read as two distinct shades (matches the customer mockup). Runtime-tunable. */
    --navy-2: #0a3a63;
    --green: #84bd00;
    --green-2: #6fa300;
    --green-soft: #e5f2cc;
    --green-tint: #f5faec;
    --ink: #222223;
    --muted: #767678;
    --line: #e6eaee;
    --line-strong: #c2ccd3;
    --bg-soft: #f4f7f9;
    --radius: 12px;
    --maxw: 1440px;

    /* .kcb-home is a flex child of the DevPortal contentWrapper (flex row) — grow to
       fill the full width so hero / CTA bar / footer render edge-to-edge. */
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;

    font-family: 'Outfit', 'Helvetica', 'Arial', sans-serif;
    color: var(--ink);
    background: #fff;
    line-height: 1.55;
}
.kcb-home * { box-sizing: border-box; }
.kcb-home img { max-width: 100%; display: block; }
.kcb-home a { text-decoration: none; color: inherit; }

.kcb-home .kh-container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }
.kcb-home .kh-title { font-size: 1.9rem; font-weight: 600; color: var(--navy); margin: 0 0 6px; }
.kcb-home .kh-sub { color: var(--muted); margin: 0 0 34px; font-size: 1rem; }

/* ---- buttons ---- */
.kcb-home .kh-btn {
    display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-weight: 600;
    font-size: .92rem; padding: 11px 20px; border-radius: 8px; cursor: pointer;
    border: 1.5px solid transparent; transition: all .18s ease; white-space: nowrap;
}
.kcb-home .kh-btn.primary { background: var(--green); color: #fff; }
.kcb-home .kh-btn.primary:hover { background: var(--green-2); }
.kcb-home .kh-btn.outline { background: transparent; color: var(--green-2); border-color: var(--green); }
.kcb-home .kh-btn.outline:hover { background: var(--green); color: #fff; }
.kcb-home .kh-btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.kcb-home .kh-btn.ghost:hover { background: rgba(255,255,255,.12); }
.kcb-home .kh-btn.lg { padding: 13px 26px; font-size: 1rem; }
.kcb-home .kh-link { color: var(--green-2); font-weight: 600; font-size: .88rem; display: inline-flex; align-items: center; gap: 6px; }
.kcb-home .kh-link:hover { gap: 10px; }

/* ---- hero ---- */
.kcb-home .kh-hero { padding: 60px 0 40px; }
.kcb-home .kh-hero .kh-container { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.kcb-home .kh-badge { display: inline-block; background: var(--green-soft); color: #000; font-size: .78rem; font-weight: 600; padding: 6px 14px; border-radius: 20px; margin-bottom: 22px; }
.kcb-home .kh-hero h1 { font-size: 2.625rem; line-height: 1.26; color: var(--navy); margin: 0 0 18px; font-weight: 300; }
/* Figma hero sub-lead: both lines Outfit 32px / 600, navy. */
.kcb-home .kh-lead { font-size: 2rem; font-weight: 600; color: var(--navy); margin: 0 0 26px; line-height: 1.25; }
.kcb-home .kh-lead .thin { font-weight: 600; }
.kcb-home .kh-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---- code mock ---- */
.kcb-home .kh-code-wrap { position: relative; }
.kcb-home .kh-code { background: #0c2233; border-radius: 14px; box-shadow: 0 24px 60px rgba(0,48,87,.22); overflow: hidden; font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; }
.kcb-home .kh-code-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.kcb-home .kh-code-head .dot { width: 11px; height: 11px; border-radius: 50%; }
.kcb-home .kh-code-head .r { background: #ff5f57; } .kcb-home .kh-code-head .y { background: #febc2e; } .kcb-home .kh-code-head .g { background: #28c840; }
.kcb-home .kh-code-head .fn { margin-left: 8px; color: #7fa8c0; font-size: .78rem; }
.kcb-home .kh-code pre { margin: 0; padding: 18px 20px; font-size: .82rem; line-height: 1.7; color: #cfe3ef; overflow-x: auto; }
.kcb-home .kh-code .k { color: #7fd1ff; } .kcb-home .kh-code .s { color: #9ee493; } .kcb-home .kh-code .n { color: #ffd479; } .kcb-home .kh-code .p { color: #6d8ba0; }
.kcb-home .kh-pay { position: absolute; right: -14px; bottom: -26px; background: #fff; border-radius: 12px; box-shadow: 0 16px 40px rgba(0,48,87,.16); padding: 14px 18px; min-width: 210px; }
.kcb-home .kh-pay .top { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.kcb-home .kh-pay .top .live { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.kcb-home .kh-pay .amt { font-size: 1.25rem; font-weight: 600; color: var(--navy); margin: 4px 0 2px; }
.kcb-home .kh-pay .meta { font-size: .72rem; color: var(--muted); }

/* ---- networks ---- */
.kcb-home .kh-net { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kcb-home .kh-net .kh-container { display: flex; align-items: center; gap: 34px; padding: 20px 40px; flex-wrap: wrap; }
.kcb-home .kh-net .lbl { color: var(--muted); font-size: .9rem; }
.kcb-home .kh-net .item { color: var(--navy); font-weight: 600; font-size: .92rem; }

/* ---- features ---- */
.kcb-home .kh-features { padding: 60px 0 40px; }
.kcb-home .kh-fgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px; }
.kcb-home .kh-feature { border-top: 2px solid var(--line-strong); padding-top: 18px; }
.kcb-home .kh-feature .fi { color: var(--green); margin-bottom: 12px; }
.kcb-home .kh-feature .fi svg { width: 24px; height: 24px; }
.kcb-home .kh-feature h3 { font-size: 1.05rem; color: var(--navy); margin: 0 0 8px; font-weight: 600; }
.kcb-home .kh-feature p { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }

/* ---- what can buni do ---- */
.kcb-home .kh-do { background: var(--bg-soft); padding: 60px 0; }
.kcb-home .kh-cgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.kcb-home .kh-docard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.kcb-home .kh-docard .thumb { aspect-ratio: 16/10; overflow: hidden; }
.kcb-home .kh-docard .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* KCB: image placeholder + fade-in (FadeImg.jsx). Until an illustration has loaded, its box shows a soft
   brand-tinted shimmer (space is already reserved by aspect-ratio, so nothing jumps); the image then fades
   in and the shimmer stops. Shared by the content pages (use-cases.css adds its own container). */
.kcb-home .kh-img { opacity: 0; transition: opacity .4s ease; }
.kcb-home .kh-img.is-loaded { opacity: 1; }
.kcb-home .kh-docard .thumb {
    background: linear-gradient(100deg, #e9f2d8 30%, #f6faee 50%, #e9f2d8 70%);
    background-size: 200% 100%;
    animation: kh-shimmer 1.4s linear infinite;
}
.kcb-home .kh-docard .thumb:has(.kh-img.is-loaded) { animation: none; background: none; }
@keyframes kh-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) {
    .kcb-home .kh-img { transition: none; }
    .kcb-home .kh-docard .thumb { animation: none; }
}
.kcb-home .kh-docard .body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.kcb-home .kh-docard h3 { color: var(--green); font-size: 1.05rem; margin: 0 0 10px; font-weight: 600; }
.kcb-home .kh-docard p { color: var(--muted); font-size: .84rem; margin: 0 0 14px; }
.kcb-home .kh-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.kcb-home .kh-tags span { background: var(--bg-soft); border: 1px solid var(--line); color: #4a5b67; font-size: .72rem; padding: 4px 10px; border-radius: 6px; }
.kcb-home .kh-docard .kh-btn { margin-top: auto; align-self: flex-start; }

/* ---- partner ---- */
.kcb-home .kh-partner { padding: 60px 0; background: var(--green-tint); }
/* KCB: this section has no subtitle, so give the title real breathing room above the cards. */
.kcb-home .kh-partner .kh-title { margin-bottom: 36px; }
.kcb-home .kh-pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.kcb-home .kh-pcard { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; background: #fff; }
/* KCB: partner cards use a green border (brand accent). !important keeps it consistent over any
   DevPortal global style, and outline/box-shadow are cleared so only the clean green border shows. */
.kcb-home .kh-partner .kh-pcard,
.kcb-home .kh-partner .kh-pcard:hover,
.kcb-home .kh-partner .kh-pcard:focus,
.kcb-home .kh-partner .kh-pcard:focus-within {
    border: 1px solid var(--green) !important;
    outline: none !important;
    box-shadow: none !important;
}
.kcb-home .kh-pcard h3 { color: var(--ink); font-size: 1.02rem; margin: 0 0 12px; font-weight: 600; line-height: 1.3; }
.kcb-home .kh-pcard p { color: var(--muted); font-size: .85rem; margin: 0 0 16px; flex: 1; }

/* ---- cta ---- */
.kcb-home .kh-ctabar { background: var(--navy-2); color: #fff; }
.kcb-home .kh-ctabar .kh-container { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 40px 40px; flex-wrap: wrap; }
.kcb-home .kh-ctabar h2 { font-size: 1.55rem; margin: 0 0 6px; font-weight: 600; }
.kcb-home .kh-ctabar p { margin: 0; color: #b9cdda; font-size: .95rem; }
.kcb-home .kh-ctabar .acts { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- footer ---- */
.kcb-home .kh-footer { background: var(--navy); color: #cdd9e2; }
.kcb-home .kh-footer .top { max-width: var(--maxw); margin: 0 auto; padding: 48px 40px 30px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.kcb-home .kh-footer .top img { height: 44px; }
.kcb-home .kh-footer .addr { font-size: .82rem; color: #9fb3c1; margin-top: 18px; line-height: 1.7; }
/* Figma footer headings: large Title-Case (28px/600), not small uppercase. */
.kcb-home .kh-footer h4 { color: #fff; font-size: 1.5rem; font-weight: 600; letter-spacing: 0; text-transform: none; margin: 0 0 18px; }
.kcb-home .kh-footer .col a { display: block; color: #b9cdda; font-size: .95rem; padding: 6px 0; }
.kcb-home .kh-footer .col a:hover { color: var(--green); }
.kcb-home .kh-footer .bottom { border-top: 1px solid rgba(255,255,255,.1); max-width: var(--maxw); margin: 0 auto; padding: 16px 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: #8ea6b6; }

/* ---- responsive ---- */
@media (max-width: 980px) {
    .kcb-home .kh-hero .kh-container { grid-template-columns: 1fr; }
    .kcb-home .kh-fgrid, .kcb-home .kh-cgrid, .kcb-home .kh-pgrid { grid-template-columns: repeat(2, 1fr); }
    .kcb-home .kh-footer .top { grid-template-columns: 1fr 1fr; }
    /* Keep the "Payment received" card as a FLOATING card over the code block's corner (like
       desktop) instead of dropping it to a full-width block below. Kept inside the edge, and the
       code block gets bottom room so the card's overhang doesn't collide with the next section. */
    .kcb-home .kh-code-wrap { margin-bottom: 44px; }
    .kcb-home .kh-pay { right: 12px; bottom: -22px; min-width: 0; max-width: 66%; margin: 0; }
}
@media (max-width: 640px) {
    .kcb-home .kh-container { padding: 0 20px; }
    /* networks strip: put the label on its own line and let the network names wrap
       into a neat, evenly-spaced row below it (instead of an uneven single flex row). */
    .kcb-home .kh-net .kh-container { padding: 16px 20px; gap: 8px 18px; }
    .kcb-home .kh-net .lbl { flex-basis: 100%; font-size: .82rem; margin-bottom: 2px; }
    .kcb-home .kh-net .item { font-size: .86rem; }
    .kcb-home .kh-hero h1 { font-size: 2rem; }
    .kcb-home .kh-fgrid, .kcb-home .kh-cgrid, .kcb-home .kh-pgrid { grid-template-columns: 1fr; }
    .kcb-home .kh-footer .top { grid-template-columns: 1fr; }
    .kcb-home .kh-ctabar .kh-container { flex-direction: column; align-items: flex-start; }
}
