/* ==========================================================================
   MYCLOUD.UNO — SECCIÓN "NOSOTROS / LA OFICINA 3D" (CSS/OFFICE.CSS)
   Grilla editorial:
   - Izquierda: Rótulo, titular e integrantes interactivos
   - Derecha: Escenario 3D dentro de marco neo-brutalista con anillos dinámicos
   ========================================================================== */

.nos, .nos * { box-sizing: border-box; }

.nos {
  --ac: #4f46e5;       /* color de acento principal */
  --ink: #14122b;      /* texto oscuro y líneas estructurales */
  --purple: #6d44e8;   /* parte destacada del titular */
  position: relative;
  padding: clamp(52px, 7.5vw, 104px) clamp(20px, 5vw, 60px);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #ffffff;
  background-image:
    linear-gradient(to right, rgba(17,24,39,.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17,24,39,.035) 1px, transparent 1px);
  background-size: 52px 52px;
  overflow: hidden;
}

/* Grilla editorial de 2 columnas */
.nos-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  grid-template-areas:
    "head  scene"
    "list  scene";
  column-gap: clamp(32px, 5vw, 70px);
  row-gap: 34px;
  align-items: start;
}

.nos-head  { grid-area: head; }
.nos-list  { grid-area: list; }
.nos-scene { grid-area: scene; align-self: center; }

/* Rótulo superior & Titular */
.nos-label {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.nos-label span:first-child { color: var(--ac); }
.nos-label i { flex: 1; height: 2px; background: var(--ink); }

.nos-title {
  margin: 0;
  font-size: clamp(36px, 4.2vw, 52px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.05;
}
.nos-title em { font-style: normal; color: var(--purple); }

/* Lista de integrantes interactiva */
.nos-list { border-top: 2px solid var(--ink); }

.nos-row {
  display: grid;
  grid-template-columns: 64px 1fr 16px;
  column-gap: 6px;
  align-items: center;
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: padding .25s ease, background .25s ease;
}

.nos-row:hover, .nos-row:focus-visible, .nos-row.is-open {
  padding-left: 14px;
  background: linear-gradient(90deg, rgba(79, 70, 229, .1), rgba(79, 70, 229, 0));
}

.nos-row:focus-visible { outline: 2px solid var(--ac); outline-offset: -2px; }

.nos-num {
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.6px var(--c);
}

.nos-name {
  display: block;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.nos-role {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: #5b5f86;
}

.nos-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c);
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
}

.nos-row:hover .nos-dot, .nos-row.is-open .nos-dot {
  transform: scale(1.5);
}

.nos-desc {
  grid-column: 2 / span 2;
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: #3b3f66;
  transition: max-height .3s ease, opacity .25s ease, margin .3s ease;
}

.nos-row:hover .nos-desc, .nos-row:focus-visible .nos-desc, .nos-row.is-open .nos-desc {
  max-height: 90px;
  opacity: 1;
  margin-top: 8px;
}

.nos-row.is-next .nos-name { color: #6b6f95; }
.nos-row.is-next .nos-num  { -webkit-text-stroke-color: #9a9dc0; }
.nos-row.is-next .nos-dot  { background: transparent; border: 2px dashed #9a9dc0; }

/* Marco contenedor de la escena 3D */
.nos-frame {
  position: relative;
  aspect-ratio: 16 / 11;
  width: 100%;
  overflow: hidden;
  border-radius: 26px;
  border: 3px solid var(--ink);
  background: linear-gradient(135deg, #d9d4f7, #b9b1f0);
  box-shadow: 16px 16px 0 var(--ac);
}

.nos-canvas {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: transparent;
}

.nos-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Pantalla de carga y fallback */
.mc-of__loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.85); color: #6b7280; font-size: 14px; transition: opacity .55s ease;
  z-index: 5;
}
.mc-of__loading.is-gone { opacity: 0; pointer-events: none; }
.mc-of__fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #6b7280; }

/* Anillos indicadores que localizan a cada integrante en la escena */
.nos-ring {
  position: absolute;
  width: 12%;
  max-width: 76px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid var(--c);
  transform: translate(-50%, -50%) scale(.6);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  transition: opacity .25s ease, transform .35s cubic-bezier(.3, 1.5, .5, 1);
}

.nos-ring::after {
  content: "";
  position: absolute;
  left: -3px; top: -3px; right: -3px; bottom: -3px;
  border-radius: 50%;
  border: 2px solid var(--c);
  animation: nos-ping 1.6s ease-out infinite;
}

.nos[data-active="gines"]   .nos-ring[data-for="gines"],
.nos[data-active="tomas"]   .nos-ring[data-for="tomas"],
.nos[data-active="miclo"]   .nos-ring[data-for="miclo"],
.nos[data-active="agustin"] .nos-ring[data-for="agustin"] {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Controles de la escena */
.nos-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 30px;
}

.nos-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.nos-chip.is-hint {
  border-style: dashed;
  font-weight: 600;
  color: #3b3f66;
}

button.nos-chip { cursor: pointer; }
button.nos-chip:hover {
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--ink);
  background: #fbbf24;
}
button.nos-chip:focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: 2px;
}
button.nos-chip[aria-pressed="true"] {
  background: #4f46e5;
  color: #fff;
}

@keyframes nos-ping {
  0%   { transform: scale(1);   opacity: .8; }
  100% { transform: scale(1.5); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .nos-ring::after { animation: none; }
  .nos-row, .nos-desc, .nos-dot { transition: none; }
}

/* Adaptación Responsive (Tablet & Móvil <= 900px) */
@media (max-width: 900px) {
  .nos-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "scene"
      "list";
    row-gap: 32px;
  }

  .nos-frame {
    box-shadow: 9px 9px 0 var(--ac);
    aspect-ratio: 4 / 3;
  }

  .nos-controls { margin-top: 22px; }
  .nos-row { grid-template-columns: 52px 1fr 16px; }
  .nos-num { font-size: 28px; }
  .nos-name { font-size: 21px; }
}
