/* =========================================================
   Computadora que se desarma (vista explosionada) — portada
   ========================================================= */
.pc { position: relative; width: 100%; max-width: 520px; margin-inline: auto; outline: none; cursor: pointer; }
.pc__stage { position: relative; width: 520px; height: 470px; margin-inline: auto; transform-origin: center top; }
.pc__part {
  position: absolute;
  transition: transform .75s cubic-bezier(.2,.8,.2,1), filter .5s ease;
  transform: translate(0, 0) rotate(0deg) scaleX(var(--sx0, 1));
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.45));
}
.pc__part > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pc.is-open .pc__part { transform: translate(var(--tx, 0px), var(--ty, 0px)) rotate(var(--r, 0deg)) scaleX(1); filter: drop-shadow(0 14px 18px rgba(0,0,0,.55)); }

/* Las piezas salen escalonadas y regresan en orden inverso */
.pc__glass  { transition-delay: .18s; } .pc.is-open .pc__glass  { transition-delay: 0s; }
.pc__cooler { transition-delay: .14s; } .pc.is-open .pc__cooler { transition-delay: .06s; }
.pc__gpu    { transition-delay: .10s; } .pc.is-open .pc__gpu    { transition-delay: .10s; }
.pc__ram    { transition-delay: .08s; } .pc.is-open .pc__ram    { transition-delay: .14s; }
.pc__cpu    { transition-delay: .04s; } .pc.is-open .pc__cpu    { transition-delay: .20s; }
.pc__psu, .pc__ssd { transition-delay: .02s; }
.pc.is-open .pc__psu, .pc.is-open .pc__ssd { transition-delay: .18s; }

/* Posición y tamaño de cada pieza (armada) */
.pc__case   { left: 130px; top: 30px;  width: 260px; height: 400px; filter: drop-shadow(0 30px 40px rgba(0,0,0,.6)); }
.pc__board  { left: 148px; top: 52px;  width: 200px; height: 270px; }
.pc__cpu    { left: 210px; top: 92px;  width: 56px;  height: 56px; }
.pc__cooler { left: 196px; top: 78px;  width: 84px;  height: 84px; }
.pc__ram    { top: 70px; width: 28px; height: 110px; --sx0: .43; }
.pc__ram.r1 { left: 290px; }
.pc__ram.r2 { left: 308px; }
.pc__gpu    { left: 156px; top: 196px; width: 190px; height: 58px; }
.pc__psu    { left: 150px; top: 322px; width: 126px; height: 70px; }
.pc__ssd    { left: 288px; top: 366px; width: 84px;  height: 24px; }
.pc__glass  { left: 130px; top: 30px;  width: 260px; height: 400px; }

.pc__case::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -10px; height: 10px; border-radius: 0 0 6px 6px; background: #15171c; }
.pc__case-led { position: absolute; right: 16px; top: 22px; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.pc.is-open .pc__case { filter: drop-shadow(0 30px 40px rgba(0,0,0,.6)) drop-shadow(0 0 26px rgba(59,130,246,.55)); }

/* Ventiladores girando */
.pc .spin { animation: pcSpin 1.4s linear infinite; transform-box: fill-box; transform-origin: 50% 50%; }
.pc.is-open .spin { animation-duration: .45s; }
@keyframes pcSpin { to { transform: rotate(360deg); } }

/* RAM: brillo RGB */
.pc__ram { filter: drop-shadow(0 0 6px rgba(99,102,241,.7)); }

/* Panel lateral de vidrio templado */
.pc__glass {
  border-radius: 14px;
  background:
    linear-gradient(115deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,.04) 28%, transparent 40%, rgba(255,255,255,.07) 62%, transparent 70%),
    rgba(30,36,48,.18);
  border: 9px solid rgba(8,9,12,.82);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 0 0 1px rgba(255,255,255,.08);
  filter: none;
}
.pc__glass .screw { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f3f4f6, #8b929c 70%); box-shadow: 0 1px 2px rgba(0,0,0,.6); }
.pc__glass .s1 { left: -6px; top: -6px; } .pc__glass .s2 { right: -6px; top: -6px; }
.pc__glass .s3 { left: -6px; bottom: -6px; } .pc__glass .s4 { right: -6px; bottom: -6px; }

/* Etiquetas de cada componente */
.pc__tag {
  position: absolute; left: 50%; bottom: calc(100% + 8px);
  white-space: nowrap; font-size: .74rem; font-weight: 700; letter-spacing: .02em; color: #fff;
  padding: .3rem .65rem; border-radius: 999px; background: rgba(29,78,216,.92); border: 1px solid rgba(147,197,253,.5);
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.6); opacity: 0; pointer-events: none;
  transform: translate(-50%, 6px) rotate(calc(var(--r, 0deg) * -1));
  transition: opacity .3s ease, transform .3s ease;
}
.pc.is-open .pc__tag { opacity: 1; transform: translate(-50%, 0) rotate(calc(var(--r, 0deg) * -1)); transition-delay: .5s; }
.pc__board .pc__tag { bottom: auto; top: 118px; left: 46%; }

/* Indicación */
.pc__hint {
  display: flex; align-items: center; justify-content: center; gap: .45rem; width: max-content; margin: 6px auto 0;
  font-size: .8rem; font-weight: 600; color: rgba(225,234,255,.8); padding: .4rem .9rem; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); transition: opacity .3s;
}
.pc__hint svg { width: 14px; height: 14px; color: var(--blue-300); }
.pc.is-open .pc__hint { opacity: 0; }

/* Las tarjetas flotantes se ocultan mientras está desarmada */
.hero__visual .float-card { transition: opacity .35s ease; z-index: 2; }
.hero__visual.pc-open .float-card { opacity: 0; pointer-events: none; }
.float-card--a { left: -30px; bottom: 30%; }
.float-card--b { right: -20px; top: 2%; }

/* Responsivo */
@media (max-width: 1180px) and (min-width: 1081px) { .pc__stage { transform: scale(.9); margin-bottom: -47px; } }
@media (max-width: 640px) {
  .pc__stage { transform: scale(.6); margin-bottom: -188px; left: 50%; margin-left: -260px; transform-origin: center top; }
  .pc__hint { font-size: .74rem; }
}
@media (prefers-reduced-motion: reduce) { .pc .spin { animation: none; } }

/* =========================================================
   Pantalla de bienvenida (el clic en "Entrar" habilita el audio)
   ========================================================= */
.intro {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(120% 90% at 50% 0%, #1e3fae 0%, #0b1f6b 45%, #060f3d 100%);
  color: #fff; text-align: center; transition: opacity .7s ease, visibility .7s ease;
}
.intro.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
html.intro-seen .intro { display: none; }
body.intro-open { overflow: hidden; }
.intro__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse at 50% 45%, #000 15%, transparent 70%);
}
.intro__box { position: relative; max-width: 560px; animation: introIn 1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes introIn { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }
.intro__logo { width: 92px; height: 92px; margin: 0 auto 26px; padding: 12px; border-radius: 24px; background: #fff; box-shadow: 0 20px 50px -12px rgba(0,0,0,.55), 0 0 0 10px rgba(255,255,255,.06); }
.intro__logo svg { width: 100%; height: 100%; }
.intro__eyebrow { font-size: .85rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: #93c5fd; margin-bottom: .6rem; }
.intro__title { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.intro__title span { font-weight: 500; opacity: .9; }
.intro__tag { margin-top: .9rem; color: rgba(225,234,255,.75); font-size: 1rem; }
.intro__btn {
  margin-top: 2.2rem; display: inline-flex; align-items: center; gap: .6rem; padding: 1.05rem 2rem; border-radius: 999px; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 1.05rem; color: #fff;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8 55%, #12298c); box-shadow: 0 14px 34px -10px rgba(59,130,246,.8), 0 0 0 6px rgba(59,130,246,.15);
  transition: transform .2s ease, box-shadow .2s ease; animation: introPulse 2.4s ease-in-out infinite 1s;
}
.intro__btn svg { width: 1.2em; height: 1.2em; }
.intro__btn:hover { transform: translateY(-2px) scale(1.02); }
@keyframes introPulse { 0%, 100% { box-shadow: 0 14px 34px -10px rgba(59,130,246,.8), 0 0 0 6px rgba(59,130,246,.15); } 50% { box-shadow: 0 14px 34px -10px rgba(59,130,246,.8), 0 0 0 14px rgba(59,130,246,0); } }
.intro__note { margin-top: 1.2rem; display: flex; justify-content: center; align-items: center; gap: .45rem; font-size: .82rem; color: rgba(225,234,255,.6); }
.intro__note svg { width: 1.1em; height: 1.1em; }

/* Al desarmarse, el vidrio pasa detrás de las piezas para no tapar sus etiquetas */
.pc__part { z-index: 2; }
.pc__case { z-index: 0; }
.pc__glass { z-index: 3; }
.pc.is-open .pc__glass { z-index: 1; }

/* Los letreros blancos siempre por encima de la computadora y dentro del marco */
.pc { isolation: isolate; z-index: 1; }
.hero__visual .float-card { z-index: 5; }
.float-card--a { left: -10px; bottom: 26%; }
.float-card--b { right: 0; top: 4%; }

/* Logo original en el encabezado */
.brand__logo {
  width: 70px; height: 70px; border-radius: 50%; background: #fff; object-fit: cover;
  clip-path: circle(48.5% at 50% 50.5%);
  box-shadow: 0 6px 18px -6px rgba(0,0,0,.45);
  transition: transform .25s ease;
}
.brand--logo:hover .brand__logo { transform: scale(1.05); }
@media (max-width: 640px) { .brand__logo { width: 56px; height: 56px; } }
.brand--logo { gap: .8rem; }
@media (max-width: 380px) { .brand--logo .brand__top { font-size: .7rem; } .brand--logo .brand__bottom { font-size: 1rem; } }

/* Ícono original (monitor con palomita) en mosaico blanco */
.brand__logo {
  width: 50px; height: 50px; border-radius: 13px; clip-path: none; object-fit: contain;
  background: #fff; padding: 5px; box-shadow: 0 6px 18px -6px rgba(0,0,0,.45);
}
@media (max-width: 640px) { .brand__logo { width: 46px; height: 46px; } }

/* Ícono original también en bienvenida, pie de página y chat */
.intro__logo img, .chat__avatar img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand__mark--img { object-fit: contain; }
