html {
    /* Fluid, uniform type scale: one root size drives every rem unit. */
    font-size: clamp(15px, 0.42vw + 12.5px, 21px);
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text: #f1f5f9;
    --text-muted: #cbd5e1;
    --border: #475569;
    --success: #10b981;
    --warning: #f59e0b;
    --section-pad: clamp(56px, 8vw, 88px);
    --radius: 12px;
    --radius-sm: 8px;
}

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

html {
    scroll-padding-top: 72px;
    font-size: 1rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.65;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: min(80rem, 92vw);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 24px);
}

/* Shared section rhythm */
section h2 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 16px;
    color: var(--primary);
}

.section-intro {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.0625rem;
    line-height: 1.7;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

.section-intro a {
    color: var(--primary);
    text-decoration: none;
}

.section-intro a:hover {
    text-decoration: underline;
}

/* Navigation */
.navbar {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px clamp(16px, 4vw, 24px);
    gap: 16px;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: clamp(12px, 2vw, 24px);
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-menu a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.nav-menu a:hover {
    color: var(--primary);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nav-lang {
    display: flex;
    align-items: center;
}

.lang-select {
    font-family: inherit;
    font-size: 0.812rem;
    color: var(--text-muted);
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 28px 6px 10px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    min-height: 32px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.lang-select:hover,
.lang-select:focus-visible {
    color: var(--text);
    border-color: var(--primary);
    outline: none;
}

/* Hide Google Translate banner / default widget chrome */
.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-te-spinner-pos,
.goog-logo-link,
.goog-te-gadget span {
    display: none !important;
}

body {
    top: 0 !important;
}

.skiptranslate,
#google_translate_element .goog-te-gadget {
    display: none !important;
}

.goog-text-highlight {
    background: none !important;
    box-shadow: none !important;
}

/* Hero Section */
.hero {
    padding: clamp(64px, 10vw, 96px) 0 clamp(72px, 10vw, 100px);
    text-align: center;
    background:
        radial-gradient(ellipse 80% 60% at 50% -20%, rgba(99, 102, 241, 0.18), transparent),
        linear-gradient(160deg, var(--surface) 0%, var(--background) 100%);
}

.hero-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--success);
    margin-bottom: 20px;
    font-weight: 600;
}

.hero h1 {
    font-size: 3.4rem;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 16px;
    font-weight: 500;
}

.hero-description {
    font-size: 1.0625rem;
    color: var(--text-muted);
    margin: 0 auto 32px;
    line-height: 1.75;
    max-width: 42rem;
}

.hero-description--after-video {
    margin-top: 28px;
    margin-bottom: 28px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 28px;
}

.hero-badge {
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 999px;
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.hero-commands {
    margin: 0 auto 36px;
    max-width: 33rem;
}

.code-block--hero-terminal {
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15), 0 8px 32px rgba(0, 0, 0, 0.25);
}

.hero-video {
    margin: 0 auto 36px;
    max-width: 56rem;
}

.hero-video__title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    background: none;
    -webkit-text-fill-color: unset;
}

.hero-video__subtitle {
    font-size: 0.938rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.hero-video .video-container {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
    background: var(--background);
}

.hero-video .video-container video {
    border-radius: var(--radius);
    object-fit: cover;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Code blocks */
.code-block {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-align: left;
}

.code-block--terminal {
    max-width: 33rem;
    margin: 0 auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.code-block__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px 8px 16px;
    font-size: 0.688rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    background-color: var(--surface-light);
    border-bottom: 1px solid var(--border);
}

.code-block__label {
    flex-shrink: 0;
}

.code-block__copy {
    flex-shrink: 0;
    font-family: inherit;
    font-size: 0.688rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 6px 12px;
    min-height: 32px;
    min-width: 44px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.code-block__copy:hover,
.code-block__copy:focus-visible {
    color: var(--text);
    background-color: rgba(99, 102, 241, 0.12);
    border-color: var(--border);
    outline: none;
}

.code-block__copy:active {
    background-color: rgba(99, 102, 241, 0.2);
}

.code-block__copy--done {
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .code-block__copy {
        transition: none;
    }
}

.code-block pre {
    margin: 0;
    padding: 20px 22px;
    overflow-x: auto;
}

.code-block pre code {
    display: block;
    padding: 0;
    background: none;
    font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
    font-size: 0.938rem;
    line-height: 1.7;
    color: var(--success);
    white-space: pre;
}

.code-comment {
    color: var(--text-muted);
    opacity: 0.75;
}

/* OSS Section (page bottom, before footer) */
.oss {
    padding: var(--section-pad) 0;
    background-color: var(--surface);
    border-top: 1px solid var(--border);
}

.oss-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

.oss-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.oss-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
}

.oss-card h3 {
    margin-bottom: 12px;
    color: var(--text);
    font-size: 1.125rem;
}

.oss-card p {
    color: var(--text-muted);
    margin-bottom: 10px;
    font-size: 0.938rem;
    line-height: 1.65;
}

.oss-card p:last-child {
    margin-bottom: 0;
}

.oss-card a {
    color: var(--primary);
    text-decoration: none;
}

.oss-card a:hover {
    text-decoration: underline;
}

/* Responsive video (16:9) */
.video-container {
    width: 100%;
    position: relative;
    aspect-ratio: 16 / 9;
}

.video-container video {
    width: 100%;
    height: 100%;
    display: block;
    background: var(--background);
}

/* Buttons */
.btn {
    padding: 11px 24px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.938rem;
    transition: all 0.2s ease;
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: white;
}

/* Mission Section */
.mission {
    padding: var(--section-pad) 0;
    background-color: var(--background);
}

.mission > .container > p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.0625rem;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.mission-card {
    background-color: var(--surface);
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.mission-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.mission-card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.mission-card h3 {
    margin-bottom: 15px;
    color: var(--text);
}

.mission-card p {
    color: var(--text-muted);
}

/* Features Section */
.features {
    padding: var(--section-pad) 0;
    background-color: var(--surface);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature-item {
    background-color: var(--background);
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-item:hover {
    border-color: rgba(99, 102, 241, 0.6);
    transform: translateY(-3px);
}

.feature-item h3 {
    margin-bottom: 10px;
    font-size: 1.062rem;
}

.feature-item p {
    color: var(--text-muted);
}

/* Workflow Section */
.workflow {
    padding: var(--section-pad) 0;
    background-color: var(--background);
}

.workflow h2 {
    margin-bottom: 36px;
}

.workflow-diagram {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    overflow-x: auto;
    padding: 30px 0;
}

.workflow-step {
    background-color: var(--surface);
    padding: 22px 20px;
    border-radius: var(--radius);
    text-align: center;
    min-width: 140px;
    border: 1px solid var(--border);
}

.step-number {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 10px;
}

.step-title {
    font-size: 1.125rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.step-tools {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.workflow-arrow {
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
}

/* Ecosystem Section */
.ecosystem {
    padding: var(--section-pad) 0;
    background-color: var(--surface);
}

.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.tool-card {
    background-color: var(--background);
    padding: 22px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.tool-card:hover {
    border-color: rgba(236, 72, 153, 0.5);
    background-color: rgba(51, 65, 85, 0.35);
}

.tool-card h4 {
    margin-bottom: 10px;
    color: var(--primary);
}

.tool-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Quick Start Section */
.quickstart {
    padding: var(--section-pad) 0;
    background-color: var(--background);
}

.quickstart-note {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.938rem;
}

.quickstart-note a {
    color: var(--primary);
    text-decoration: none;
}

.quickstart-note a:hover {
    text-decoration: underline;
}

/* Modes Section */
.modes {
    padding: var(--section-pad) 0;
    background-color: var(--surface);
}

.modes h2 {
    margin-bottom: 36px;
}

.modes-table {
    display: grid;
    gap: 20px;
}

.mode-row {
    background-color: var(--background);
    padding: 28px;
    border-radius: var(--radius);
    border-left: 3px solid var(--secondary);
}

.mode-header {
    font-size: 1.125rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--secondary);
}

.mode-desc {
    color: var(--text-muted);
    line-height: 1.8;
}

/* Stats Section */
.stats {
    padding: var(--section-pad) 0;
    background-color: var(--background);
}

.stats h2 {
    margin-bottom: 36px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    background-color: var(--surface);
    padding: 28px 24px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-detail {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Docs Section */
.docs {
    padding: var(--section-pad) 0;
    background-color: var(--surface);
}

.docs h2 {
    margin-bottom: 36px;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.doc-link {
    background-color: var(--background);
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, transform 0.2s ease;
    display: block;
}

.doc-link:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.doc-link h4 {
    color: var(--primary);
    margin-bottom: 10px;
}

.doc-link p {
    color: var(--text-muted);
}

/* CTA Section */
.cta {
    padding: var(--section-pad) 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    text-align: center;
}

.cta h2 {
    font-size: 2.1rem;
    margin-bottom: 12px;
    color: white;
}

.cta > .container > p {
    font-size: 1.0625rem;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.92);
    max-width: 35rem;
    margin-left: auto;
    margin-right: auto;
}

.cta > .container > p code {
    font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
    font-size: 0.938rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
}

.oss-card code {
    font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
    font-size: 0.875rem;
    color: var(--success);
}

.cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta .btn-primary {
    background-color: white;
    color: var(--primary);
}

.cta .btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.cta .btn-secondary {
    border-color: white;
    color: white;
}

.cta .btn-secondary:hover {
    background-color: white;
    color: var(--primary);
}

/* Footer */
.footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    padding: 36px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer p {
    margin-bottom: 8px;
}

.footer p:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        gap: 10px 14px;
        font-size: 0.812rem;
    }

    .lang-select {
        font-size: 0.75rem;
        max-width: 140px;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-video {
        max-width: 100%;
    }

    .hero-commands {
        max-width: 100%;
    }

    .workflow-diagram {
        flex-direction: column;
        align-items: stretch;
    }

    .workflow-step {
        min-width: unset;
    }

    .workflow-arrow {
        transform: rotate(90deg);
        align-self: center;
    }

    .hero-buttons,
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

}
/* --- Koru in Action: animated shell scenarios --- */
.in-action {
    padding: var(--section-pad) 0;
    background: linear-gradient(180deg, var(--background), var(--surface) 140%);
}

.in-action h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.scenario-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 28px auto 22px;
}

.scenario-tab {
    padding: 9px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.scenario-tab:hover {
    color: var(--text);
    border-color: var(--primary);
}

.scenario-tab.is-active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.code-block--scenario {
    max-width: 760px;
    margin: 0 auto;
}

.scenario-status {
    color: var(--success);
    font-size: 0.625rem;
    letter-spacing: 0.08em;
}

.scenario-screen {
    min-height: 236px;
    padding: 18px 20px;
    font-size: 0.95rem;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.scenario-screen .sc-cmd { color: var(--text); font-weight: 600; }
.scenario-screen .sc-out { color: var(--text-muted); }
.scenario-screen .sc-ok  { color: var(--success); }
.scenario-screen .sc-err { color: var(--warning); }

.scenario-cursor {
    display: inline-block;
    color: var(--primary);
    animation: scenario-blink 1s steps(1) infinite;
}

@keyframes scenario-blink {
    50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .scenario-cursor { animation: none; }
}

.scenario-usecase {
    max-width: 760px;
    margin: 18px auto 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    min-height: 3.2em;
}

@media (max-width: 640px) {
    .scenario-screen { min-height: 280px; font-size: 0.78rem; }
}

/* --- Inline SVG icons (consistent cross-platform rendering) --- */
.svgi {
    width: 1.1em;
    height: 1.1em;
    display: inline-block;
    vertical-align: -0.18em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.svgi--brand { color: var(--primary); width: 1.25em; height: 1.25em; }
.svgi--hero { color: var(--primary); width: 0.95em; height: 0.95em; vertical-align: -0.08em; }
.svgi--card { width: 2rem; height: 2rem; color: var(--primary); }
.mission-card .icon { line-height: 1; }
.feature-item h3 .svgi, .scenario-tab .svgi { color: var(--primary); margin-right: 2px; }
.scenario-tab.is-active .svgi { color: #fff; }

/* Fluid sizing for the In Action section — scales with the screen */
.code-block--scenario {
    max-width: min(60rem, 94vw);
}

.scenario-screen {
    font-size: 0.95rem;
    min-height: 15em;
}

.scenario-usecase {
    max-width: min(60rem, 94vw);
    font-size: 1rem;
}

.scenario-tab {
    font-size: 0.9rem;
}
