/*
 * SEBA on the public pages (templates/landing_page/components/seba.html, js/seba_lp.js).
 * Colours from assets/seba/README.md: ink #0A1014, paper #F6F8F7, Sousa Green #0FA347.
 * Plain CSS (the Tailwind build is precompiled). Motion stops with prefers-reduced-motion.
 */
.seba-lp { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60; font-family: var(--font-sans, 'Space Grotesk', system-ui, sans-serif); }
@media (min-width: 640px) { .seba-lp { right: 24px; bottom: 24px; } }
.seba-lp[hidden], .seba-lp [hidden] { display: none !important; }

.seba-lp-launcher { position: relative; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px;
    border-radius: 14px; border: 1px solid rgba(246, 248, 247, .12); background: #0a1014; cursor: pointer; padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45); transition: border-color .2s ease, transform .2s ease; }
.seba-lp-launcher:hover { border-color: rgba(15, 163, 71, .7); transform: translateY(-2px); }
.seba-lp-launcher:focus-visible, .seba-lp button:focus-visible, .seba-lp a:focus-visible { outline: 2px solid #0fa347; outline-offset: 2px; }
.seba-lp-fresh { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: #0fa347;
    border: 2px solid #0a0a0f; animation: seba-lp-ping 1.6s ease-out infinite; }

.seba-lp-mark .seba-lp-dots { display: none; }
.seba-lp-thinking .seba-lp-mark .seba-lp-cursor { display: none; }
.seba-lp-thinking .seba-lp-mark .seba-lp-dots { display: inline; }
.seba-lp-cursor { animation: seba-lp-blink 1.1s steps(1, end) infinite; }
.seba-lp-dots rect { animation: seba-lp-wave 1s ease-in-out infinite; }
.seba-lp-dots rect:nth-child(2) { animation-delay: .15s; }
.seba-lp-dots rect:nth-child(3) { animation-delay: .3s; }

.seba-lp-panel { position: absolute; right: 0; bottom: calc(100% + 12px); width: min(21rem, calc(100vw - 32px)); overflow: hidden;
    border-radius: 14px; border: 1px solid rgba(246, 248, 247, .1); background: #0a1014; color: #f6f8f7;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55); animation: seba-lp-pop .22s ease-out; transform-origin: bottom right;
    max-height: calc(100dvh - 96px); overflow-y: auto; }
.seba-lp-head { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border-bottom: 1px solid rgba(246, 248, 247, .1); }
.seba-lp-word { font-weight: 700; letter-spacing: .04em; font-size: .875rem; white-space: nowrap; }
.seba-lp-word i { font-style: normal; color: #0fa347; }
.seba-lp-status { display: flex; align-items: center; gap: .4rem; min-width: 0; flex: 1; font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #8a9a9f; }
.seba-lp-status span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seba-lp-led { flex-shrink: 0; width: 6px; height: 6px; background: #0fa347; animation: seba-lp-blink 1.1s steps(1, end) infinite; }
.seba-lp-x { display: flex; padding: 4px; border: 0; border-radius: 6px; background: transparent; color: #8a9a9f; cursor: pointer; }
.seba-lp-x:hover { background: rgba(246, 248, 247, .1); color: #fff; }

.seba-lp-log { padding: .75rem .75rem 0; font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: 12px; color: #8a9a9f; }
.seba-lp-log p { margin: 0 0 .25rem; overflow-wrap: anywhere; }
.seba-lp-log p > span:first-child { color: #0fa347; }
.seba-lp-body { padding: .5rem .75rem .75rem; }
.seba-lp-tip { margin: 0; font-size: .875rem; line-height: 1.6; transition: opacity .2s ease; }
.seba-lp-thinking .seba-lp-tip { opacity: .4; }
.seba-lp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; }
.seba-lp-cta { display: inline-block; padding: .3rem .65rem; border-radius: 7px; background: #0fa347; color: #0a1014; font-size: .75rem;
    font-weight: 600; text-decoration: none; }
.seba-lp-cta:hover { filter: brightness(1.1); color: #0a1014; }
.seba-lp-btn { padding: .3rem .65rem; border-radius: 7px; border: 1px solid rgba(246, 248, 247, .15); background: transparent; color: #e2e8e5;
    font: inherit; font-size: .75rem; cursor: pointer; }
.seba-lp-btn:hover { background: rgba(246, 248, 247, .08); }
.seba-lp-quiet { margin-left: auto; padding: .3rem .4rem; border: 0; border-radius: 6px; background: transparent; color: #8a9a9f;
    font: inherit; font-size: 11px; cursor: pointer; }
.seba-lp-quiet:hover { background: rgba(246, 248, 247, .08); color: #fff; }

/* Phones: every control in the bubble is at least 40px tall, so it's easy to hit with a thumb. */
@media (max-width: 639px) {
    .seba-lp-head { padding: .25rem .25rem .25rem .75rem; }
    .seba-lp-x { width: 40px; height: 40px; align-items: center; justify-content: center; }
    .seba-lp-cta, .seba-lp-btn, .seba-lp-quiet { display: inline-flex; align-items: center; min-height: 40px; }
    .seba-lp-cta, .seba-lp-btn { padding: 0 .8rem; font-size: .875rem; }
    .seba-lp-quiet { padding: 0 .5rem; font-size: .75rem; }
}
@media (max-width: 359px) { .seba-lp-status { letter-spacing: .04em; } }

@keyframes seba-lp-blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .15; } }
@keyframes seba-lp-wave { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-6px); } }
@keyframes seba-lp-pop { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes seba-lp-ping { 0% { box-shadow: 0 0 0 0 rgba(15, 163, 71, .6); } 100% { box-shadow: 0 0 0 8px rgba(15, 163, 71, 0); } }
@media (prefers-reduced-motion: reduce) {
    .seba-lp *, .seba-lp-panel { animation: none !important; }
}
.seba-lp-still * { animation: none !important; }

/* ---- "Meet S.E.B.A" section on the landing page -------------------------------------------------- */
.seba-meet { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) { .seba-meet { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 4rem; } }
.seba-terminal { position: relative; overflow: hidden; padding: 2rem; border-radius: 1.5rem; background: #0a1014;
    border: 1px solid rgba(246, 248, 247, .08); box-shadow: 0 30px 60px rgba(0, 0, 0, .4);
    background-image: repeating-linear-gradient(135deg, rgba(15, 163, 71, .045) 0 1px, transparent 1px 22px); }
.seba-terminal::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #0fa347; }
.seba-terminal-top { display: flex; justify-content: space-between; gap: 1rem; font-family: var(--font-mono, monospace); font-size: 11px;
    letter-spacing: .2em; text-transform: uppercase; color: #8a9a9f; }
.seba-terminal-top span:last-child { display: flex; align-items: center; gap: .5rem; color: #e2e8e5; }
.seba-terminal-top span:last-child::before { content: ''; width: 8px; height: 8px; background: #0fa347; }
.seba-lockup { display: flex; align-items: center; gap: 1.25rem; margin: 2.5rem 0 1.5rem; }
.seba-lockup svg { width: clamp(64px, 12vw, 96px); height: auto; flex-shrink: 0; }
.seba-big-word { font-weight: 700; font-size: clamp(2.75rem, 8vw, 4.5rem); line-height: 1; letter-spacing: .02em; color: #f6f8f7; }
.seba-big-word i { font-style: normal; color: #0fa347; }
.seba-lines { margin: 0; padding: 0; list-style: none; font-family: var(--font-mono, monospace); font-size: clamp(.8rem, 1.8vw, .95rem);
    line-height: 1.9; color: #c9d3cf; }
.seba-lines li::before { content: '> '; color: #0fa347; }
.seba-lines li:last-child::after { content: ''; display: inline-block; width: .55em; height: 1.1em; margin-left: .3em;
    vertical-align: text-bottom; background: #0fa347; animation: seba-lp-blink 1.1s steps(1, end) infinite; }
.seba-states { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
.seba-states li { display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; border-radius: .9rem;
    background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); font-size: .875rem; color: #d1d5db; }
.seba-states img { width: 36px; height: 36px; flex-shrink: 0; border-radius: 8px; background: #0a1014; }
.seba-states strong { display: block; color: #fff; font-weight: 500; }
.seba-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem; border-radius: 9999px; font-size: .8125rem;
    color: #86efac; background: rgba(15, 163, 71, .12); border: 1px solid rgba(15, 163, 71, .4); }
.seba-chip svg { width: 16px; height: 16px; }
.seba-points { list-style: none; padding: 0; margin: 0; }
.seba-points li { display: flex; gap: .75rem; align-items: baseline; margin-bottom: .9rem; color: #d1d5db; line-height: 1.6; }
.seba-points li::before { content: ''; flex-shrink: 0; width: 8px; height: 8px; background: #0fa347; transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .seba-lines li:last-child::after { animation: none; } }
