/* ============================================================
   KAPITAL ENGINE — Clean Hero (nav + collage + background)
   Scoped under kh- to avoid colliding with the v3 design system.
   ============================================================ */
:root{--kh-peach:#F4E7D7;--kh-peach2:#F9EFE3;--kh-gold-soft:#F6EBD4;--kh-green:#2FAE66;--kh-obsidian:#1A1714}

/* ---- NAV ---- */
.kh-header{position:fixed;top:0;left:0;right:0;z-index:60;transition:background .4s,backdrop-filter .4s,box-shadow .4s}
.kh-header.scrolled{background:rgba(248,244,238,.85);backdrop-filter:blur(12px);box-shadow:0 1px 0 var(--line)}
.kh-nav{display:flex;align-items:center;justify-content:space-between;height:88px;gap:20px}
.kh-logo{display:flex;align-items:center}
.kh-logo img{height:42px;width:auto;display:block}            /* logo slightly bigger */
.kh-navpill{display:flex;align-items:center;gap:2px}
.kh-navpill a{font-size:15px;font-weight:500;color:var(--body);padding:10px 17px;border-radius:999px;transition:.2s;display:inline-flex;align-items:center;gap:8px}
.kh-navpill a:hover{color:var(--ink)}
.kh-navpill a.active{background:var(--gold-bright);color:#241803;font-weight:500}  /* active no longer too bold */
.kh-navpill a.active .kh-d{width:7px;height:7px;border-radius:50%;background:#241803}
.kh-free{display:inline-flex;align-items:center;gap:12px;background:var(--kh-peach);color:var(--ink);font-weight:600;font-size:15px;padding:9px 9px 9px 22px;border-radius:999px;transition:.25s}
.kh-free:hover{background:var(--kh-gold-soft)}
.kh-circ{width:30px;height:30px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;flex:0 0 30px;font-size:14px}
.kh-free .kh-circ{background:var(--ink);color:#F8F4EE}
.kh-burger{display:none;flex-direction:column;gap:5px;background:none;border:0;cursor:pointer;padding:6px}
.kh-burger span{width:24px;height:2px;background:var(--ink);transition:.3s}
.kh-mobile{display:none;flex-direction:column;gap:4px;padding:14px 36px 24px;background:rgba(248,244,238,.98);border-bottom:1px solid var(--line)}
.kh-mobile.open{display:flex}
.kh-mobile a{padding:12px 0;font-size:16px;color:var(--ink);border-bottom:1px solid var(--line)}

/* ---- HERO ---- */
.kh-hero{position:relative;min-height:100vh;overflow:hidden;display:flex;flex-direction:column;justify-content:center;padding:120px 0 70px}
.kh-bg{position:absolute;inset:0;z-index:0;overflow:hidden;background:radial-gradient(120% 80% at 85% -10%,#FCEEDE,transparent 60%),radial-gradient(90% 70% at -5% 110%,#F4F0E8,transparent 55%)}
.kh-blob{position:absolute;border-radius:50%;filter:blur(74px);opacity:.45;will-change:transform}
.kh-b1{width:520px;height:520px;background:radial-gradient(circle,#F6D283,transparent 70%);top:-120px;right:-60px;animation:kh-drift1 19s ease-in-out infinite}
.kh-b2{width:440px;height:440px;background:radial-gradient(circle,#EAC4D0,transparent 70%);bottom:-150px;left:-70px;animation:kh-drift2 23s ease-in-out infinite}
.kh-b3{width:360px;height:360px;background:radial-gradient(circle,#CFE4D2,transparent 70%);top:42%;left:54%;animation:kh-drift3 27s ease-in-out infinite}
@keyframes kh-drift1{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(-44px,46px) scale(1.1)}}
@keyframes kh-drift2{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(54px,-34px) scale(1.08)}}
@keyframes kh-drift3{0%,100%{transform:translate(0,0)}50%{transform:translate(-34px,-44px)}}
.kh-grid{position:absolute;inset:0;background-image:radial-gradient(rgba(26,22,17,.07) 1px,transparent 1px);background-size:26px 26px;-webkit-mask:radial-gradient(78% 68% at 60% 28%,#000,transparent 86%);mask:radial-gradient(78% 68% at 60% 28%,#000,transparent 86%);opacity:.55}
.kh-grain{position:absolute;inset:0;opacity:.045;mix-blend-mode:multiply;background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>")}

.kh-grid-wrap{position:relative;z-index:2;display:grid;grid-template-columns:1.02fr .98fr;gap:48px;align-items:center;width:100%}
.kh-badge{display:inline-flex;align-items:center;gap:11px;background:var(--kh-peach2);border:1px solid var(--line);padding:8px 18px 8px 8px;border-radius:999px;font-size:14.5px;font-weight:500;color:var(--ink);box-shadow:var(--sh2)}
.kh-badge .ic{width:32px;height:32px;border-radius:50%;background:var(--kh-peach);display:flex;align-items:center;justify-content:center;color:var(--gold)}
.kh-hero h1{font-size:clamp(50px,7.2vw,96px);line-height:.97;font-weight:500;letter-spacing:-.025em;color:var(--ink);margin:24px 0 0}
.kh-hero h1 .u{position:relative;display:inline-block}
.kh-hero h1 .u svg{position:absolute;left:-3%;right:-3%;bottom:-.13em;width:106%;height:.3em;overflow:visible}
.kh-hero h1 .u svg path{stroke-dasharray:1;stroke-dashoffset:1;animation:kh-draw .95s ease forwards 1.12s}
@keyframes kh-draw{to{stroke-dashoffset:0}}
.kh-cta{display:flex;gap:14px;flex-wrap:wrap;margin-top:36px}
.kh-pill{display:inline-flex;align-items:center;gap:14px;font-weight:500;font-size:16px;padding:13px 14px 13px 28px;border-radius:999px;cursor:pointer;transition:.25s}
.kh-pill .kh-circ{border-radius:50%;background:transparent;font-size:15px;transition:.25s}
.kh-pill-g{background:linear-gradient(135deg,var(--gold-bright),var(--gold));color:#2a1d04}
.kh-pill-g:hover{transform:translateY(-2px) scale(1.015);box-shadow:0 18px 40px -12px rgba(227,166,12,.55)}
.kh-pill-g .kh-circ{border:1.5px solid rgba(42,29,4,.4)}
.kh-pill-p{background:var(--kh-peach);color:var(--ink)}.kh-pill-p:hover{background:var(--kh-gold-soft)}
.kh-pill-p .kh-circ{border:1.5px solid rgba(26,22,17,.32)}
.kh-foot{margin-top:28px;font-size:15px;color:var(--muted);max-width:25em;line-height:1.5}

/* ---- COLLAGE ---- */
.kh-cluster{position:relative;height:600px}
.kh-phmain{position:absolute;top:84px;right:0;width:332px;height:362px;z-index:2}
.kh-phmain img{width:100%;height:100%;object-fit:cover;display:block;border-radius:28px}
.kh-phsq{position:absolute;top:12px;left:118px;width:122px;height:122px;border-radius:22px;overflow:hidden;box-shadow:var(--sh2);z-index:4;background:#e3ddd3;border:4px solid var(--bg)}
.kh-phsq img{width:100%;height:100%;object-fit:cover}
.kh-cstat{position:absolute;top:40px;left:0;width:194px;height:286px;background:var(--kh-obsidian);color:#F4ECDB;border-radius:28px;padding:24px 22px;box-shadow:var(--sh);z-index:3;overflow:hidden;transition:box-shadow .45s}
.kh-cstat:hover{box-shadow:0 44px 80px -42px rgba(50,38,15,.55)}
.kh-cstat .big{font-size:54px;font-weight:600;letter-spacing:-.04em;line-height:1;color:#fff}
.kh-cstat .big .pc{font-size:26px;color:#cfc7b8;font-weight:500;margin-left:2px}
.kh-cstat .lbl{font-size:13px;color:#9a9284;margin-top:10px;line-height:1.4}
.kh-cstat .bars{display:flex;align-items:flex-end;gap:10px;height:78px;margin-top:26px;position:relative;z-index:2}
.kh-cstat .bars .t{flex:1;height:100%;background:rgba(255,255,255,.08);border-radius:999px;display:flex;align-items:flex-end;overflow:hidden}
.kh-cstat .bars .t i{width:100%;background:linear-gradient(180deg,#F0C24A,var(--gold));border-radius:999px;transform-origin:bottom;transform:scaleY(.15);animation:kh-grow .7s forwards}
.kh-cstat .bars .t:nth-child(2) i{animation-delay:.08s}.kh-cstat .bars .t:nth-child(3) i{animation-delay:.16s}.kh-cstat .bars .t:nth-child(4) i{animation-delay:.24s}.kh-cstat .bars .t:nth-child(5) i{animation-delay:.32s}
.kh-cstat .bars .t:last-child i{animation:kh-grow .7s .32s forwards,kh-barglow 2.4s ease-in-out 1.1s infinite}
@keyframes kh-grow{to{transform:scaleY(1)}}
@keyframes kh-barglow{0%,100%{box-shadow:0 0 8px rgba(243,194,74,.35)}50%{box-shadow:0 0 17px rgba(243,194,74,.7)}}
.kh-cstat::before{content:"";position:absolute;top:0;left:-70%;width:55%;height:100%;background:linear-gradient(110deg,transparent,rgba(255,236,200,.13),transparent);transform:skewX(-16deg);animation:kh-sheen 5.5s ease-in-out infinite;pointer-events:none;z-index:1}
@keyframes kh-sheen{0%,16%{left:-70%}60%,100%{left:132%}}
.kh-cq{position:absolute;bottom:0;left:84px;width:222px;background:#fff;border-radius:28px;padding:26px 28px 30px;box-shadow:var(--sh);z-index:5;transition:box-shadow .45s}
.kh-cq:hover{box-shadow:0 44px 80px -42px rgba(50,38,15,.55)}
.kh-cq::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:0 0 0 0 rgba(47,174,102,.45);animation:kh-boxglow 2.9s ease-out infinite}
@keyframes kh-boxglow{0%{box-shadow:0 0 0 0 rgba(47,174,102,.42)}70%,100%{box-shadow:0 0 0 18px rgba(47,174,102,0)}}
.kh-cq .top{display:flex;align-items:flex-start;justify-content:space-between}
.kh-cq .n{font-size:13px;color:var(--muted);font-weight:600}
.kh-cq .gb{width:54px;height:54px;border-radius:50%;background:var(--kh-green);display:flex;align-items:center;justify-content:center;color:#fff;box-shadow:0 14px 24px -8px rgba(47,174,102,.55)}
.kh-cq h3{font-size:28px;font-weight:600;color:var(--ink);letter-spacing:-.02em;line-height:1.06;margin-top:46px}
.kh-how{position:absolute;right:16px;bottom:16px;z-index:3;display:inline-flex;align-items:center;gap:13px;background:#fff;border-radius:999px;padding:8px 22px 8px 8px;box-shadow:0 18px 36px -16px rgba(20,16,10,.5);font-weight:500;color:var(--ink);font-size:15px;transition:transform .3s}
.kh-how:hover{transform:translateY(-2px)}
.kh-how .play{position:relative;width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,var(--gold-bright),var(--gold));color:#2a1d04;display:flex;align-items:center;justify-content:center;font-size:14px;flex:0 0 44px}
.kh-how .play::after{content:"";position:absolute;inset:-7px;border-radius:50%;border:2px solid var(--gold);animation:kh-ring 2.6s ease-out infinite}
@keyframes kh-ring{0%{transform:scale(.82);opacity:.55}80%,100%{transform:scale(1.55);opacity:0}}
.kh-arrow{position:absolute;top:2px;right:58px;width:92px;z-index:5;color:#B8860B;opacity:.85}
.kh-spark{position:absolute;left:42px;bottom:18px;width:40px;height:40px;z-index:1;color:#B8860B}

/* ---- LOAD ORCHESTRATION ---- */
.kh-rise{opacity:0;transform:translateY(22px);filter:blur(8px);animation:kh-rise .9s cubic-bezier(.2,.8,.2,1) forwards}
.kh-rise.d1{animation-delay:.12s}.kh-rise.d2{animation-delay:.24s}
@keyframes kh-rise{to{opacity:1;transform:none;filter:blur(0)}}
.kh-cluster>*{opacity:0;animation:kh-pop .85s cubic-bezier(.2,.85,.25,1) forwards}
.kh-cluster .kh-phmain{animation-delay:.42s}
.kh-cluster .kh-cstat{animation-delay:.58s}
.kh-cluster .kh-phsq{animation-delay:.72s}
.kh-cluster .kh-cq{animation-delay:.82s}
.kh-cluster .kh-arrow{animation-delay:1s}
.kh-cluster .kh-spark{animation-delay:1.08s}
.kh-how{opacity:0;animation:kh-pop .7s cubic-bezier(.2,.85,.25,1) forwards .95s}
@keyframes kh-pop{from{opacity:0;transform:translateY(26px) scale(.93)}to{opacity:1;transform:none}}

@media(max-width:940px){
  .kh-grid-wrap{grid-template-columns:1fr;gap:50px}
  .kh-navpill,.kh-free{display:none}.kh-burger{display:flex}
  .kh-cluster{height:520px;max-width:520px;margin:0 auto;width:100%}
}
@media(prefers-reduced-motion:reduce){
  .kh-rise,.kh-cluster>*,.kh-how{opacity:1!important;transform:none!important;filter:none!important}
  .kh-blob,.kh-cstat::before,.kh-cstat .bars .t i,.kh-how .play::after,.kh-cq::before{animation:none!important}
  .kh-hero h1 .u svg path{stroke-dashoffset:0!important}
}
