/* ==========================================================================
   WEB EXPERIENCES
   ========================================================================== */

.web {
  padding: clamp(24px, 4vw, 56px) var(--gutter) clamp(80px, 11vw, 160px);
  overflow: hidden;
}
.web__head { margin-bottom: clamp(32px, 5vw, 72px); }
.web__head-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 14px;
}

.web__body {
  display: grid;
  gap: clamp(40px, 6vw, 80px);
}
@media (min-width: 1024px) {
  .web__body {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
  }
}

/* --------------------------------------------------------------------------
   ÍNDICE
   -------------------------------------------------------------------------- */
.web__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(14, 14, 14, .14);
}
@media (max-width: 1023px) { .web__list { order: 2; } }

.web__item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 12px;
  width: 100%;
  padding: clamp(16px, 2vw, 26px) 0;
  text-align: left;
  border-bottom: 1px solid rgba(14, 14, 14, .14);
  opacity: .35;
  transition: opacity .4s var(--ease-out);
}
.web__item.is-active,
.web__item:focus-visible { opacity: 1; }
.web__num { padding-top: .5em; }
.web__item.is-active .web__num { color: var(--accent); }
.web__name {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  text-transform: var(--display-transform);
  letter-spacing: var(--display-tracking);
  font-size: clamp(24px, 3.1vw, 50px);
  line-height: .95;
  transition: transform .5s var(--ease-out);
}
@media (hover: hover) {
  .web__item:hover .web__name { transform: translateX(10px); }
}
.web__meta { grid-column: 2; opacity: .7; }

/* --------------------------------------------------------------------------
   ESCRITORIO: ventana + celular
   -------------------------------------------------------------------------- */
.web__stage {
  position: relative;
  padding-bottom: 7%;
  padding-right: 7%;
  transition: opacity .25s;
}
.web__stage.is-switching .browser__view img,
.web__stage.is-switching .phone__screen img { opacity: 0; }

.browser {
  position: relative;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 30px 70px rgba(20, 16, 40, .16), 0 0 0 1px rgba(14, 14, 14, .08);
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 42px;
  padding: 0 10px 0 14px;
  background: #F1F0F4;
  border-bottom: 1px solid rgba(14, 14, 14, .08);
}
.browser__dots { display: flex; gap: 6px; }
.browser__dots i { width: 10px; height: 10px; border-radius: 50%; background: #D5D2DC; }
.browser__dots i:first-child { background: #FF5F57; }
.browser__dots i:nth-child(2) { background: #FEBC2E; }
.browser__dots i:nth-child(3) { background: #28C840; }
.browser__url {
  flex: 1;
  min-width: 0;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background: #fff;
  border-radius: 7px;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
}
.browser__live {
  padding: 7px 12px;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
  white-space: nowrap;
  transition: background-color .25s;
}
.browser__live:hover { background: var(--accent); }

.browser__view,
.phone__screen {
  position: relative;
  overflow: hidden;
  background: #0E0E0E;
}
.browser__view { aspect-ratio: 16 / 10; }
.browser__view img,
.phone__screen img {
  display: block;
  width: 100%;
  height: auto;
  will-change: transform;
  transition: opacity .3s;
}
.browser__view img.is-jump,
.phone__screen img.is-jump { transition: none; }

.phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 24%;
  padding: 2.2%;
  background: #0E0E0E;
  border-radius: 14% / 7%;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 30px 60px rgba(20, 16, 40, .3);
}
.phone__screen {
  aspect-ratio: 390 / 844;
  border-radius: 11% / 5.2%;
}
.phone__island {
  position: absolute;
  top: 4.2%;
  left: 50%;
  width: 30%;
  height: 3.2%;
  transform: translateX(-50%);
  background: #000;
  border-radius: 999px;
}

@media (max-width: 1023px) {
  .browser__live { padding: 6px 10px; }
  .browser__dots { display: none; }
}

/* --------------------------------------------------------------------------
   VISTA EN VIVO
   -------------------------------------------------------------------------- */
.live {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  opacity: 0;
  transition: opacity .35s var(--ease-out);
}
.live.is-open { opacity: 1; }
.live[hidden] { display: none; }
.live__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, .86);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
}
.live__bar {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
}
.live__name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live__devices { display: flex; border: 1px solid rgba(255,255,255,.22); }
.live__devices button { padding: 9px 14px; opacity: .6; }
.live__devices button.is-on { opacity: 1; background: #fff; color: var(--ink); }
.live__visit { padding: 9px 14px; border: 1px solid rgba(255,255,255,.22); white-space: nowrap; }
.live__visit:hover { background: var(--accent); border-color: var(--accent); }
@media (max-width: 700px) {
  .live__name { display: none; }
  .live__bar { justify-content: space-between; }
}

.live__frame {
  position: relative;
  flex: 1;
  width: min(1440px, calc(100% - 32px));
  margin-bottom: 16px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
  transition: width .5s var(--ease-out);
}
.live__frame[data-device="mobile"] {
  width: min(390px, calc(100% - 32px));
  max-height: 844px;
  border-radius: 28px;
  border: 8px solid #0E0E0E;
}
.live__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.live__scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
}
.live__scroll img { display: block; width: 100%; height: auto; }
.live__loading,
.live__note {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--ink);
  opacity: .6;
}
.live__note {
  top: auto;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 2;
  padding: 8px 12px;
  background: rgba(255,255,255,.9);
  border-radius: 6px;
  opacity: 1;
  white-space: nowrap;
}
