/* ============================================================
   Sasha — animated portrait of our Reachy Mini lab project.
   Vanilla CSS port of Claude Design "Sasha.html". All classes
   prefixed `.sa-` to avoid global conflicts. Variables scoped
   to `.sa-shell` so the widget is self-contained.
   ============================================================ */

/* Full-width dark section wrapper that hosts the card */
.nl-sasha-section {
    width: 100%;
    background: #000000;
    padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 3vw, 2rem);
    display: flex;
    justify-content: center;
}

.sa-shell {
    /* Scoped tokens (don't depend on global vars) */
    --sa-cyan: #2BA89E;
    --sa-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', ui-monospace, monospace;
    --sa-display: var(--font-primary, 'Plus Jakarta Sans'), 'Open Sans', system-ui, sans-serif;
    --sa-body: var(--font-primary, 'Plus Jakarta Sans'), 'Open Sans', system-ui, sans-serif;

    width: 100%;
    max-width: 1180px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    min-height: 680px;
    display: flex;
    flex-direction: column;
    color: #FFFFFF;
    font-family: var(--sa-body);
}

.sa-shell *,
.sa-shell *::before,
.sa-shell *::after {
    box-sizing: border-box;
}

/* Header bar */
.sa-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-family: var(--sa-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}
.sa-head__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sa-cyan); box-shadow: 0 0 12px var(--sa-cyan); }
.sa-head__spacer { flex: 1; }

/* Body — two columns */
.sa-body {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 0;
    position: relative;
    min-height: 520px;
}

/* ── Left: stage with the robot ───────────────────────── */
.sa-stage {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: radial-gradient(ellipse 60% 50% at 50% 65%, rgba(43, 168, 158, 0.08), transparent 60%);
}

/* dotted grid floor */
.sa-stage::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1.2px);
    background-size: 26px 26px;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 100%);
            mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 100%);
}

/* The robot — pure CSS */
.sa-robot {
    position: relative;
    width: 280px;
    height: 380px;
    animation: sa-bob 4s ease-in-out infinite;
}
@keyframes sa-bob {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50%      { transform: translateY(-8px) rotate(1deg); }
}

/* shadow under bot */
.sa-robot__shadow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    width: 160px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.5), transparent 70%);
    transform: translateX(-50%);
    animation: sa-shadow 4s ease-in-out infinite;
}
@keyframes sa-shadow {
    0%, 100% { transform: translateX(-50%) scale(1);    opacity: 0.55; }
    50%      { transform: translateX(-50%) scale(0.85); opacity: 0.35; }
}

/* Antennae */
.sa-ant {
    position: absolute;
    top: 8px;
    width: 2px;
    height: 96px;
    background: rgba(255, 255, 255, 0.7);
    transform-origin: bottom center;
}
.sa-ant--l { left: 70px;  animation: sa-ant-wobble-l 3s   ease-in-out infinite; }
.sa-ant--r { right: 70px; animation: sa-ant-wobble-r 3.4s ease-in-out infinite; }
@keyframes sa-ant-wobble-l {
    0%, 100% { transform: rotate(-12deg); }
    50%      { transform: rotate(-18deg); }
}
@keyframes sa-ant-wobble-r {
    0%, 100% { transform: rotate(8deg); }
    50%      { transform: rotate(14deg); }
}
.sa-ant__coil {
    position: absolute;
    bottom: 6px;
    left: -7px;
    width: 16px;
    height: 28px;
    border-radius: 50%;
    background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0 2px, transparent 2px 5px);
}
.sa-ant__tip {
    position: absolute;
    top: -4px;
    left: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sa-cyan);
    box-shadow: 0 0 12px var(--sa-cyan);
    animation: sa-tip 1.4s ease-in-out infinite;
}
@keyframes sa-tip {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.4); }
}

/* Head */
.sa-head-shell {
    position: absolute;
    top: 80px;
    left: 30px;
    width: 220px;
    height: 170px;
    background: linear-gradient(180deg, #F7F7F8 0%, #DDDDDD 100%);
    border-radius: 70px 70px 60px 60px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow:
        inset 0 -20px 30px rgba(0, 0, 0, 0.12),
        inset 0 8px 12px rgba(255, 255, 255, 0.6),
        0 18px 40px rgba(0, 0, 0, 0.45);
}

/* face plate */
.sa-face {
    position: absolute;
    top: 60px;
    left: 24px;
    width: 172px;
    height: 56px;
    background: #0A0A0C;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 18px;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.5);
}
.sa-eye {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #2F2F35 0%, #0A0A0C 70%);
    position: relative;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6);
}
.sa-eye__pupil {
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: var(--sa-cyan);
    box-shadow: 0 0 8px var(--sa-cyan), inset -2px -2px 4px rgba(0, 0, 0, 0.3);
    animation: sa-look 7s ease-in-out infinite, sa-blink 5.5s ease-in-out infinite;
}
.sa-eye__glint {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
}
@keyframes sa-look {
    0%, 18%   { transform: translate(0, 0); }
    22%, 38%  { transform: translate(4px, -2px); }
    42%, 58%  { transform: translate(-4px, -1px); }
    62%, 78%  { transform: translate(3px, 2px); }
    82%, 100% { transform: translate(0, 0); }
}
@keyframes sa-blink {
    0%, 92%, 96%, 100% { transform: translateY(0) scaleY(1); }
    93%, 95%           { transform: translateY(0) scaleY(0.08); }
}
.sa-mouth {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 2px;
}

/* neck + body + chest LED */
.sa-neck {
    position: absolute;
    top: 246px;
    left: 105px;
    width: 70px;
    height: 24px;
    background: linear-gradient(180deg, #999999, #555555);
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.4);
}
.sa-torso {
    position: absolute;
    top: 260px;
    left: 40px;
    width: 200px;
    height: 130px;
    background: linear-gradient(180deg, #F7F7F8 0%, #C8C8CC 100%);
    border-radius: 24px 24px 50% 50% / 24px 24px 30% 30%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow:
        inset 0 -10px 20px rgba(0, 0, 0, 0.12),
        inset 0 8px 12px rgba(255, 255, 255, 0.5),
        0 18px 40px rgba(0, 0, 0, 0.4);
}
.sa-chest {
    position: absolute;
    top: 320px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sa-cyan);
    box-shadow: 0 0 10px var(--sa-cyan);
    animation: sa-chest 2s ease-in-out infinite;
}
@keyframes sa-chest {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 1; }
}

/* Orbiting "second brain" dots */
.sa-orbit {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.sa-orbit__dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: var(--sa-cyan);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--sa-cyan);
}
.sa-orbit--1 { animation: sa-orbit-1 8s  linear infinite; }
.sa-orbit--2 { animation: sa-orbit-2 10s linear infinite reverse; }
.sa-orbit--3 { animation: sa-orbit-3 12s linear infinite; }
@keyframes sa-orbit-1 {
    from { transform: rotate(0deg)   translateX(180px) rotate(0deg); }
    to   { transform: rotate(360deg) translateX(180px) rotate(-360deg); }
}
@keyframes sa-orbit-2 {
    from { transform: rotate(0deg)   translateX(220px) rotate(0deg); }
    to   { transform: rotate(360deg) translateX(220px) rotate(-360deg); }
}
@keyframes sa-orbit-3 {
    from { transform: rotate(0deg)   translateX(200px) rotate(0deg); }
    to   { transform: rotate(360deg) translateX(200px) rotate(-360deg); }
}

/* ── Right side: lab panel ─────────────────────────────── */
.sa-panel {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.sa-residency {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--sa-mono);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}
.sa-residency__lbl { white-space: nowrap; }
.sa-residency__logo {
    height: 28px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.sa-name {
    font-family: var(--sa-display);
    font-weight: 200;
    font-size: clamp(2.5rem, 5.5vw, 4rem);
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 0;
}
.sa-name__meet { font-weight: 200; color: rgba(255, 255, 255, 0.65); }
.sa-name em    { font-style: normal; color: var(--sa-cyan); font-weight: 300; }

.sa-tagline {
    font-size: 15px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.65);
    max-width: none;
    letter-spacing: -0.1px;
    margin: 0;
}

/* Spec rows */
.sa-specs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.sa-spec {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.015);
}
.sa-spec__icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(43, 168, 158, 0.3);
    background: rgba(43, 168, 158, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sa-spec__icon svg {
    width: 14px;
    height: 14px;
    stroke: var(--sa-cyan);
    fill: none;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sa-spec__lbl {
    font-family: var(--sa-mono);
    font-size: 9px;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
}
.sa-spec__val {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: -0.1px;
}
.sa-spec__tag {
    margin-left: auto;
    font-family: var(--sa-mono);
    font-size: 9px;
    letter-spacing: 1px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(43, 168, 158, 0.08);
    border: 1px solid rgba(43, 168, 158, 0.3);
    color: var(--sa-cyan);
}
.sa-spec__tag--purple {
    background: rgba(110, 86, 207, 0.08);
    border-color: rgba(110, 86, 207, 0.3);
    color: #B7A4F0;
}

/* Live status strip */
.sa-status {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(43, 168, 158, 0.25);
    background: rgba(43, 168, 158, 0.04);
    border-radius: 10px;
    margin-top: auto;
}
.sa-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sa-cyan);
    animation: sa-status 1.4s ease-in-out infinite;
}
@keyframes sa-status {
    0%, 100% { opacity: 0.4; box-shadow: 0 0 0 0    rgba(43, 168, 158, 0.5); }
    50%      { opacity: 1;   box-shadow: 0 0 0 6px  rgba(43, 168, 158, 0); }
}
.sa-status__txt {
    font-family: var(--sa-mono);
    font-size: 11px;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.75);
}
.sa-status__txt strong { color: var(--sa-cyan); font-weight: 500; }

.sa-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-family: var(--sa-mono);
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 880px) {
    .sa-body { grid-template-columns: 1fr; }
    .sa-stage {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        min-height: 480px;
    }
}

/* Reduced motion: still animate but slower / no bobbing */
@media (prefers-reduced-motion: reduce) {
    .sa-robot,
    .sa-robot__shadow,
    .sa-ant--l,
    .sa-ant--r,
    .sa-eye__pupil,
    .sa-orbit__dot,
    .sa-chest,
    .sa-ant__tip,
    .sa-status__dot { animation: none; }
}
