:root {
    --bg-primary: rgba(10, 10, 15, 0);
    --bg-secondary: rgba(18, 18, 26, 0.55);
    --bg-tertiary: rgba(26, 26, 37, 0.65);
    --accent-primary: #8b5cf6;
    --accent-secondary: #6366f1;
    --accent-glow: rgba(139, 92, 246, 0.35);
    --text-primary: #ffffff;
    --text-secondary: #b0b0ba;
    --text-muted: #71717a;
    --border-color: rgba(255, 255, 255, 0.08);
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
}

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

html,
body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(1200px 700px at 15% -10%, rgba(99, 102, 241, 0.18) 0%, transparent 55%),
        radial-gradient(900px 600px at 85% 0%, rgba(139, 92, 246, 0.18) 0%, transparent 55%),
        #05050a;
    color: var(--text-primary);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

#hero-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--text-primary);
}

.logo-icon {
    color: var(--accent-primary);
    font-size: 24px;
    animation: logoPulse 2.2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.15) rotate(12deg);
    }
}

.nav {
    display: flex;
    gap: 28px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.2px;
    transition: color 0.2s ease;
    position: relative;
    padding: 6px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    transform: scaleX(0);
    border-radius: 2px;
    transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    transform: scaleX(1);
}

/* Hero */
.hero {
    text-align: center;
    padding: 36px 0 24px;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    animation: fadeIn 0.6s ease-out;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a78bfa;
    box-shadow: 0 0 8px rgba(167, 139, 250, 0.7);
    animation: dotPulse 1.4s ease-in-out infinite;
}

@keyframes dotPulse {
    0%,
    100% {
        box-shadow: 0 0 8px rgba(167, 139, 250, 0.7);
    }
    50% {
        box-shadow: 0 0 18px rgba(167, 139, 250, 1);
    }
}

.hero-title {
    font-size: clamp(2.6rem, 7.6vw, 5.2rem);
    line-height: 1.05;
    margin-bottom: 24px;
    letter-spacing: -2.5px;
    animation: heroTitleIn 0.7s ease-out;
}

.hero-title-line {
    display: block;
}

.gradient-text {
    background: linear-gradient(130deg, #e2e8f0 25%, #8b5cf6 55%, #6366f1 90%);
    background-size: 220% 220%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 7s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2.1vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 36px;
    font-weight: 400;
    animation: fadeIn 0.8s ease-out;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeIn 0.9s ease-out;
}

/* Buttons */
.btn {
    position: relative;
    padding: 14px 30px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: white;
    box-shadow:
        0 16px 30px rgba(79, 70, 229, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 18px 38px rgba(79, 70, 229, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
    transform: translateY(-2px) scale(1.01);
}

.btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

@keyframes heroTitleIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Demo area + capsule */
.demo-area {
    margin: 64px auto 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    animation: fadeIn 1s ease-out;
}

.demo-capsule {
    position: relative;
    width: min(880px, 92vw);
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(99, 102, 241, 0.15));
    box-shadow: 0 32px 80px rgba(79, 70, 229, 0.25);
    isolation: isolate;
    transition: --capsule-hue 0.6s ease, --capsule-blur 0.6s ease;
}

.demo-capsule.demo-effect--glow {
    animation: glowPulse 2.2s ease-in-out infinite;
}

.demo-capsule.demo-effect--matrix {
    animation: matrixFlicker 3.2s steps(2, end) infinite;
}

.demo-capsule.demo-effect--ember {
    animation: emberDrift 2.8s ease-in-out infinite;
}

@keyframes glowPulse {
    0%,
    100% {
        box-shadow: 0 24px 60px rgba(79, 70, 229, 0.35);
    }
    50% {
        box-shadow: 0 42px 82px rgba(139, 92, 246, 0.65);
    }
}

@keyframes matrixFlicker {
    0% {
        box-shadow: 0 24px 60px rgba(16, 185, 129, 0.25);
    }
    33% {
        box-shadow: 0 30px 72px rgba(16, 185, 129, 0.55);
    }
    66% {
        box-shadow: 0 18px 50px rgba(16, 185, 129, 0.2);
    }
    100% {
        box-shadow: 0 24px 60px rgba(16, 185, 129, 0.25);
    }
}

@keyframes emberDrift {
    0%,
    100% {
        box-shadow: 0 24px 60px rgba(245, 158, 11, 0.35);
        transform: translateY(0px);
    }
    50% {
        box-shadow: 0 44px 86px rgba(239, 68, 68, 0.55);
        transform: translateY(-4px);
    }
}

.capsule-ring {
    position: absolute;
    inset: 18px;
    border-radius: 18px;
    border: 1px solid rgba(139, 92, 246, 0.15);
    pointer-events: none;
    animation: ringRotate 18s linear infinite;
}

.capsule-ring--outer {
    inset: 6px;
    border-color: rgba(99, 102, 241, 0.08);
    animation: ringRotate 26s linear infinite reverse;
}

@keyframes ringRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.demo-capsule-inner {
    position: relative;
    height: 100%;
    backdrop-filter: blur(14px) saturate(125%);
    background: rgba(5, 5, 10, 0.55);
    border-radius: 17px;
    overflow: hidden;
}

.demo-capsule-content {
    position: relative;
    z-index: 1;
    height: 100%;
    padding: 24px 26px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.demo-label {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.2px;
}

.demo-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    color: #e2e8f0;
    min-height: 62px;
    text-shadow: 0 0 18px rgba(139, 92, 246, 0.35);
}

.demo-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.demo-badge {
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.demo-badge--accent {
    background: rgba(139, 92, 246, 0.14);
    border-color: rgba(139, 92, 246, 0.35);
    color: #c4b5fd;
}

/* Controls */
.demo-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.demo-btn {
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
    color: #fff;
}

/* Stats */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 760px;
    margin: 40px auto 0;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.stat-number {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -1px;
    color: #fff;
}

.stat-suffix {
    color: #c4b5fd;
    font-weight: 600;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.35s ease-in;
}

/* Editor */
.editor-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 22px;
    min-height: calc(100vh - 160px);
}

.editor-panel,
.preview-panel {
    background: rgba(18, 18, 26, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.panel-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.editor-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    width: fit-content;
}

.tab {
    padding: 8px 18px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab.active {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: white;
}

.tab:hover:not(.active) {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.tab-pane {
    display: none;
    flex: 1;
}

.tab-pane.active {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
}

#capsule-input {
    flex: 1;
    background: rgba(5, 5, 10, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 14px;
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease;
}

#capsule-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.input-field {
    flex: 1;
    background: rgba(5, 5, 10, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 14px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
}

.input-field:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    gap: 14px;
}

.byte-counter {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    color: var(--text-muted);
}

.btn-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Preview panel */
.preview-content {
    flex: 1;
    background: rgba(5, 5, 10, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 18px;
    overflow: auto;
}

.preview-placeholder {
    color: var(--text-muted);
    font-size: 13px;
}

.preview-text {
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    color: #e2e8f0;
}

/* Capsule container */
.capsule-container {
    max-width: 780px;
    margin: 40px auto;
}

#capsule-render {
    background: rgba(18, 18, 26, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 28px;
    backdrop-filter: blur(12px);
}

.capsule {
    animation: capsuleReveal 0.5s ease-out;
}

.capsule-text {
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    color: #e2e8f0;
}

@keyframes capsuleReveal {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.toast-success {
    background: rgba(22, 163, 74, 0.25);
    color: #86efac;
}

.toast-error {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.toast-info {
    background: rgba(139, 92, 246, 0.25);
    color: #d8b4fe;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 820px) {
    .editor-container {
        grid-template-columns: 1fr;
    }
    .stats-row {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 580px) {
    .hero-title {
        letter-spacing: -1.5px;
    }
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    .stats-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Krive landing redesign
   ============================================================ */

body.krive-home {
    min-height: 100vh;
    color: #ecf3ff;
    background:
        radial-gradient(900px 700px at 12% 10%, rgba(75, 211, 194, 0.16) 0%, transparent 60%),
        radial-gradient(800px 560px at 88% 0%, rgba(251, 191, 36, 0.14) 0%, transparent 55%),
        linear-gradient(180deg, #07111f 0%, #050914 42%, #03060d 100%);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

body.krive-home::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.9), transparent 80%);
    opacity: 0.22;
    z-index: 0;
}

body.krive-home #hero-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

body.krive-home .page-shell {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 32px;
}

body.krive-home .site-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid rgba(163, 182, 214, 0.14);
    border-radius: 22px;
    background: rgba(8, 14, 24, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

body.krive-home .brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

body.krive-home .brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(75, 211, 194, 0.92), rgba(99, 102, 241, 0.78)),
        rgba(255, 255, 255, 0.08);
    color: #04121d;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.02rem;
    font-weight: 700;
    box-shadow: 0 18px 34px rgba(75, 211, 194, 0.22);
}

body.krive-home .brand-text {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.35rem;
    letter-spacing: 0.01em;
}

body.krive-home .site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

body.krive-home .nav-link,
body.krive-home .site-nav-link,
body.krive-home .header-link {
    color: rgba(236, 243, 255, 0.74);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 180ms ease, transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

body.krive-home .nav-link {
    position: relative;
    padding: 8px 2px;
}

body.krive-home .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(75, 211, 194, 1), rgba(251, 191, 36, 1));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 180ms ease;
}

body.krive-home .nav-link:hover,
body.krive-home .site-nav-link:hover,
body.krive-home .header-link:hover {
    color: #ffffff;
}

body.krive-home .nav-link:hover::after,
body.krive-home .nav-link:focus-visible::after {
    transform: scaleX(1);
}

body.krive-home .header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.krive-home .header-link,
body.krive-home .header-cta,
body.krive-home .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

body.krive-home .header-link,
body.krive-home .button-secondary {
    padding: 12px 16px;
    border-color: rgba(163, 182, 214, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: #e7eefc;
}

body.krive-home .header-cta,
body.krive-home .button-primary {
    padding: 12px 18px;
    background: linear-gradient(135deg, #4bd3c2 0%, #71c7ff 48%, #fbbf24 110%);
    color: #04121d;
    font-weight: 700;
    box-shadow: 0 16px 36px rgba(75, 211, 194, 0.24);
}

body.krive-home .header-cta:hover,
body.krive-home .button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 42px rgba(75, 211, 194, 0.3);
}

body.krive-home .button-secondary:hover,
body.krive-home .header-link:hover {
    transform: translateY(-1px);
    border-color: rgba(163, 182, 214, 0.3);
    background: rgba(255, 255, 255, 0.07);
}

body.krive-home .section {
    margin-top: 28px;
}

body.krive-home main section[id] {
    scroll-margin-top: 28px;
}

body.krive-home .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 24px;
    align-items: center;
    padding: 56px 0 20px;
}

body.krive-home .hero-copy {
    max-width: 700px;
}

body.krive-home .eyebrow,
body.krive-home .section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: rgba(116, 229, 218, 0.94);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

body.krive-home .eyebrow::before,
body.krive-home .section-kicker::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4bd3c2, #fbbf24);
    box-shadow: 0 0 16px rgba(75, 211, 194, 0.5);
}

body.krive-home h1,
body.krive-home h2,
body.krive-home h3 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    color: #f4f8ff;
}

body.krive-home .hero h1 {
    font-size: clamp(3.2rem, 7.8vw, 6.4rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
    max-width: 11ch;
}

body.krive-home .hero-lede,
body.krive-home .section-heading p,
body.krive-home .workflow-card p,
body.krive-home .feature-card p,
body.krive-home .trust-item strong,
body.krive-home .pricing-callout-copy p {
    color: rgba(214, 225, 244, 0.76);
    line-height: 1.68;
}

body.krive-home .hero-lede {
    margin-top: 20px;
    max-width: 58ch;
    font-size: 1.08rem;
}

body.krive-home .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

body.krive-home .hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    list-style: none;
}

body.krive-home .hero-points li,
body.krive-home .visual-tag,
body.krive-home .status-pill,
body.krive-home .feature-index,
body.krive-home .workflow-number,
body.krive-home .trust-label {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.krive-home .hero-points li {
    padding: 10px 12px;
    border: 1px solid rgba(163, 182, 214, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(236, 243, 255, 0.86);
}

body.krive-home .glass-card {
    position: relative;
    border: 1px solid rgba(163, 182, 214, 0.16);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(12, 21, 35, 0.9), rgba(8, 14, 24, 0.88));
    backdrop-filter: blur(18px);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
}

body.krive-home .hero-visual {
    padding: 22px;
    overflow: hidden;
}

body.krive-home .visual-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

body.krive-home .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(236, 243, 255, 0.8);
}

body.krive-home .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #4bd3c2;
    box-shadow: 0 0 18px rgba(75, 211, 194, 0.7);
}

body.krive-home .visual-tag {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.12);
    color: #ffe08a;
    border: 1px solid rgba(251, 191, 36, 0.22);
}

body.krive-home .visual-stack {
    display: grid;
    gap: 12px;
}

body.krive-home .stack-card {
    padding: 18px 18px 16px;
    border-radius: 22px;
    border: 1px solid rgba(163, 182, 214, 0.14);
    background: rgba(255, 255, 255, 0.035);
}

body.krive-home .stack-card span {
    display: block;
    color: rgba(214, 225, 244, 0.56);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.82rem;
}

body.krive-home .stack-card strong {
    display: block;
    margin-top: 8px;
    font-size: 1.05rem;
    font-family: "Space Grotesk", sans-serif;
}

body.krive-home .stack-card--primary {
    border-color: rgba(75, 211, 194, 0.26);
    background:
        radial-gradient(500px 180px at 20% 0%, rgba(75, 211, 194, 0.16), transparent 55%),
        rgba(255, 255, 255, 0.04);
}

body.krive-home .visual-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

body.krive-home .mini-stat {
    padding: 16px 14px;
    border-radius: 20px;
    border: 1px solid rgba(163, 182, 214, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

body.krive-home .mini-stat strong {
    display: block;
    font-family: "Space Grotesk", sans-serif;
    font-size: 2rem;
    line-height: 1;
    color: #ffffff;
}

body.krive-home .mini-stat span {
    display: block;
    margin-top: 8px;
    color: rgba(214, 225, 244, 0.7);
    font-size: 0.88rem;
    line-height: 1.4;
}

body.krive-home .trust-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

body.krive-home .trust-item {
    padding: 18px 20px;
    border: 1px solid rgba(163, 182, 214, 0.12);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
}

body.krive-home .trust-label {
    display: block;
    margin-bottom: 10px;
    color: rgba(116, 229, 218, 0.82);
}

body.krive-home .trust-item strong {
    display: block;
    font-size: 0.98rem;
    font-weight: 500;
}

body.krive-home .section-heading {
    max-width: 760px;
    margin-bottom: 18px;
}

body.krive-home .section-heading--row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    max-width: none;
}

body.krive-home .section-heading h2,
body.krive-home .pricing-callout-copy h2 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

body.krive-home .feature-grid,
body.krive-home .workflow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

body.krive-home .workflow-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.krive-home .feature-card,
body.krive-home .workflow-card {
    padding: 22px;
}

body.krive-home .feature-index,
body.krive-home .workflow-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    margin-bottom: 16px;
    background: rgba(75, 211, 194, 0.12);
    color: #89efe1;
    border: 1px solid rgba(75, 211, 194, 0.22);
}

body.krive-home .feature-card h3,
body.krive-home .workflow-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

body.krive-home .workflow-section {
    padding-top: 8px;
}

body.krive-home .pricing-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    margin-top: 34px;
}

body.krive-home .pricing-callout-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Showcase template library */
body.krive-home .showcase-section {
    padding-top: 12px;
}

body.krive-home .showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

body.krive-home .showcase-card {
    overflow: hidden;
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

body.krive-home .showcase-card:hover {
    transform: translateY(-4px);
    border-color: rgba(75, 211, 194, 0.32);
    box-shadow: 0 32px 80px rgba(75, 211, 194, 0.12), 0 28px 70px rgba(0, 0, 0, 0.3);
}

body.krive-home .showcase-card-visual {
    min-height: 250px;
    padding: 18px;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
}

body.krive-home .showcase-card-visual::before {
    content: "";
    position: absolute;
    inset: -35%;
    background: conic-gradient(from 180deg, transparent, rgba(75, 211, 194, 0.2), transparent, rgba(251, 191, 36, 0.18), transparent);
    animation: showcase-spin 12s linear infinite;
}

body.krive-home .showcase-card-visual::after {
    content: "";
    position: absolute;
    inset: 1px;
    background: radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.08), transparent 38%), rgba(4, 9, 18, 0.74);
    border-radius: 24px 24px 0 0;
}

body.krive-home .showcase-visual--calc::before {
    background: conic-gradient(from 80deg, rgba(75, 211, 194, 0.36), transparent, rgba(113, 199, 255, 0.22), transparent);
}

body.krive-home .showcase-visual--budget::before {
    background: conic-gradient(from 240deg, rgba(251, 191, 36, 0.34), transparent, rgba(75, 211, 194, 0.2), transparent);
}

body.krive-home .showcase-visual--todo::before {
    background: conic-gradient(from 20deg, rgba(129, 140, 248, 0.34), transparent, rgba(75, 211, 194, 0.24), transparent);
}

@keyframes showcase-spin {
    to { transform: rotate(360deg); }
}

body.krive-home .showcase-visual-label {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(236, 243, 255, 0.78);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.krive-home .showcase-card-body {
    padding: 22px;
}

body.krive-home .showcase-card-body h3 {
    font-size: 1.35rem;
    margin-bottom: 8px;
}

body.krive-home .showcase-card-body p {
    color: rgba(214, 225, 244, 0.74);
    line-height: 1.62;
    margin-bottom: 18px;
}

body.krive-home .showcase-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

body.krive-home .button-sm {
    padding: 10px 13px;
    font-size: 0.9rem;
}

body.krive-home button.button {
    cursor: pointer;
    font: inherit;
}

body.krive-home .calc-preview,
body.krive-home .budget-preview,
body.krive-home .todo-preview {
    position: relative;
    z-index: 2;
    width: min(100%, 250px);
}

body.krive-home .calc-preview {
    padding: 14px;
    border-radius: 24px;
    background: rgba(5, 10, 18, 0.72);
    border: 1px solid rgba(75, 211, 194, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.krive-home .calc-display {
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(75, 211, 194, 0.1);
    color: #dffefa;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    text-align: right;
}

body.krive-home .calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

body.krive-home .calc-btn {
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(236, 243, 255, 0.82);
}

body.krive-home .calc-btn--op,
body.krive-home .calc-btn--eq {
    color: #04121d;
    background: #4bd3c2;
}

body.krive-home .calc-btn--clear {
    color: #ffe08a;
    background: rgba(251, 191, 36, 0.12);
}

body.krive-home .budget-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(5, 10, 18, 0.72);
    border: 1px solid rgba(251, 191, 36, 0.18);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.86rem;
}

body.krive-home .budget-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

body.krive-home .budget-table td:last-child {
    text-align: right;
}

body.krive-home .budget-pos { color: #8df5dc; }
body.krive-home .budget-neg { color: #ffc06b; }

body.krive-home .budget-row--total td {
    border-bottom: 0;
    background: rgba(75, 211, 194, 0.08);
    font-weight: 700;
}

body.krive-home .todo-list {
    list-style: none;
    display: grid;
    gap: 10px;
}

body.krive-home .todo-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(5, 10, 18, 0.72);
    border: 1px solid rgba(129, 140, 248, 0.18);
    color: rgba(236, 243, 255, 0.84);
}

body.krive-home .todo-item--done {
    color: rgba(214, 225, 244, 0.58);
    text-decoration: line-through;
}

body.krive-home .todo-check {
    color: #4bd3c2;
    text-decoration: none;
}

body.krive-home .todo-list-pending {
    color: #fbbf24;
}

body.krive-home .copy-template-btn.is-copied {
    background: linear-gradient(135deg, #22c55e, #4bd3c2);
}

body.krive-home .footer {
    margin-top: 28px;
    padding: 22px 8px 4px;
    border-top: 1px solid rgba(163, 182, 214, 0.12);
    color: rgba(214, 225, 244, 0.56);
    text-align: center;
    font-size: 0.92rem;
}

body.krive-home [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 700ms ease, transform 700ms ease;
}

body.krive-home [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

body.krive-home .hero-copy,
body.krive-home .hero-visual,
body.krive-home .trust-strip,
body.krive-home .feature-card,
body.krive-home .workflow-card,
body.krive-home .showcase-card,
body.krive-home .pricing-callout {
    will-change: transform;
}

body.krive-home .stat-number {
    font-variant-numeric: tabular-nums;
}

body.krive-home .button:focus-visible,
body.krive-home .nav-link:focus-visible,
body.krive-home .site-nav-link:focus-visible,
body.krive-home .header-link:focus-visible,
body.krive-home .header-cta:focus-visible {
    outline: 2px solid rgba(75, 211, 194, 0.9);
    outline-offset: 3px;
}

@media (max-width: 1120px) {
    body.krive-home .site-header {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    body.krive-home .site-nav {
        justify-content: flex-start;
    }

    body.krive-home .header-actions {
        flex-wrap: wrap;
    }

    body.krive-home .hero {
        grid-template-columns: 1fr;
    }

    body.krive-home .feature-grid,
    body.krive-home .showcase-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.krive-home .workflow-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    body.krive-home .page-shell {
        width: min(100% - 20px, 1200px);
        padding-top: 12px;
    }

    body.krive-home .site-header,
    body.krive-home .pricing-callout {
        padding: 18px 16px;
    }

    body.krive-home .hero {
        padding-top: 38px;
    }

    body.krive-home .hero h1 {
        max-width: none;
    }

    body.krive-home .visual-stats,
    body.krive-home .trust-strip,
    body.krive-home .feature-grid,
    body.krive-home .showcase-grid {
        grid-template-columns: 1fr;
    }

    body.krive-home .showcase-card-visual {
        min-height: 220px;
    }

    body.krive-home .section-heading--row,
    body.krive-home .pricing-callout {
        flex-direction: column;
        align-items: flex-start;
    }
}
