/* ===================================================================
   KinetiCode AI — shared terminal theme
   Dark phosphor-green palette with syntax-highlight accents, matching
   the Helm 108 SSH console look. Shared by index.html + helm108.html;
   page-specific rules stay inline in each page.
   =================================================================== */

:root {
    /* Terminal surfaces */
    --bg-deep: #050807;      /* page background */
    --bg-panel: #0B120E;     /* cards, header */
    --bg-raised: #101A14;    /* inputs, hover */
    --border: #1D2E24;

    /* Phosphor green ramp */
    --primary-color: #3BE87B;   /* bright green - links, headings */
    --green-dim: #2BA85C;
    --text: #B8D8C4;            /* body text */
    --text-muted: #6C8A79;      /* comments */

    /* Syntax accents */
    --keyword: #C792EA;   /* magenta - keywords */
    --string: #E8B85B;    /* amber - strings */
    --func: #6FD3E8;      /* cyan - functions */
    --number: #F78C6C;    /* orange - numbers */
    --secondary-color: var(--string);
    --accent-color: var(--text);
    --light-color: var(--bg-deep);
    --dark-color: var(--text);

    --font-main: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco,
                 'Cascadia Mono', 'JetBrains Mono', Consolas, monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg-deep);
    /* faint scanline texture */
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(59, 232, 123, 0.025) 0px,
        rgba(59, 232, 123, 0.025) 1px,
        transparent 1px,
        transparent 3px
    );
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--primary-color);
    color: var(--bg-deep);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header / nav ------------------------------------------------- */

header {
    background-color: rgba(11, 18, 14, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-raised);
    border: 1px solid var(--green-dim);
    border-radius: 6px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(59, 232, 123, 0.6);
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-text::before {
    content: "~/ ";
    color: var(--text-muted);
    font-weight: 400;
}

.logo-text span {
    color: var(--string);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.2s;
    display: block;
    padding: 10px 0;
}

/* top-level nav items read as CLI flags */
.nav-links > li > a::before {
    content: "--";
    color: var(--text-muted);
    margin-right: 4px;
}

.nav-links a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(59, 232, 123, 0.5);
}

/* --- Dropdowns ---------------------------------------------------- */

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-panel);
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    min-width: 180px;
    list-style: none;
    border-radius: 6px;
    padding: 8px 0;
    z-index: 10;
}

.dropdown-menu a:hover,
.submenu-menu a:hover {
    background: var(--bg-raised);
    color: var(--primary-color);
}

.dropdown:hover > .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
    position: relative;
}

.dropdown-menu a {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.submenu {
    position: relative;
}

.submenu-menu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    background-color: var(--bg-panel);
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    min-width: 200px;
    list-style: none;
    border-radius: 6px;
    padding: 8px 0;
}

.submenu:hover > .submenu-menu {
    display: block;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

/* --- Sections ----------------------------------------------------- */

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-title h2::before {
    content: "## ";
    color: var(--keyword);
}

.section-title p {
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

.section-title p::before {
    content: "// ";
}

/* --- Buttons ------------------------------------------------------ */

.btn {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--green-dim);
}

.btn::before { content: "> "; }

.btn:hover {
    background-color: var(--primary-color);
    color: var(--bg-deep);
    box-shadow: 0 0 18px rgba(59, 232, 123, 0.35);
}

/* --- Carousel ----------------------------------------------------- */

.carousel-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.carousel-video {
    width: 100%;
    display: none;
}

.carousel-video.active {
    display: block;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.carousel-btn {
    background: var(--bg-raised);
    color: var(--primary-color);
    border: 1px solid var(--green-dim);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: bold;
    transition: all 0.2s;
}

.carousel-btn:hover {
    background: var(--primary-color);
    color: var(--bg-deep);
}

.video-title {
    text-align: center;
    margin-bottom: 15px;
    font-weight: bold;
    color: var(--string);
}

/* --- Cards & grids (shared: product + journey pages) -------------- */

/* Give anchored sections room to clear the sticky header. */
section[id] { scroll-margin-top: 90px; }

.grid {
    display: grid;
    gap: 22px;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    border-color: var(--green-dim);
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.5);
}
.card h3 {
    color: var(--primary-color);
    font-size: 1.05rem;
    margin-bottom: 10px;
}
.card h3::before { content: "> "; color: var(--text-muted); }
.card p { color: var(--text-muted); font-size: 0.92rem; }

/* clickable cards (journey studies) */
a.card { text-decoration: none; display: block; }
a.card .go { color: var(--func); font-size: 0.85rem; margin-top: 14px; display: inline-block; }
a.card:hover .go { text-shadow: 0 0 8px rgba(111, 211, 232, 0.5); }

/* license / meta chips */
.tag {
    display: inline-block;
    font-size: 0.72rem;
    color: var(--string);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 10px;
    margin-top: 12px;
}
.tag.mit { color: var(--func); }
.tag.apache { color: var(--string); }

/* prose intro under a section title */
.section-body {
    max-width: 760px;
    margin: 0 auto 40px;
    color: var(--text);
}
.section-body p { margin-bottom: 14px; }
.section-body p::before { content: "// "; color: var(--text-muted); }

/* --- Footer ------------------------------------------------------- */

footer {
    background-color: var(--bg-deep);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    text-align: center;
    padding: 40px 0;
    font-size: 0.88rem;
}

/* Product doc links (support / privacy). Also used beneath the
   Helm 108 carousel. */
.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin-top: 18px;
}

.footer-links a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(59, 232, 123, 0.5);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.social-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.social-links a::before {
    content: "[";
    color: var(--text-muted);
}

.social-links a::after {
    content: "]";
    color: var(--text-muted);
}

.social-links a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}
