/* ============================================
   Kresheen site styles (loaded after screen.css)
   ============================================ */

body { background: var(--color-bg); color: var(--color-fg); }
::selection { background: rgba(255, 26, 117, 0.35); }
code, pre, kbd { font-family: var(--font-mono); }
h1, h2, h3, h4 { color: #F8FAFC; letter-spacing: -0.02em; }

/* --- Header --- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--color-nav-bg);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--color-border);
}
.site-logo { display: inline-flex; align-items: center; gap: 0.6rem; color: #F8FAFC; }
.logo-text { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.logo-by { font-size: 0.75rem; color: var(--color-muted-text); font-weight: 500; padding-left: 0.6rem; border-left: 1px solid var(--color-border); }
.desktop-nav { align-items: center; }
.nav-link { color: #CBD5E1; }
.nav-link:hover, .nav-active { color: #FFFFFF; }
.nav-active { box-shadow: inset 0 -2px 0 var(--color-primary); }
.btn-nav {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.45rem 0.9rem; font-size: 0.85rem; font-weight: 600;
    color: #fff; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; margin-left: 0.5rem;
    transition: border-color .2s, background .2s;
}
.btn-nav:hover { border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.06); }
.mobile-menu { background: #0A0F1E; border-top: 1px solid var(--color-border); }
.mobile-link { color: #E2E8F0; }
@media (max-width: 640px) { .logo-by { display: none; } }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border-radius: 999px; font-weight: 600; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s; }
.btn-primary {
    background: linear-gradient(135deg, #FF1A75, #C026D3 55%, #8B5CF6);
    color: #fff; border: 0;
    box-shadow: 0 8px 30px -8px rgba(255, 26, 117, 0.55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 36px -8px rgba(255, 26, 117, 0.7); background: linear-gradient(135deg, #FF3385, #D946EF 55%, #9F7AFA); }
.btn-ghost { color: #E2E8F0; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.03); padding: 0.75rem 1.5rem; }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.07); }
.btn-lg { padding: 0.85rem 1.6rem; font-size: 1rem; }

/* --- Shared section pieces --- */
.k-section { padding: 5rem 0; position: relative; }
.k-eyebrow {
    text-align: center; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--color-accent); margin-bottom: 0.75rem;
}
.k-h2 { text-align: center; font-size: clamp(1.8rem, 3.6vw, 2.75rem); font-weight: 800; line-height: 1.15; margin: 0 auto 3rem; max-width: 22ch; }
.k-h2.k-left, .k-left { text-align: left; margin-left: 0; }
.k-left + .k-lead, .k-split .k-eyebrow { text-align: left; }
.k-lead { font-size: 1.1rem; color: #AAB4C5; line-height: 1.7; max-width: 60ch; }
.k-center { margin-left: auto; margin-right: auto; justify-content: center; text-align: center; }
.k-gradient-text {
    background: linear-gradient(100deg, #FF1A75 0%, #E879F9 45%, #22D3EE 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    background-size: 200% auto; animation: k-shine 8s linear infinite;
}
@keyframes k-shine { to { background-position: 200% center; } }

/* --- Hero --- */
.k-hero { position: relative; overflow: hidden; padding: 5rem 0 3rem; isolation: isolate; }
.k-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.k-hero-bg::before {
    content: ""; position: absolute; inset: -20%;
    background:
        radial-gradient(40% 35% at 75% 30%, rgba(139, 92, 246, 0.28), transparent 70%),
        radial-gradient(35% 30% at 20% 20%, rgba(255, 26, 117, 0.20), transparent 70%),
        radial-gradient(30% 30% at 60% 90%, rgba(34, 211, 238, 0.12), transparent 70%);
    animation: k-drift 18s ease-in-out infinite alternate;
}
.k-hero-bg::after {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(148, 163, 184, 0.18) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: radial-gradient(70% 70% at 60% 40%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(70% 70% at 60% 40%, #000 30%, transparent 80%);
}
@keyframes k-drift { to { transform: translate3d(3%, -2%, 0) scale(1.05); } }
.k-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3.5rem; align-items: center; }
.k-hero-grid > *, .k-split > *, .k-row > * { min-width: 0; }
@media (min-width: 1024px) { .k-hero-grid { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.18fr); gap: 3rem; } }
.k-pill {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.85rem;
    border: 1px solid rgba(34, 211, 238, 0.35); border-radius: 999px; background: rgba(34, 211, 238, 0.07);
    color: #A5F3FC; font-size: 0.82rem; font-weight: 500; margin-bottom: 1.5rem;
}
.k-pill:hover { background: rgba(34, 211, 238, 0.14); }
.k-pill-dot { width: 7px; height: 7px; border-radius: 50%; background: #22D3EE; box-shadow: 0 0 10px #22D3EE; }
.k-hero-title { font-size: clamp(2.2rem, 4.1vw, 3.35rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.035em; margin-bottom: 1.4rem; }
.k-hero-title .k-gradient-text { display: inline; }
.k-hero-sub { font-size: 1.15rem; line-height: 1.7; color: #AAB4C5; max-width: 54ch; margin-bottom: 2rem; }
.k-hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem; margin-bottom: 1.6rem; }
.k-install {
    display: inline-flex; align-items: center; gap: 0.75rem; max-width: 100%;
    padding: 0.55rem 0.6rem 0.55rem 1rem; border-radius: 0.6rem;
    background: rgba(15, 22, 41, 0.8); border: 1px solid var(--color-border); font-size: 0.88rem;
}
.k-install code { color: #E2E8F0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-install-prompt { color: var(--color-primary); font-family: var(--font-mono); }
.k-copy { font-size: 0.75rem; font-weight: 600; color: #CBD5E1; border: 1px solid var(--color-border); border-radius: 0.4rem; padding: 0.25rem 0.6rem; }
.k-copy:hover { color: #fff; border-color: rgba(255, 255, 255, 0.35); }

/* window chrome shared by hero, tour and terminal */
.k-window, .k-tour-frame, .k-terminal {
    position: relative; border-radius: 0.9rem; overflow: hidden;
    background: linear-gradient(180deg, rgba(20, 28, 50, 0.92), rgba(10, 15, 30, 0.95));
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.k-window::before, .k-tour-frame::before {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
    background: linear-gradient(140deg, rgba(255, 26, 117, 0.6), transparent 35%, transparent 65%, rgba(34, 211, 238, 0.5));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
}
.k-window-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.7rem 0.9rem; border-bottom: 1px solid rgba(148, 163, 184, 0.12); background: rgba(255, 255, 255, 0.02); }
.k-window-bar > span { width: 10px; height: 10px; border-radius: 50%; background: #334155; }
.k-window-bar > span:nth-child(1) { background: #F87171; } .k-window-bar > span:nth-child(2) { background: #FBBF24; } .k-window-bar > span:nth-child(3) { background: #34D399; }
.k-window-title { margin-left: 0.6rem; font-size: 0.78rem; color: #94A3B8; font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-window-stat { margin-left: auto; font-size: 0.78rem; color: #CBD5E1; font-family: var(--font-mono); white-space: nowrap; }
.k-window-stat b { color: #fff; }
.k-dot-live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #F43F5E; box-shadow: 0 0 0 0 rgba(244, 63, 94, .7); animation: k-ping 1.8s infinite; margin-right: 0.2rem; }
@keyframes k-ping { 70% { box-shadow: 0 0 0 7px rgba(244, 63, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); } }

.k-hero-visual { position: relative; }
.k-graph { display: block; width: 100%; height: auto; }
.k-float {
    position: absolute; z-index: 2; border-radius: 0.7rem; font-size: 0.75rem;
    background: rgba(12, 18, 34, 0.94); border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.8); backdrop-filter: blur(6px);
    opacity: 0; transform: translateY(8px); transition: opacity .6s, transform .6s;
}
.k-float.is-on { opacity: 1; transform: none; }
.k-float-source { left: -1.8rem; bottom: -4.6rem; width: 14.5rem; }
.k-float-head { padding: 0.45rem 0.7rem; border-bottom: 1px solid rgba(148, 163, 184, 0.14); color: #94A3B8; font-family: var(--font-mono); font-size: 0.7rem; }
.k-float pre { margin: 0; padding: 0.6rem 0.75rem; font-size: 0.72rem; line-height: 1.55; color: #CBD5E1; background: none; white-space: pre; }
.t-k { color: #93C5FD; } .t-bad { color: #FB7185; background: rgba(244, 63, 94, 0.14); border-radius: 3px; padding: 0 2px; }
.k-float-threat { right: -1rem; bottom: -3.4rem; display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.7rem 0.85rem; max-width: 15.5rem; color: #CBD5E1; line-height: 1.45; }
.k-float-threat b { color: #fff; }
@media (max-width: 1100px) { .k-float-source { left: 0.5rem; } .k-float-threat { right: 0.5rem; } }
@media (max-width: 640px) { .k-float { display: none; } }

.k-sev { flex: none; font-size: 0.68rem; font-weight: 700; padding: 0.15rem 0.45rem; border-radius: 0.35rem; color: #fff; text-transform: lowercase; }
.k-sev-critical { background: #E11D48; } .k-sev-high { background: #EA580C; } .k-sev-medium { background: #CA8A04; }

/* graph elements (SVG, built by site.js) */
.kg-boundary rect { fill: rgba(139, 92, 246, 0.05); stroke: rgba(167, 139, 250, 0.7); stroke-width: 1.2; stroke-dasharray: 5 5; }
.kg-boundary text { fill: #A5B4FC; font: 600 10px var(--font-mono); letter-spacing: .04em; }
.kg-node rect { fill: #1A2238; stroke: #475569; stroke-width: 1.3; }
.kg-node text { fill: #E2E8F0; font: 600 11px var(--font-family); text-anchor: middle; }
.kg-node .kg-sub { fill: #94A3B8; font-weight: 500; font-size: 8.5px; }
.kg-node.is-external rect { stroke-width: 1; }
.kg-node .kg-ring { fill: none; stroke-width: 2.4; opacity: 0; }
.kg-node.is-hot .kg-ring { opacity: 1; animation: kg-pulse 2.2s ease-in-out infinite; }
.kg-node.sev-critical .kg-ring { stroke: #F43F5E; } .kg-node.sev-high .kg-ring { stroke: #F97316; }
@keyframes kg-pulse { 50% { stroke-opacity: 0.35; } }
.kg-badge rect { rx: 6; } .kg-badge text { fill: #fff; font: 700 8px var(--font-family); text-anchor: middle; }
.kg-edge { fill: none; stroke: #64748B; stroke-width: 1.3; }
.kg-edge.is-cross { stroke: #F59E0B; }
.kg-edge-label { fill: #94A3B8; font: 500 8.5px var(--font-mono); }
.kg-packet { fill: #22D3EE; filter: drop-shadow(0 0 4px #22D3EE); }
.kg-packet.is-cross { fill: #FBBF24; filter: drop-shadow(0 0 4px #FBBF24); }
.kg-scan { fill: url(#kg-scan-grad); }
.kg-fade { opacity: 0; transition: opacity .7s ease, transform .7s ease; }
.kg-fade.is-in { opacity: 1; }

/* --- Sources strip --- */
.k-sources { margin-top: 6.5rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.k-sources-label { font-size: 0.8rem; color: var(--color-muted-text); text-transform: uppercase; letter-spacing: .12em; font-family: var(--font-mono); }
.k-sources ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
.k-sources li { padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid var(--color-border); color: #CBD5E1; font-size: 0.88rem; background: rgba(255, 255, 255, 0.02); }

/* --- Steps --- */
.k-steps { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .k-steps { grid-template-columns: repeat(3, 1fr); } }
.k-step { position: relative; padding: 1.75rem; border-radius: var(--radius); background: var(--color-card-bg); border: 1px solid var(--color-border); overflow: hidden; }
.k-step h3 { font-size: 1.15rem; margin: 1rem 0 0.5rem; }
.k-step p { color: #AAB4C5; font-size: 0.95rem; line-height: 1.65; }
.k-step-num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--color-primary); }
.k-step-art { height: 92px; margin-top: 0.75rem; border-radius: 0.6rem; background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(148, 163, 184, 0.1); position: relative; overflow: hidden; }
.k-art-ingest span { position: absolute; left: 14%; height: 7px; border-radius: 4px; background: rgba(148, 163, 184, 0.35); animation: k-type 3.2s ease-in-out infinite; }
.k-art-ingest span:nth-child(1) { top: 18%; width: 46%; } .k-art-ingest span:nth-child(2) { top: 38%; width: 62%; animation-delay: .25s; background: rgba(34, 211, 238, 0.5); }
.k-art-ingest span:nth-child(3) { top: 58%; width: 34%; animation-delay: .5s; } .k-art-ingest span:nth-child(4) { top: 78%; width: 52%; animation-delay: .75s; background: rgba(255, 26, 117, 0.55); }
@keyframes k-type { 0% { clip-path: inset(0 100% 0 0); } 40%, 80% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 0 0); opacity: 0; } }
.k-art-model i { position: absolute; width: 22%; height: 24%; border-radius: 999px; border: 1.5px solid #64748B; background: #1A2238; animation: k-pop 3.6s ease-in-out infinite; }
.k-art-model i:nth-child(1) { left: 8%; top: 38%; } .k-art-model i:nth-child(2) { left: 39%; top: 16%; animation-delay: .3s; border-color: #F97316; } .k-art-model i:nth-child(3) { left: 70%; top: 54%; animation-delay: .6s; }
.k-art-model b { position: absolute; inset: 9% 30% 9% 33%; border: 1.5px dashed rgba(167, 139, 250, 0.7); border-radius: 8px; animation: k-pop 3.6s .9s ease-in-out infinite; }
@keyframes k-pop { 0%, 8% { opacity: 0; transform: scale(.85); } 20%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.k-art-rank span { position: absolute; left: 10%; height: 18%; border-radius: 5px; animation: k-grow 3.4s ease-in-out infinite; transform-origin: left; }
.k-art-rank span:nth-child(1) { top: 14%; width: 78%; background: linear-gradient(90deg, #E11D48, rgba(225, 29, 72, .3)); }
.k-art-rank span:nth-child(2) { top: 41%; width: 58%; background: linear-gradient(90deg, #EA580C, rgba(234, 88, 12, .3)); animation-delay: .25s; }
.k-art-rank span:nth-child(3) { top: 68%; width: 40%; background: linear-gradient(90deg, #CA8A04, rgba(202, 138, 4, .3)); animation-delay: .5s; }
@keyframes k-grow { 0% { transform: scaleX(0); } 35%, 85% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }

/* --- Product tour --- */
.k-section-tour { background: linear-gradient(180deg, transparent, rgba(139, 92, 246, 0.06) 40%, transparent); }
.k-tour { max-width: 1080px; margin: 0 auto; }
.k-tour-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }
.k-tour-tabs button { padding: 0.5rem 1.1rem; border-radius: 999px; color: #AAB4C5; font-weight: 600; font-size: 0.92rem; border: 1px solid transparent; }
.k-tour-tabs button:hover { color: #fff; }
.k-tour-tabs button[aria-selected="true"] { color: #fff; border-color: rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.06); }
.k-tour-stage { position: relative; aspect-ratio: 16 / 10; background: #10131A; }
.k-tour-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0; transform: scale(1.015); transition: opacity .6s ease, transform 1.2s ease; }
.k-tour-stage img.is-active { opacity: 1; transform: none; }
.k-tour-progress { height: 2px; background: rgba(255, 255, 255, 0.06); }
.k-tour-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #FF1A75, #22D3EE); }
.k-tour-captions { position: relative; min-height: 3.5rem; margin-top: 1.25rem; text-align: center; }
.k-tour-captions p { position: absolute; inset: 0; color: #AAB4C5; opacity: 0; transition: opacity .4s; max-width: 62ch; margin: 0 auto; }
.k-tour-captions p.is-active { opacity: 1; position: relative; }

/* --- Features --- */
.k-features { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .k-features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .k-features { grid-template-columns: repeat(3, 1fr); } }
.k-feature {
    position: relative; padding: 1.6rem; border-radius: var(--radius); background: var(--color-card-bg); border: 1px solid var(--color-border);
    transition: border-color .25s, transform .25s;
}
.k-feature::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 26, 117, 0.10), transparent 45%);
}
.k-feature:hover { border-color: rgba(255, 26, 117, 0.35); transform: translateY(-2px); }
.k-feature:hover::after { opacity: 1; }
.k-feature-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 0.6rem; color: #F0ABFC; background: linear-gradient(135deg, rgba(255, 26, 117, 0.16), rgba(139, 92, 246, 0.16)); border: 1px solid rgba(240, 171, 252, 0.2); margin-bottom: 1rem; }
.k-feature h3 { font-size: 1.08rem; margin-bottom: 0.45rem; }
.k-feature p { color: #AAB4C5; font-size: 0.94rem; line-height: 1.65; }
.k-feature code { font-size: 0.85em; color: #A5F3FC; background: rgba(34, 211, 238, 0.08); padding: 0.05rem 0.3rem; border-radius: 4px; }

/* --- Split + terminal --- */
.k-split { display: grid; gap: 3rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 1024px) { .k-split { grid-template-columns: 1fr 1.05fr; } }
.k-checks { margin-top: 1.5rem; display: grid; gap: 0.75rem; }
.k-checks li { position: relative; padding-left: 1.8rem; color: #CBD5E1; line-height: 1.6; }
.k-checks li::before { content: ""; position: absolute; left: 0; top: 0.35rem; width: 1rem; height: 1rem; border-radius: 50%; background: rgba(52, 211, 153, 0.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334D399' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 62% no-repeat; }
.k-terminal-body { margin: 0; padding: 1.1rem 1.25rem 1.4rem; min-height: 21rem; font-size: 0.82rem; line-height: 1.7; color: #CBD5E1; background: none; white-space: pre-wrap; }
.k-terminal-body .c-dim { color: #64748B; } .c-ok { color: #34D399; } .c-bad { color: #FB7185; } .c-warn { color: #FBBF24; } .c-cmd { color: #F8FAFC; } .c-acc { color: #67E8F9; }
.k-caret { display: inline-block; width: 0.55em; height: 1.1em; background: #E2E8F0; vertical-align: -0.2em; animation: k-blink 1s steps(1) infinite; }
@keyframes k-blink { 50% { opacity: 0; } }

/* --- Editions --- */
.k-editions { display: grid; gap: 1.5rem; grid-template-columns: 1fr; max-width: 960px; margin: 0 auto; }
@media (min-width: 800px) { .k-editions { grid-template-columns: 1fr 1fr; } }
.k-edition { padding: 2rem; border-radius: 1rem; background: var(--color-card-bg); border: 1px solid var(--color-border); display: flex; flex-direction: column; gap: 0.6rem; }
.k-edition p { color: #AAB4C5; line-height: 1.65; }
.k-edition .btn { align-self: flex-start; margin-top: auto; }
.k-edition h3 { font-size: 1.5rem; }
.k-edition-tag { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--color-accent) !important; }
.k-edition-price { font-size: 1.05rem; font-weight: 700; color: #F8FAFC !important; }
.k-edition-pro { background: linear-gradient(160deg, rgba(255, 26, 117, 0.12), rgba(139, 92, 246, 0.10) 50%, var(--color-card-bg)); border-color: rgba(255, 26, 117, 0.35); }

/* --- Closing CTA --- */
.k-cta { position: relative; padding: 6rem 0; overflow: hidden; border-top: 1px solid var(--color-border); }
.k-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 80% at 50% 100%, rgba(255, 26, 117, 0.18), transparent 70%), radial-gradient(40% 60% at 80% 0%, rgba(34, 211, 238, 0.10), transparent 70%); }
.k-cta .k-h2 { max-width: 20ch; margin-bottom: 1rem; }
.k-cta .k-lead { margin-bottom: 2rem; }

/* --- Inner pages --- */
.k-page-hero { position: relative; padding: 5rem 0 3rem; text-align: center; overflow: hidden; isolation: isolate; }
.k-page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; max-width: 20ch; margin: 0 auto 1.2rem; }
.k-page-hero .k-lead { margin: 0 auto; }
.k-row { display: grid; gap: 2.5rem; grid-template-columns: 1fr; align-items: center; padding: 3.5rem 0; }
@media (min-width: 960px) { .k-row { grid-template-columns: 0.9fr 1.1fr; gap: 4rem; } .k-row.is-flip > :first-child { order: 2; } }
.k-row h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; margin-bottom: 0.9rem; }
.k-row p { color: #AAB4C5; line-height: 1.7; }
.k-shot { border-radius: 0.8rem; overflow: hidden; border: 1px solid rgba(148, 163, 184, 0.2); box-shadow: 0 30px 70px -25px rgba(0, 0, 0, 0.8); }
.k-shot img { width: 100%; height: auto; }
.k-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.1rem; }
.k-tags span { font-size: 0.78rem; padding: 0.25rem 0.65rem; border-radius: 999px; border: 1px solid var(--color-border); color: #CBD5E1; }

/* pricing */
.k-plans { display: grid; gap: 1.5rem; grid-template-columns: 1fr; max-width: 1000px; margin: 0 auto; }
@media (min-width: 860px) { .k-plans { grid-template-columns: 1fr 1fr; } }
.k-plan { padding: 2.2rem; border-radius: 1rem; background: var(--color-card-bg); border: 1px solid var(--color-border); display: flex; flex-direction: column; }
.k-plan h2 { font-size: 1.6rem; margin: 0.3rem 0 0.4rem; }
.k-plan .k-price { font-size: 2.2rem; font-weight: 800; color: #fff; margin: 0.6rem 0 0.2rem; }
.k-plan .k-price small { font-size: 0.95rem; font-weight: 500; color: var(--color-muted-text); }
.k-plan > p { color: #AAB4C5; }
.k-plan .k-checks { margin: 1.5rem 0 2rem; }
.k-plan .btn { margin-top: auto; align-self: stretch; }
.k-note { font-size: 0.8rem; color: var(--color-muted-text); margin-top: 0.6rem; }
.k-services { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .k-services { grid-template-columns: repeat(3, 1fr); } }
.k-faq { max-width: 780px; margin: 0 auto; }
.k-faq details { border-bottom: 1px solid var(--color-border); padding: 1.1rem 0; }
.k-faq summary { cursor: pointer; font-weight: 600; color: #F1F5F9; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.k-faq summary::after { content: "+"; color: var(--color-primary); font-size: 1.3rem; line-height: 1; }
.k-faq details[open] summary::after { content: "\2212"; }
.k-faq details p { color: #AAB4C5; margin-top: 0.7rem; line-height: 1.7; }

/* about */
.k-about { max-width: 780px; margin: 0 auto; }
.k-about p { color: #C3CCDA; font-size: 1.08rem; line-height: 1.8; margin-bottom: 1.2rem; }
.pub-card { background: var(--color-card-bg); border: 1px solid var(--color-border); }
.pub-title { color: #F1F5F9; }
.connect-link { background: var(--color-card-bg); border-color: var(--color-border); color: #E2E8F0; }

/* --- Blog + posts on dark --- */
.k-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: -1.5rem 0 2.5rem; }
.k-filter a { padding: 0.4rem 1rem; border-radius: 999px; border: 1px solid var(--color-border); color: #CBD5E1; font-size: 0.88rem; }
.k-filter a:hover, .k-filter a.is-active { color: #fff; border-color: rgba(255, 26, 117, 0.6); background: rgba(255, 26, 117, 0.1); }
.post-card { background: var(--color-card-bg); border-color: var(--color-border); }
.post-card:hover { border-color: rgba(255, 26, 117, 0.4); box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.8); }
.post-card-title { color: #F1F5F9; }
.post-card-excerpt, .post-card-date { color: #94A3B8; }
.post-header { background: transparent; }
.post-title { color: #F8FAFC; }
.gh-content { color: #C9D1DE; }
.gh-content h2, .gh-content h3, .gh-content strong { color: #F1F5F9; }
.gh-content a { color: #F472B6; }
.gh-content blockquote { border-color: var(--color-primary); color: #CBD5E1; }
.gh-content pre { background: #0A0F1E; border: 1px solid var(--color-border); }
.gh-content code { background: rgba(148, 163, 184, 0.12); color: #E2E8F0; }
.gh-content th, .gh-content td { border-color: var(--color-border); }
.toc-sidebar { background: rgba(15, 22, 41, 0.9); border-color: var(--color-border); }
.toc-sidebar a { color: #94A3B8; }
.toc-mobile-content { background: #0F1629; }
.site-footer { background: var(--color-footer-bg); border-top: 1px solid var(--color-border); }
.footer-brand { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 1.15rem; font-weight: 800; color: #F8FAFC; }

/* --- Scroll reveal --- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
    .reveal { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
    .k-hero { padding-top: 3rem; }
    .k-hero-ctas .btn { flex: 1 1 100%; }
    .k-install { display: flex; }
    .k-section, .k-cta { padding: 3.5rem 0; }
    .k-h2 { margin-bottom: 2rem; }
}

/* tag badges on dark (scoped to .tag-badge: Ghost also puts tag-* classes on <body>) */
.tag-badge { background: rgba(148, 163, 184, 0.12) !important; color: #CBD5E1 !important; border: 1px solid rgba(148, 163, 184, 0.2); }
.tag-badge.tag-research, .tag-badge.tag-paper { background: rgba(139, 92, 246, 0.16) !important; color: #C4B5FD !important; border-color: rgba(139, 92, 246, 0.35); }
.tag-badge.tag-guide { background: rgba(34, 211, 238, 0.12) !important; color: #A5F3FC !important; border-color: rgba(34, 211, 238, 0.3); }
.tag-badge.tag-conference { background: rgba(249, 115, 22, 0.14) !important; color: #FDBA74 !important; border-color: rgba(249, 115, 22, 0.3); }
.tag-badge.tag-free { background: rgba(52, 211, 153, 0.12) !important; color: #6EE7B7 !important; border-color: rgba(52, 211, 153, 0.3); }
.post-meta { color: #94A3B8; }
.gh-content { overflow-wrap: anywhere; }
.gh-content pre, .gh-content table { max-width: 100%; overflow-x: auto; }
