/* =========================================================
   VinzyCHosting — acceso, cuenta y cinemáticas
   ========================================================= */

/* ---------- Arranque: evita flash del sitio antes de saber si hay sesión ---------- */
html[data-auth="required"].auth-pending body {
  opacity: 0;
}

html[data-auth="required"].auth-pending {
  background: #07040e;
}

html[data-auth="required"].auth-pending::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 50% 46%, rgba(124, 58, 237, 0.24), transparent 72%),
    radial-gradient(50% 40% at 80% 90%, rgba(192, 132, 252, 0.1), transparent 75%);
}

html[data-auth="required"].auth-pending::after {
  content: "VinzyCHosting";
  position: fixed;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--violet-200);
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-shadow: 0 0 24px rgba(168, 85, 247, 0.65);
  animation: authBootPulse 1.15s ease-in-out infinite;
  pointer-events: none;
}

html.auth-reveal body {
  animation: none;
}

@keyframes authBootPulse {
  0%,
  100% {
    opacity: 0.4;
    letter-spacing: 0.18em;
  }
  50% {
    opacity: 1;
    letter-spacing: 0.23em;
  }
}

body.auth-locked,
body.auth-cinematic-open {
  overflow: hidden;
}

/* ---------- Gate de acceso ---------- */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 48px);
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(90% 65% at 50% 18%, rgba(76, 29, 149, 0.45), transparent 62%),
    radial-gradient(70% 60% at 85% 90%, rgba(124, 58, 237, 0.22), transparent 70%),
    rgba(5, 2, 12, 0.94);
  -webkit-backdrop-filter: blur(26px) saturate(125%);
  backdrop-filter: blur(26px) saturate(125%);
}

.auth-gate[hidden] {
  display: none;
}

.auth-gate.is-open {
  opacity: 1;
}

.auth-gate__aurora {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  overflow: hidden;
}

.auth-gate__aurora::before,
.auth-gate__aurora::after {
  content: "";
  position: absolute;
  width: 48vmax;
  height: 48vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}

.auth-gate__aurora::before {
  top: -12vmax;
  left: -8vmax;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.32), transparent 65%);
  animation: authAuroraDrift 16s ease-in-out infinite alternate;
}

.auth-gate__aurora::after {
  right: -10vmax;
  bottom: -16vmax;
  background: radial-gradient(circle, rgba(216, 180, 254, 0.18), transparent 65%);
  animation: authAuroraDrift 21s ease-in-out infinite alternate-reverse;
}

.auth-gate__grid {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -6%;
  height: 52%;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(168, 85, 247, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.13) 1px, transparent 1px);
  background-size: 52px 52px;
  transform: perspective(560px) rotateX(63deg);
  transform-origin: top center;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 28%, transparent 92%);
  mask-image: linear-gradient(180deg, transparent, #000 28%, transparent 92%);
  opacity: 0.65;
}

.auth-gate__portal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1050px, 132vmin);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.9;
}

.auth-gate__portal span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(192, 132, 252, 0.24);
  box-shadow:
    0 0 70px rgba(168, 85, 247, 0.14),
    inset 0 0 90px rgba(168, 85, 247, 0.1);
  animation: authPortalSpin 28s linear infinite;
}

.auth-gate__portal span:nth-child(2) {
  inset: 8%;
  border-style: dashed;
  border-color: rgba(216, 180, 254, 0.22);
  opacity: 0.65;
  animation-duration: 36s;
  animation-direction: reverse;
}

.auth-gate__portal span:nth-child(3) {
  inset: 19%;
  border-color: rgba(216, 180, 254, 0.1);
  animation-duration: 20s;
}

.auth-gate__portal span::before,
.auth-gate__portal span::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e9d5ff;
  box-shadow: 0 0 16px 4px rgba(216, 180, 254, 0.55);
}

.auth-gate__portal span::before {
  top: 7%;
  left: 26%;
}

.auth-gate__portal span::after {
  bottom: 12%;
  right: 22%;
}

.auth-card {
  position: relative;
  z-index: 2;
  width: min(446px, 100%);
  margin: auto;
  padding: clamp(26px, 4.4vw, 38px);
  overflow: hidden;
  border: 1px solid rgba(216, 180, 254, 0.19);
  border-radius: 30px;
  background:
    linear-gradient(155deg, rgba(38, 21, 68, 0.88), rgba(12, 6, 24, 0.94) 55%, rgba(24, 11, 45, 0.92));
  box-shadow:
    0 48px 130px -46px rgba(88, 28, 135, 0.95),
    0 18px 50px -30px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(26px) saturate(135%);
  backdrop-filter: blur(26px) saturate(135%);
}

.auth-gate.is-open .auth-card {
  animation: authCardIn 0.85s var(--ease) both;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(233, 213, 255, 0.75), transparent);
}

.auth-card__spectrum {
  position: absolute;
  top: -45%;
  left: 50%;
  width: 130%;
  height: 65%;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.24), transparent 62%);
  filter: blur(10px);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(20px, 3.4vw, 28px);
}

.auth-brand .brand__mark {
  width: 34px;
  height: 34px;
}

.auth-brand .brand__name {
  font-size: 1.04rem;
}

.auth-eyebrow {
  margin-bottom: 12px;
}

.auth-eyebrow .live-dot {
  width: 6px;
  height: 6px;
}

.auth-title {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.72rem, 4.6vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.06;
}

.auth-subtitle {
  margin: 0 0 22px;
  color: var(--ink-muted);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.6;
}

.auth-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 16px;
  padding: 10px 13px;
  border: 1px solid rgba(251, 113, 133, 0.32);
  border-radius: 12px;
  background: rgba(251, 113, 133, 0.09);
  color: #fecdd3;
  font-size: 0.78rem;
  line-height: 1.45;
}

.auth-notice::before {
  content: "!";
  flex: none;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(251, 113, 133, 0.24);
  font-size: 0.64rem;
  font-weight: 700;
}

.auth-notice--info {
  border-color: rgba(216, 180, 254, 0.28);
  background: rgba(168, 85, 247, 0.1);
  color: var(--violet-200);
}

.auth-notice--info::before {
  content: "i";
  background: rgba(168, 85, 247, 0.26);
}

.auth-notice--success {
  border-color: rgba(126, 240, 178, 0.3);
  background: rgba(126, 240, 178, 0.08);
  color: #bdf7d8;
}

.auth-notice--success::before {
  content: "✓";
  background: rgba(126, 240, 178, 0.2);
}

.auth-google {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f4efff);
  color: #1c1030;
  box-shadow:
    0 20px 44px -24px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 #fff;
  text-align: left;
  transition:
    transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease),
    opacity 0.2s ease;
}

.auth-google:hover {
  transform: translateY(-2px);
  box-shadow:
    0 26px 54px -22px rgba(168, 85, 247, 0.6),
    inset 0 1px 0 #fff;
}

.auth-google:active {
  transform: translateY(0);
}

.auth-google__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(28, 16, 48, 0.09);
}

.auth-google__icon svg {
  width: 21px;
  height: 21px;
}

.auth-google__copy {
  display: grid;
  flex: 1;
  gap: 1px;
  min-width: 0;
}

.auth-google__copy strong {
  color: #1c1030;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.auth-google__copy small {
  overflow: hidden;
  color: #6d5b88;
  font-size: 0.7rem;
  font-weight: 400;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.auth-google__arrow {
  flex: none;
  width: 17px;
  height: 17px;
  color: #6d5b88;
  transition: transform 0.25s var(--ease);
}

.auth-google:hover .auth-google__arrow {
  transform: translateX(2px);
}

.auth-google.is-offline {
  opacity: 0.72;
}

.auth-google.is-offline:hover {
  transform: none;
  box-shadow:
    0 20px 44px -24px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 #fff;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  color: var(--ink-muted);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.auth-input {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 5px 5px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: rgba(8, 4, 18, 0.62);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.auth-input:focus-within {
  border-color: rgba(192, 132, 252, 0.62);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.13);
}

.auth-input__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  color: var(--violet-300);
}

.auth-input__icon svg {
  width: 17px;
  height: 17px;
}

.auth-input input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font-size: 0.9rem;
}

.auth-input input::placeholder {
  color: var(--ink-muted);
}

.auth-submit {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--violet-500), var(--violet-700));
  color: #fff;
  box-shadow: 0 12px 26px -12px rgba(168, 85, 247, 0.95);
  transition:
    transform 0.2s var(--ease),
    filter 0.2s ease,
    opacity 0.2s ease;
}

.auth-submit svg {
  width: 19px;
  height: 19px;
}

.auth-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.auth-submit.is-loading svg {
  display: none;
}

.auth-submit.is-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin 0.7s linear infinite;
}

.auth-hint {
  margin-top: 9px;
  color: var(--ink-muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.auth-legal {
  margin-top: 20px;
  color: rgba(139, 127, 163, 0.78);
  font-size: 0.66rem;
  line-height: 1.6;
  text-align: center;
}

.auth-legal a {
  color: var(--violet-300);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
  color: rgba(139, 127, 163, 0.7);
  font-size: 0.63rem;
  letter-spacing: 0.04em;
}

.auth-trust svg {
  width: 12px;
  height: 12px;
  color: var(--violet-300);
}

.auth-demo.is-hidden {
  display: none;
}

/* ---------- Chip de cuenta ---------- */
.account-chip {
  position: relative;
  flex: none;
}

.account-chip__button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    transform 0.25s var(--ease);
}

.account-chip__button:hover {
  transform: translateY(-1px);
  border-color: rgba(216, 180, 254, 0.4);
  background: rgba(255, 255, 255, 0.07);
}

.account-chip__button[aria-expanded="true"] {
  border-color: rgba(192, 132, 252, 0.55);
  background: rgba(168, 85, 247, 0.12);
}

.account-avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 33px;
  height: 33px;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.22), transparent 45%),
    linear-gradient(135deg, var(--violet-400), var(--violet-700));
  color: #f8f4ff;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow:
    0 0 0 2px rgba(8, 4, 17, 0.65),
    0 0 18px rgba(168, 85, 247, 0.4);
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-chip__copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  text-align: left;
  line-height: 1.15;
}

.account-chip__copy small {
  color: var(--ink-muted);
  font-family: var(--font-pixel);
  font-size: 0.44rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-chip__copy strong {
  max-width: 112px;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.account-chip__chevron {
  flex: none;
  width: 13px;
  height: 13px;
  color: var(--ink-muted);
  transition: transform 0.25s var(--ease);
}

.account-chip__button[aria-expanded="true"] .account-chip__chevron {
  transform: rotate(180deg);
}

.account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 95;
  width: min(286px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  background:
    linear-gradient(160deg, rgba(30, 17, 56, 0.98), rgba(10, 5, 21, 0.98));
  box-shadow:
    0 34px 80px -32px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-7px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity 0.22s ease,
    transform 0.25s var(--ease),
    visibility 0.22s;
}

.account-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.account-menu__head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 7px 10px;
  min-width: 0;
}

.account-menu__head .account-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 0.86rem;
}

.account-menu__head div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-menu__head strong {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.account-menu__head span {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 0.7rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.account-menu__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 7px 8px;
  padding: 4px 9px;
  border: 1px solid rgba(216, 180, 254, 0.18);
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.09);
  color: var(--violet-300);
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.account-menu__badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.account-menu__divider {
  height: 1px;
  margin: 2px 7px 8px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.account-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 11px;
  background: none;
  color: var(--ink-soft);
  font-size: 0.79rem;
  font-weight: 400;
  text-align: left;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.account-menu__item svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--violet-300);
}

.account-menu__item:hover {
  background: rgba(168, 85, 247, 0.11);
  color: var(--ink);
}

.account-menu__item--danger {
  color: #fda4af;
}

.account-menu__item--danger svg {
  color: #fb7185;
}

.account-menu__item--danger:hover {
  background: rgba(251, 113, 133, 0.1);
  color: #fecdd3;
}

/* Ajustes del header del checkout */
.checkout-header__meta .account-chip {
  margin-right: 2px;
}

/* ---------- Cinemática ---------- */
.auth-cinematic {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(58% 58% at 50% 50%, rgba(47, 18, 84, 0.92), transparent 75%),
    #040109;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.auth-cinematic[hidden] {
  display: none;
}

.auth-cinematic.is-active {
  opacity: 1;
  pointer-events: auto;
}

.auth-cinematic.is-leaving {
  opacity: 0;
}

.auth-cinematic__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.auth-cine__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(720px, 90vmin);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.26), transparent 62%);
  filter: blur(24px);
  animation: authCineGlow 2.6s ease-in-out infinite alternate;
}

.auth-cine__rings {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(620px, 82vmin);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.auth-cine__rings i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(216, 180, 254, 0.26);
  border-radius: 50%;
  box-shadow: 0 0 44px rgba(168, 85, 247, 0.2);
  transform: scale(0.4) rotate(0deg);
  opacity: 0;
  animation: authCineRing 2.8s var(--ease) infinite;
}

.auth-cine__rings i:nth-child(2) {
  border-style: dashed;
  border-color: rgba(192, 132, 252, 0.32);
  animation-delay: 0.45s;
  animation-duration: 3.4s;
}

.auth-cine__rings i:nth-child(3) {
  border-color: rgba(233, 213, 255, 0.14);
  animation-delay: 0.9s;
  animation-duration: 2.5s;
}

.auth-cine__copy {
  position: relative;
  z-index: 2;
  width: min(620px, 100%);
  padding: 26px;
  text-align: center;
}

.auth-cine__signal {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px;
  border: 1px solid rgba(216, 180, 254, 0.22);
  border-radius: 999px;
  background: rgba(13, 6, 26, 0.55);
  color: var(--violet-200);
  font-family: var(--font-pixel);
  font-size: 0.53rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.5s ease,
    transform 0.5s var(--ease);
}

.auth-cine__avatar {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 24px auto 20px;
  overflow: hidden;
  border: 1px solid rgba(233, 213, 255, 0.28);
  border-radius: 30px;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.24), transparent 46%),
    linear-gradient(135deg, rgba(192, 132, 252, 0.95), rgba(91, 33, 182, 0.95));
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  box-shadow:
    0 0 0 8px rgba(168, 85, 247, 0.08),
    0 0 60px rgba(168, 85, 247, 0.45);
  opacity: 0;
  transform: translateY(16px) scale(0.85);
  transition:
    opacity 0.55s ease,
    transform 0.65s var(--ease);
}

.auth-cine__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-cine__title {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.02;
  text-wrap: balance;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.55s ease 0.08s,
    transform 0.6s var(--ease) 0.08s;
}

.auth-cine__title .text-gradient {
  white-space: nowrap;
}

.auth-cine__sub {
  max-width: 430px;
  margin: 16px auto 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.55s ease 0.16s,
    transform 0.6s var(--ease) 0.16s;
}

.auth-cinematic.is-visible .auth-cine__signal,
.auth-cinematic.is-visible .auth-cine__avatar,
.auth-cinematic.is-visible .auth-cine__title,
.auth-cinematic.is-visible .auth-cine__sub {
  opacity: 1;
  transform: none;
}

.auth-cine__meter {
  width: min(250px, 64%);
  height: 3px;
  margin: 24px auto 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.auth-cinematic.is-visible .auth-cine__meter {
  opacity: 1;
}

.auth-cine__meter span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet-500), var(--violet-300), #f0abfc);
  transform: scaleX(0);
  transform-origin: left;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.8);
}

.auth-cinematic.is-visible .auth-cine__meter span {
  animation: authCineMeter 2.4s var(--ease) both;
}

.auth-cine__flash {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.98), rgba(216, 180, 254, 0.45) 34%, transparent 68%);
}

.auth-cinematic.is-flash .auth-cine__flash {
  animation: authCineFlash 0.85s ease-out both;
}

.auth-cinematic[data-mode="logout"] .auth-cine__glow {
  background: radial-gradient(circle, rgba(91, 33, 182, 0.3), transparent 62%);
}

.auth-cinematic[data-mode="logout"] .auth-cine__rings i {
  animation-direction: reverse;
}

@keyframes authAuroraDrift {
  from {
    transform: translate3d(-3%, -2%, 0) scale(1);
  }
  to {
    transform: translate3d(4%, 3%, 0) scale(1.12);
  }
}

@keyframes authPortalSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes authCardIn {
  from {
    transform: translateY(22px) scale(0.97);
  }
  to {
    transform: none;
  }
}

@keyframes authSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes authCineRing {
  0% {
    opacity: 0;
    transform: scale(0.32) rotate(0deg);
  }
  24% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: scale(1.12) rotate(70deg);
  }
}

@keyframes authCineGlow {
  from {
    opacity: 0.65;
    transform: translate(-50%, -50%) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.06);
  }
}

@keyframes authCineMeter {
  0% {
    transform: scaleX(0);
  }
  72% {
    transform: scaleX(0.82);
  }
  100% {
    transform: scaleX(1);
  }
}

@keyframes authCineFlash {
  0% {
    opacity: 0;
  }
  18% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .site-header .account-chip {
    margin-left: auto;
  }

  .site-header .menu-toggle {
    margin-left: 10px;
  }

  .site-header .account-menu {
    right: -52px;
  }
}

@media (max-width: 720px) {
  .checkout-header .account-chip__copy {
    display: none;
  }

  .checkout-header .account-chip__button {
    padding-right: 4px;
  }

  .checkout-header .account-chip__chevron {
    display: none;
  }
}

@media (max-width: 600px) {
  .auth-gate {
    padding: 16px;
    align-items: flex-start;
  }

  .auth-card {
    margin-block: auto;
    border-radius: 26px;
  }

  .auth-title {
    font-size: 1.7rem;
  }

  .site-header .account-chip__copy {
    display: none;
  }

  .site-header .account-chip__button {
    padding-right: 4px;
  }

  .site-header .account-chip__chevron {
    display: none;
  }

  .auth-cine__avatar {
    width: 82px;
    height: 82px;
    border-radius: 26px;
    font-size: 1.65rem;
  }

  .auth-cine__title {
    font-size: clamp(1.85rem, 8.6vw, 2.6rem);
  }
}

@media (max-height: 620px) {
  .auth-brand {
    margin-bottom: 16px;
  }

  .auth-subtitle {
    margin-bottom: 16px;
  }

  .auth-divider {
    margin-block: 15px 11px;
  }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html[data-auth="required"].auth-pending::after {
    animation: none;
    opacity: 0.85;
  }

  html.auth-reveal body {
    animation: none;
  }

  .auth-gate,
  .auth-card,
  .auth-gate__aurora::before,
  .auth-gate__aurora::after,
  .auth-gate__portal span,
  .auth-cine__rings i,
  .auth-cine__glow,
  .auth-cinematic.is-visible .auth-cine__meter span {
    animation: none !important;
  }

  .auth-gate.is-open .auth-card {
    animation: none;
  }

  .auth-gate__portal span {
    opacity: 0.5;
  }

  .auth-cinematic,
  .auth-cine__signal,
  .auth-cine__avatar,
  .auth-cine__title,
  .auth-cine__sub,
  .account-menu,
  .auth-google {
    transition-duration: 0.01ms !important;
  }

  .auth-cine__meter span {
    transform: scaleX(1);
  }
}
