/* Kabay site prototype: what changes on top of the live style.css (which build.js has already turned gold).
   The name, the weld seams, and the small Prototype panel in the corner (js/kabay-proto.js). */

/* a slightly darker page (Jon, Nov. 29: "darken the bg more slightly"): the backgrounds a step down, and the hero's
   gold haze about half as strong as the live site's blue one was, since gold reads as a brown fog on black */
:root {
    --color-bg: #0c0c0b;
    --color-bg-dark: #080807;
    --color-bg-card: #131312;
    --color-bg-card-hover: #181817;
    --color-surface: #161615;
}
.hero-gradient {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255, 182, 18, 0.045) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(224, 156, 0, 0.028) 0%, transparent 50%),
        linear-gradient(180deg, transparent 0%, var(--color-bg) 100%);
}

/* the name: "jon" in white and "kabay" in bold gold, in Poppins, the same as the logo lab */
.intro-word {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    background: none;
    color: var(--color-white);
    -webkit-text-fill-color: var(--color-white);
}
.intro-word b {
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
}
.logo-letter:nth-child(-n+3) {
    background: none !important;
    -webkit-text-fill-color: var(--color-white);
}
.logo-letter:nth-child(n+4) {
    font-weight: 700;
}

/* the weld seams (mark "A Welded"): they come in with the hexagons in the intro, and stay still while the collapsed mark breathes */
.intro .seams {
    opacity: 0;
}
.intro.play .seams {
    animation: kbSeams 0.3s ease 2.6s forwards;
}
.intro.style-spark.play .seams {
    animation: none;   /* js/spark-intro.js fades them in with the rest of the mark */
}

/* the intro's lockup: the gap Jon picked in the lab ("Horizontal, small name", 0.2 of the mark's width; Nov. 29, "Winner.").
   The name's size already matches (42px on a 150px mark, 30px on 104px). */
.intro-lockup {
    gap: 30px;
}
@media (max-width: 640px) {
    .intro-lockup {
        gap: 21px;
    }
}
@keyframes kbSeams {
    to { opacity: 1; }
}
.motion-ok.sb-collapsed .logo-mark.alive > g.seams {
    animation: none;
}

/* the Prototype panel: a small pill in the corner that opens the switches */
.kbp {
    position: fixed;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 1200;
    font: 500 12px/1.2 'Poppins', sans-serif;
}
.kbp-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 9px 12px;
    background: rgba(12, 11, 9, 0.92);
    border: 1px solid rgba(255, 182, 18, 0.35);
    color: var(--color-primary-light);
    font: inherit;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.kbp-toggle i {
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    box-shadow: 0 0 8px rgba(255, 182, 18, 0.8);
}
.kbp-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    width: min(310px, calc(100vw - 24px));
    padding: 6px 8px 8px;
    background: rgba(12, 11, 9, 0.97);
    border: 1px solid rgba(255, 182, 18, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
}
.kbp.open .kbp-panel {
    display: block;
}
.kbp-row {
    display: grid;
    grid-template-columns: 58px 1fr;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    border-top: 1px solid var(--color-border);
}
.kbp-row:first-child {
    border-top: 0;
}
.kbp-row > span {
    color: var(--color-text-muted);
}
.kbp-seg {
    display: flex;
    gap: 4px;
}
.kbp button.kbp-b {
    flex: 1 1 0;
    min-width: 0;
    padding: 9px 6px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--color-text);
    font: inherit;
    cursor: pointer;
}
.kbp button.kbp-b:hover,
.kbp button.kbp-b:focus-visible {
    border-color: rgba(255, 182, 18, 0.45);
    outline: none;
}
.kbp button.kbp-b[aria-pressed="true"] {
    border-color: rgba(255, 182, 18, 0.75);
    background: rgba(255, 182, 18, 0.08);
    color: var(--color-primary-light);
}
.kbp-seg.kbp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.kbp-replay {
    width: 100%;
    margin-top: 4px;
}
.kbp button.kbp-step {
    flex: none;
    padding: 9px 10px;
    color: var(--color-primary-light);
}
.kbp-menu-name {
    flex: 1;
    min-width: 0;
    align-self: center;
    text-align: center;
    font-weight: 600;
    color: var(--color-white);
}
.kbp-menu-desc {
    margin: 0 0 2px;
    min-height: 2.9em;
}
.kbp-panel {
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}

/* the hexagon ring around the K (js/kabay-ring.js sets data-kb-ring): every look but Hex Line draws it on a canvas,
   so the CSS rings hide. The idle pulse keeps running hidden, because its beat tells the canvas when to play. */
html[data-kb-ring]:not([data-kb-ring="line"]) .sidebar-logo a::after,
html[data-kb-ring]:not([data-kb-ring="line"]) .logo-shock {
    visibility: hidden !important;
}
/* the folded logo's idle (js/kabay-ring.js sets data-kb-idle, Dec. 2): the CSS ring shows only for Faint Arc with Hex Line, dimmed */
html[data-kb-idle]:not([data-kb-idle="faint"]) .sidebar-logo a::after {
    visibility: hidden !important;
}
html[data-kb-idle="faint"] .sidebar-logo a::after {
    filter: opacity(0.35);
}

/* the menu fold and unfold (js/kabay-fx.js sets data-kb-menu): what the letters break into */
html[data-kb-menu="sparks"] .logo-swarm i,
html[data-kb-menu="forge"] .logo-swarm i {
    clip-path: none;
    border-radius: 50%;
    background: radial-gradient(circle, #fffaf0 0 22%, #FFE08A 40%, rgba(255, 150, 30, 0) 72%);
    box-shadow: 0 0 6px 1px rgba(255, 180, 60, 0.7);
}
html[data-kb-menu="molten"] .logo-swarm i {
    clip-path: none;
    border-radius: 50% 50% 50% 50% / 60% 60% 42% 42%;
    background: radial-gradient(circle at 40% 35%, #fff4d6, #FFB612 55%, #c86a00);
    box-shadow: 0 0 8px rgba(255, 140, 30, 0.8);
}
.kbp-note {
    margin: 6px 0 0;
    color: var(--color-text-muted);
    font-weight: 400;
    font-size: 11px;
    line-height: 1.45;
}
