/* ==========================================================================
   BIORED INGENIERÍA — Proceso de Fabricación
   Dirección estética: "Plano técnico de ingeniería" (blueprint industrial)
   ========================================================================== */

:root {
  --navy-deepest: #050b13;
  --navy-deep: #081826;
  --navy: #0c2036;
  --navy-light: #113049;
  --blue: #1e78b0;
  --blue-bright: #3fa9dc;
  --blue-soft: #5fa3c9;
  --gold: #f2b53c;
  --gold-dim: #a9863f;
  --gold-soft: rgba(242, 181, 60, 0.35);
  --eco-green: #6fbf8b;
  --white: #eef4f8;
  --white-dim: #b7c7d4;
  --line-faint: rgba(95, 163, 201, 0.07);
  --line-soft: rgba(95, 163, 201, 0.14);

  --font-display: "Big Shoulders Display", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --radius-orbit: min(31vh, 330px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--navy-deepest);
  color: var(--white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------------------------------------------------------------- */
/* FONDO BLUEPRINT                                                    */
/* ---------------------------------------------------------------- */
.bp-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 120% 90% at 50% 8%, var(--navy-light) 0%, var(--navy) 42%, var(--navy-deep) 75%, var(--navy-deepest) 100%);
}
.bp-grid { position: absolute; inset: 0; opacity: .9; }
.bp-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 45%, transparent 40%, var(--navy-deepest) 100%);
  pointer-events: none;
}
.bp-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .35;
  pointer-events: none;
}
.bp-glow--gold { width: 40vw; height: 40vw; top: -10%; right: -8%; background: var(--gold); opacity: .12; }
.bp-glow--blue { width: 46vw; height: 46vw; bottom: -18%; left: -10%; background: var(--blue-bright); opacity: .16; }

/* ---------------------------------------------------------------- */
/* TOPBAR                                                             */
/* ---------------------------------------------------------------- */
.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(14px, 2.4vh, 26px) clamp(20px, 3.4vw, 52px) 0;
}

.brand { display: flex; align-items: center; gap: 16px; transition: opacity .25s ease; }
.brand:hover { opacity: .82; }
.brand-logo { height: clamp(38px, 5vh, 54px); width: auto; filter: drop-shadow(0 4px 18px rgba(0,0,0,.35)); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-tag {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(13px, 1.7vh, 18px);
  letter-spacing: .015em;
  color: var(--white);
}

.top-badges {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eco-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(17, 48, 73, 0.65);
  font-family: var(--font-mono);
  font-size: clamp(9.5px, 1vh, 11px);
  letter-spacing: .03em;
  color: var(--white-dim);
  white-space: nowrap;
}
.eco-badge__icon { width: 15px; height: 15px; color: var(--eco-green); flex-shrink: 0; }

.fair-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(17, 48, 73, 0.65);
  font-family: var(--font-mono);
  font-size: clamp(9.5px, 1vh, 11px);
  letter-spacing: .04em;
  white-space: nowrap;
}
.fair-badge__label { color: var(--white-dim); }
.fair-badge__name { color: var(--gold); font-weight: 600; }
.fair-badge__stand { color: var(--white); padding-left: 10px; border-left: 1px solid var(--line-soft); }
.fair-badge__stand b { color: var(--blue-bright); font-weight: 600; }

/* ---------------------------------------------------------------- */
/* ESCENARIO PRINCIPAL                                                */
/* ---------------------------------------------------------------- */
.stage {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.6vh, 30px);
  padding: 0 clamp(16px, 3vw, 40px);
  min-height: 0;
}

.stage-heading { text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.1vh, 12px);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin-bottom: 6px;
}
.eyebrow__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px 2px var(--gold-soft); }
.stage-heading h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 3.6vh, 40px);
  line-height: 1.02;
  letter-spacing: .01em;
  color: var(--white);
}
.stage-heading h1 span { color: var(--white-dim); font-weight: 500; }

/* ---------------------------------------------------------------- */
/* CÍRCULO DE PROCESO                                                 */
/* ---------------------------------------------------------------- */
.process-wrap {
  position: relative;
  width: min(70vw, 46vh, 480px);
  height: min(70vw, 46vh, 480px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.process-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orbit-track {
  fill: none;
  stroke: var(--line-soft);
  stroke-width: 1;
  stroke-dasharray: 2 8;
}
.orbit-progress {
  fill: none;
  stroke: var(--gold-dim);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 120 1960;
  transform-origin: 450px 450px;
  animation: orbit-pulse 7s linear infinite;
}
@keyframes orbit-pulse {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
#spokes line {
  stroke: var(--line-soft);
  stroke-width: 1;
  transition: stroke .4s ease, stroke-width .4s ease, opacity .4s ease;
}
#spokes line.active { stroke: var(--gold); stroke-width: 1.6; }

.hub {
  position: relative;
  width: clamp(64px, 8.5vh, 100px);
  height: clamp(64px, 8.5vh, 100px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 38% 32%, var(--navy-light), var(--navy) 60%, var(--navy-deep) 100%);
  box-shadow: 0 0 0 1px var(--line-soft), 0 0 40px rgba(63, 169, 220, .18), inset 0 0 24px rgba(0,0,0,.5);
  z-index: 3;
}
.hub__ring {
  position: absolute; inset: -14px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
}
.hub__ring--2 { inset: -28px; border-color: var(--line-faint); }
.hub__icon {
  width: 42%; height: 42%;
  color: var(--gold);
  filter: drop-shadow(0 0 6px rgba(242,181,60,.35));
}
.hub__readout {
  position: absolute;
  bottom: -34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-family: var(--font-mono);
}
.hub__temp { font-size: clamp(11px, 1.3vh, 14px); color: var(--blue-bright); letter-spacing: .03em; }
.hub__status { font-size: 8px; letter-spacing: .16em; color: var(--white-dim); }

/* ---- nodos ---- */
.nodes { position: absolute; inset: 0; }
.node {
  position: absolute;
  top: 50%; left: 50%;
  width: clamp(44px, 5.6vh, 64px);
  height: clamp(44px, 5.6vh, 64px);
  margin: calc(clamp(44px, 5.6vh, 64px) / -2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.node__hit {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, var(--navy-light), var(--navy) 70%);
  border: 1px solid var(--line-soft);
  color: var(--blue-soft);
  transition: border-color .35s ease, color .35s ease, box-shadow .35s ease, transform .35s ease, background .35s ease;
}
.node__hit svg { width: 46%; height: 46%; }
.node__num {
  position: absolute;
  top: -6px; right: -6px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--navy-deep);
  border: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--white-dim);
  display: flex; align-items: center; justify-content: center;
}
.node__label {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: clamp(9px, .95vh, 10.5px);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--white-dim);
  font-family: var(--font-mono);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}

.node:hover .node__hit,
.node.is-active .node__hit {
  border-color: var(--gold);
  color: var(--gold);
  background: linear-gradient(155deg, var(--navy-light), var(--navy-deep) 70%);
  box-shadow: 0 0 0 1px var(--gold-soft), 0 0 32px rgba(242,181,60,.35);
}
.node.is-active .node__num { border-color: var(--gold); color: var(--gold); }
.node:hover .node__label,
.node.is-active .node__label { opacity: 1; }

/* ---------------------------------------------------------------- */
/* CAPTION PANEL (info de la etapa activa, modo recorrido)            */
/* ---------------------------------------------------------------- */
.caption-panel {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  max-width: min(640px, 90vw);
  padding: clamp(12px, 1.6vh, 18px) clamp(16px, 2.2vw, 26px);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(8, 24, 38, .88);
  margin-top: clamp(4px, 1vh, 10px);
}
.caption-panel__num {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vh, 42px);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.caption-panel__body { flex: 1; min-width: 0; }
.caption-panel__eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin-bottom: 3px;
}
.caption-panel__body h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(15px, 2vh, 19px);
  letter-spacing: .01em;
  color: var(--white);
  margin-bottom: 3px;
}
.caption-panel__body p {
  font-size: clamp(11px, 1.25vh, 12.5px);
  color: var(--white-dim);
  line-height: 1.4;
  max-width: 60ch;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.caption-panel__cta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--navy-deepest);
  background: var(--gold);
  padding: 10px 16px;
  border-radius: 999px;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.caption-panel__cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(242,181,60,.3); }
.caption-panel__cta span { transition: transform .25s ease; }
.caption-panel__cta:hover span { transform: translateX(3px); }

/* ---------------------------------------------------------------- */
/* ESQUINA (botones flotantes) — se apoya justo encima del footer     */
/* ---------------------------------------------------------------- */
.corner {
  position: fixed;
  bottom: calc(var(--footer-h, 92px) + clamp(14px, 2vh, 22px));
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.corner--right { right: clamp(20px, 3.4vw, 52px); align-items: flex-end; }

.ghost-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: .03em;
  color: var(--white-dim);
  background: rgba(17, 48, 73, .3);
  transition: border-color .25s ease, color .25s ease, background .25s ease;
}
.ghost-btn svg { width: 15px; height: 15px; }
.ghost-btn:hover { border-color: var(--gold-soft); color: var(--gold); background: rgba(17, 48, 73, .55); }

/* ---------------------------------------------------------------- */
/* PROGRESS DOTS — también apoyados justo encima del footer           */
/* ---------------------------------------------------------------- */
.progress-dots {
  position: fixed;
  bottom: calc(var(--footer-h, 92px) + clamp(14px, 2vh, 22px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 7px;
}
.progress-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line-soft);
  transition: background .3s ease, transform .3s ease;
}
.progress-dots span.is-active { background: var(--gold); transform: scale(1.3); }

/* ---------------------------------------------------------------- */
/* FOOTER                                                              */
/* ---------------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px clamp(20px, 3.4vw, 52px) 10px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, transparent, rgba(5, 11, 19, .55));
}

.site-footer__main {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.site-footer__col {
  display: flex;
  gap: clamp(24px, 3vw, 48px);
}
.site-footer__col--address { flex-direction: column; gap: 2px; }
.site-footer__col--contact { flex-direction: row; }

.site-footer__group { display: flex; flex-direction: column; gap: 2px; }

.site-footer__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin-bottom: 3px;
}

.site-footer__col--address span,
.site-footer__col--contact a {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--white-dim);
  line-height: 1.55;
}
.site-footer__col--contact a:hover { color: var(--gold); }

.site-footer__credit {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .02em;
  color: rgba(183, 199, 212, .45);
  white-space: nowrap;
}
.site-footer__credit a {
  color: rgba(183, 199, 212, .7);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-footer__credit a:hover { color: var(--gold); }

/* ---------------------------------------------------------------- */
/* OVERLAYS / MODALES                                                 */
/* ---------------------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 48px);
  opacity: 0;
  pointer-events: none;
}
.overlay.is-open { pointer-events: auto; }
.overlay__scrim {
  position: absolute; inset: 0;
  background: rgba(3, 8, 14, .93);
}

.panel {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  max-height: min(680px, 88vh);
  display: grid;
  grid-template-columns: 300px 1fr;
  background: linear-gradient(160deg, var(--navy-light), var(--navy) 55%, var(--navy-deep));
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0,0,0,.5);
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.panel--team { grid-template-columns: 320px 1fr; }

.panel__close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 5;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white-dim);
  background: rgba(5,11,19,.4);
  border: 1px solid var(--line-soft);
  transition: color .2s ease, border-color .2s ease;
}
.panel__close:hover { color: var(--gold); border-color: var(--gold-soft); }

.panel__side {
  padding: clamp(28px, 4vw, 44px) clamp(24px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line-soft);
  overflow-y: auto;
}
.panel__num {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.panel__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin: 10px 0 6px;
}
.panel__side h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.08;
  color: var(--white);
  margin-bottom: 14px;
}
.panel__side p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--white-dim);
  flex: 1;
}
.panel__video-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy-deepest);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  width: fit-content;
  transition: transform .2s ease, box-shadow .2s ease;
}
.panel__video-btn[hidden] { display: none; }
.panel__video-btn svg { width: 16px; height: 16px; }
.panel__video-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(242,181,60,.3); }

.panel__gallery { position: relative; overflow: hidden; background: var(--navy-deepest); }
.panel__track { position: absolute; inset: 0; display: flex; height: 100%; }
.panel__track img {
  width: 100%; height: 100%;
  flex-shrink: 0;
  object-fit: cover;
}
.panel__nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(5,11,19,.5);
  border: 1px solid var(--line-soft);
  color: var(--white);
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, border-color .2s ease;
}
.panel__nav:hover { background: rgba(5,11,19,.8); border-color: var(--gold-soft); color: var(--gold); }
.panel__nav--prev { left: 16px; }
.panel__nav--next { right: 16px; }
.panel__dots {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px;
}
.panel__dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(238,244,248,.35);
  transition: background .25s ease, transform .25s ease;
}
.panel__dots span.is-active { background: var(--gold); transform: scale(1.3); }

.panel__team-grid {
  padding: clamp(24px, 3vw, 34px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  overflow-y: auto;
}
.panel__team-grid img {
  width: 100%; height: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
}

/* ---- video modal ---- */
.video-panel {
  position: relative;
  width: min(960px, 100%);
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  box-shadow: 0 40px 90px rgba(0,0,0,.55);
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.video-panel video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-fallback {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--white-dim);
  text-align: center;
  background: radial-gradient(ellipse at 50% 40%, var(--navy-light), var(--navy-deepest));
  pointer-events: none;
}
.video-fallback.is-visible { display: flex; }
.video-fallback svg { width: 52px; height: 52px; color: var(--gold); opacity: .8; }
.video-fallback p { font-size: 13px; line-height: 1.6; }
.video-fallback span { font-family: var(--font-mono); font-size: 11px; color: var(--blue-soft); }

/* ---------------------------------------------------------------- */
/* REVEAL DE ENTRADA                                                  */
/* ---------------------------------------------------------------- */
[data-reveal] { opacity: 0; }

/* ---------------------------------------------------------------- */
/* RESPONSIVE — pantallas angostas: se permite scroll controlado      */
/* ---------------------------------------------------------------- */
@media (max-width: 720px), (max-height: 620px) {
  html, body { overflow-y: auto; overflow-x: hidden; }

  /* En mobile solo queda: logo, el círculo (con sus modales/animaciones) y
     la línea de crédito del footer. Todo lo demás se oculta. */
  .brand-copy,
  .top-badges,
  .stage-heading,
  .caption-panel,
  .corner,
  .progress-dots,
  .site-footer__main {
    display: none;
  }

  .topbar { justify-content: center; padding-bottom: 6px; }
  .brand { gap: 0; }

  /* El círculo pasa a ser el protagonista de la pantalla: más grande */
  .stage { margin-top: 4px; padding-bottom: 8px; }
  .process-wrap { max-height: 62vh; }

  /* Modales de detalle/equipo/video: una sola columna */
  .panel, .panel--team { grid-template-columns: 1fr; max-height: 90vh; }
  .panel__side { border-right: none; border-bottom: 1px solid var(--line-soft); }
  .panel__gallery { min-height: 260px; }

  /* Footer: solo queda la línea de crédito, centrada */
  .site-footer { padding-top: 10px; }
  .site-footer__credit { white-space: normal; text-align: center; }
}
