/* ════════════════════════════════════════════════════════════════════════════
   KAPITAL HOME LAYER (2026-09-27)

   Why this exists: the homepage was ten sections of one shape — centred eyebrow,
   centred Fraunces heading, centred intro, card grid — with four near-identical
   grids and three different card treatments (gold left rule here, gold corner
   there, nothing elsewhere). Measured at 1440px it ran 9,459px for ~1,200 words,
   with ~500px of dead navy under the hero and gaps up to ~500px between sections.

   Three rules applied here:
     1. ONE card component (.kp-card) with one accent treatment, one padding scale.
     2. ONE rhythm scale (--kp-section-y / --kp-head-gap), tightened.
     3. VARIED artifacts, so consecutive sections do not share a silhouette:
        split editorial, timeline rail, feature cards, comparison table,
        diagnostic table, figure plates + stat strip, full-bleed band, facts strip.
   All tokens are the existing WCAG-verified ones; no new colour values.
   ════════════════════════════════════════════════════════════════════════════ */

:root {
    --kp-section-y: clamp(3rem, 5.8vw, 5rem);   /* was 4.5rem: main.css section padding is 5rem */
    --kp-head-gap: clamp(1.6rem, 2.6vw, 2.4rem);
    --kp-card-pad: clamp(1.2rem, 2.3vw, 2rem);   /* was 1.6rem: .blog-card/.challenge-card use 2rem */
    --kp-card-radius: 10px;
}

/* 1 — RHYTHM: pull the hero to its content and cap section padding. */
/* The hero title is 4 words wide in a narrow column: without balance it broke as
   "Enterprise / automation / that / runs itself" and orphaned "that". */
.home .hero-title { text-wrap: balance; }
.home .hero {
    min-height: auto;
    /* The base .hero rule caps at max-width:800px with text-align:center, which
       squeezed the two-column grid to 800px and left the headline a 408px column
       (hence "Enterprise / automation / that / runs itself"). The grid carries its
       own 1200px cap; the section itself must not add one. */
    max-width: 1200px; text-align: left;
    padding: clamp(3.25rem, 6.5vw, 5.5rem) 2rem clamp(2.75rem, 4.5vw, 4rem);
}
.home section { padding: var(--kp-section-y) 2rem; }
.home .section-header { margin-bottom: var(--kp-head-gap); }
.home .section-intro { margin-bottom: clamp(1.5rem, 2.4vw, 2rem); }

/* Left-aligned header variant, used where a section opens an editorial column
   rather than a centred grid — the single biggest cure for the "same shape" read. */
.kp-header--left { text-align: left; margin-bottom: clamp(1.5rem, 2.4vw, 2.1rem); }
/* Heading size parity: a bare h2 outside .section-header falls back to the
   base h2 rule and renders smaller than the centred sections' headings. */
.kp-header--left h2 {
    font-family: var(--font-display); font-weight: 500; letter-spacing: -0.03em;
    font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.15; margin: 0;
    color: var(--text-primary);
}
.kp-header--left .kp-lede { max-width: 62ch; margin: 0; text-align: left; }

/* 2 — ONE CARD. Gold left rule on hover/focus everywhere; no other accent. */
.kp-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.kp-grid--2 { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
.kp-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--kp-card-radius);
    padding: var(--kp-card-pad);
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.kp-card::before {
    content: ""; position: absolute; left: 0; top: 1.1rem; bottom: 1.1rem; width: 2px;
    background: var(--accent-kinetic); opacity: 0; transition: opacity var(--transition);
    border-radius: 2px;
}
.kp-card:hover, .kp-card:focus-within { transform: translateY(-2px); box-shadow: var(--shadow); }
.kp-card:hover::before, .kp-card:focus-within::before { opacity: 1; }
.kp-card h3 {
    font-family: var(--font-display); font-weight: 500; font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    letter-spacing: -0.015em; color: var(--text-primary); margin: 0 0 0.75rem;
}
.kp-card p { font-size: 0.92rem; line-height: 1.65; color: var(--text-secondary); margin: 0; }
.kp-card > p + p, .kp-card p + ul { margin-top: 0.85rem; }
.kp-label {
    display: inline-block; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
    letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent-kinetic); margin-bottom: 0.7rem;
}
.kp-list { list-style: none; margin: 0; padding: 0; }
.kp-list li {
    font-size: 0.87rem; color: var(--text-secondary); padding: 0.34rem 0 0.34rem 1.1rem;
    position: relative; border-bottom: 1px solid var(--border-color);
}
.kp-list li:last-child { border-bottom: 0; }
.kp-list li::before {
    content: ""; position: absolute; left: 0; top: 0.82rem; width: 6px; height: 6px;
    border-radius: 50%; background: var(--accent-kinetic); opacity: 0.75;
}
.kp-link {
    display: inline-block; margin-top: 0.9rem; font-family: var(--font-mono); font-size: 0.8rem;
    font-weight: 700; color: var(--accent-kinetic); text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--accent-kinetic) 45%, transparent);
    padding-bottom: 2px;
}
.kp-link:hover { border-bottom-color: var(--accent-kinetic); }

/* 3 — SPLIT EDITORIAL: statement left, substance right. Breaks the centred run. */
.kp-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.kp-split-statement {
    font-family: var(--font-display); font-weight: 400; font-size: clamp(1.35rem, 2.3vw, 1.9rem);
    line-height: 1.35; letter-spacing: -0.02em; color: var(--text-primary);
}
.kp-split-statement .accent { color: var(--accent-kinetic); }
.kp-practice { border-top: 1px solid var(--border-color); padding: 1.05rem 0; }
.kp-practice:last-child { border-bottom: 1px solid var(--border-color); }
.kp-practice h3 {
    font-family: var(--font-display); font-weight: 500; font-size: 1.12rem; margin: 0 0 0.75rem;
    color: var(--text-primary);
}
.kp-practice p { font-size: 0.9rem; line-height: 1.6; color: var(--text-secondary); margin: 0; }
@media (max-width: 900px) { .kp-split { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; } }

/* 4 — TIMELINE RAIL: the process as a connected rail, not four floating cards. */
.kp-timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; }
.kp-timeline::before {
    content: ""; position: absolute; left: 0; right: 0; top: 1.05rem; height: 1px;
    background: color-mix(in srgb, var(--text-primary) 16%, transparent);
}
.kp-step { position: relative; padding: 0 1.1rem 0 0; }
.kp-step-dot {
    display: block; width: 0.55rem; height: 0.55rem; border-radius: 50%;
    background: var(--accent-kinetic); outline: 4px solid var(--bg-base); margin-bottom: 0.85rem;
}
.kp-step-n {
    display: block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em;
    color: var(--text-tertiary); margin-bottom: 0.3rem;
}
.kp-step h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.08rem; margin: 0 0 0.75rem; color: var(--text-primary); }
.kp-step p { font-size: 0.87rem; line-height: 1.6; color: var(--text-secondary); margin: 0; }
@media (max-width: 900px) {
    .kp-timeline { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .kp-timeline::before { left: 0.26rem; right: auto; top: 0.4rem; bottom: 0.4rem; width: 1px; height: auto; }
    .kp-step { padding: 0 0 0 1.5rem; }
    .kp-step-dot { position: absolute; left: 0; top: 0.25rem; margin: 0; }
}

/* 5 — COMPARISON TABLE: what changes, before and after, in figures. */
.kp-compare { width: 100%; border-collapse: collapse; }
.kp-compare caption {
    text-align: left; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--text-tertiary); padding-bottom: 0.8rem;
}
.kp-compare th, .kp-compare td { text-align: left; padding: 0.85rem 1rem 0.85rem 0; vertical-align: top; }
.kp-compare thead th {
    font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--text-tertiary);
    border-bottom: 1px solid color-mix(in srgb, var(--text-primary) 20%, transparent);
}
.kp-compare tbody tr { border-bottom: 1px solid var(--border-color); }
.kp-compare td:first-child { width: 24%; font-family: var(--font-display); font-size: 1rem; color: var(--text-primary); }
.kp-compare .kp-was { color: var(--text-tertiary); font-size: 0.9rem; width: 30%; }
.kp-compare .kp-now { color: var(--text-primary); font-size: 0.9rem; }
.kp-compare .kp-now strong { color: var(--accent-kinetic); font-weight: 700; }
@media (max-width: 700px) {
    .kp-compare thead { display: none; }
    .kp-compare tbody tr { display: grid; gap: 0.25rem; padding: 0.85rem 0; }
    .kp-compare td { padding: 0; }
    .kp-compare td:first-child, .kp-compare .kp-was, .kp-compare .kp-now { width: auto; }
    .kp-compare .kp-was::before { content: "Before: "; color: var(--text-tertiary); }
    .kp-compare .kp-now::before { content: "Now: "; color: var(--text-tertiary); }
}

/* 6 — DIAGNOSTIC TABLE: the friction, and what gets built for it. */
.kp-diag { display: grid; gap: 0; border-top: 1px solid color-mix(in srgb, var(--text-primary) 20%, transparent); }
.kp-diag-row {
    display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0 2rem;
    padding: 1.15rem 0; border-bottom: 1px solid var(--border-color); transition: background var(--transition);
}
.kp-diag-row:hover { background: color-mix(in srgb, var(--text-primary) 3%, transparent); }
.kp-diag-friction {
    font-family: var(--font-display); font-size: 1.05rem; color: var(--text-primary); letter-spacing: -0.01em;
}
.kp-diag-fix { font-size: 0.9rem; line-height: 1.65; color: var(--text-secondary); }
@media (max-width: 760px) {
    .kp-diag-row { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
}

/* 7 — FIGURE PLATES + STAT STRIP. */
.kp-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr)); gap: 1.5rem; }
/* 19rem let three plates make three ~360px columns, shrinking each SVG to a 0.45
   scale where the diagram's own labels become unreadable. 24rem wraps to 2-up. */
.kp-fig { margin: 0; }
.kp-fig img {
    width: 100%; height: auto; display: block; border: 1px solid var(--border-color);
    border-radius: var(--kp-card-radius); background: var(--bg-surface);
}
.kp-fig--wide { grid-column: 1 / -1; }
.kp-fig figcaption {
    font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-tertiary);
    letter-spacing: 0.04em; margin-top: 0.6rem;
}
.kp-fig figcaption b { color: var(--accent-kinetic); font-weight: 700; }
.kp-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1px;
    background: var(--border-color); border: 1px solid var(--border-color);
    border-radius: var(--kp-card-radius); overflow: hidden; margin-top: clamp(1.5rem, 2.6vw, 2.25rem);
}
.kp-stat { background: var(--bg-surface); padding: 1.15rem 1.25rem; }
.kp-stat-v {
    display: block; font-family: var(--font-mono); font-size: clamp(1.15rem, 2vw, 1.5rem);
    font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em;
}
.kp-stat-v em { font-style: normal; color: var(--accent-kinetic); }
.kp-stat-l { display: block; font-size: 0.82rem; color: var(--text-secondary); margin-top: 0.4rem; line-height: 1.5; }
.kp-stat a { color: var(--text-tertiary); text-decoration: none; border-bottom: 1px dotted currentColor; }

/* 8 — FULL-BLEED BAND: a change of surface, so the eye resets. */
.home .kp-band {
    background: color-mix(in srgb, var(--text-primary) 5%, transparent);
    border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color);
    max-width: none; padding: var(--kp-section-y) 2rem;
}
.kp-band-inner { max-width: 1120px; margin: 0 auto; }
.kp-clients { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.kp-client { border-top: 2px solid var(--accent-kinetic); padding-top: 0.9rem; }
.kp-client h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; margin: 0 0 0.75rem; color: var(--text-primary); }
.kp-client p { font-size: 0.88rem; line-height: 1.6; color: var(--text-secondary); margin: 0; }

/* 9 — FACTS STRIP + closing band. */
.kp-facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 1.5rem;
    font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-tertiary); letter-spacing: 0.04em; }
.kp-facts span { display: inline-flex; align-items: center; gap: 0.4rem; }
.kp-facts span::before { content: ""; width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent-kinetic); opacity: 0.8; }
.kp-closing { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; justify-content: center; }
.kp-closing .contact-cta { width: auto; }
.kp-email {
    font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-secondary);
    text-decoration: none; border-bottom: 1px solid var(--border-color); padding-bottom: 2px;
}
.kp-email:hover { color: var(--text-primary); border-bottom-color: var(--accent-kinetic); }

/* Print: the site is read on paper occasionally (memos especially). Keep it honest. */
@media print {
    .site-nav, .chat-fab, .chat-overlay, .kp-closing .contact-cta, .kap-progress, .kap-top { display: none !important; }
    body { background: #fff !important; color: #111 !important; }
    .kp-band, .kp-card, .kp-stat { background: #fff !important; border-color: #ccc !important; }
    section { padding: 1rem 0 !important; break-inside: avoid; }
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.75em; color: #555; }
}
