/* Mario Ramos Systems — splash de arranque (WASM) compartido */
:root {
  --mr-boot-canvas: #faf7f4;
  --mr-boot-canvas-deep: #f0e8e2;
  --mr-boot-ink: #1a1816;
  --mr-boot-brand: #6b3a2a;
  --mr-boot-brand-light: #a8714f;
  --mr-boot-muted: #7a716a;
  --mr-boot-line: rgba(107, 58, 42, 0.22);
  --mr-boot-font-display: "Newsreader", "Georgia", "Times New Roman", serif;
  --mr-boot-font-ui: "Source Sans 3", "DM Sans", system-ui, sans-serif;
}

.mr-boot {
  --mr-boot-product: "MR Stock";
  position: fixed;
  inset: 0;
  z-index: 10000;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.5rem max(1.5rem, env(safe-area-inset-bottom));
  overflow: hidden;
  background: var(--mr-boot-canvas);
  color: var(--mr-boot-muted);
  font-family: var(--mr-boot-font-ui);
  -webkit-font-smoothing: antialiased;
}

.mr-boot--taller {
  --mr-boot-product: "MR Taller";
}

.mr-boot__backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(168, 113, 79, 0.14), transparent 55%),
    radial-gradient(ellipse 90% 60% at 100% 100%, rgba(107, 58, 42, 0.08), transparent 50%),
    linear-gradient(180deg, var(--mr-boot-canvas) 0%, var(--mr-boot-canvas-deep) 100%);
}

.mr-boot__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.mr-boot__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  max-width: 18rem;
  animation: mr-boot-enter 0.65s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.mr-boot__logo-wrap {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  margin-bottom: 1.25rem;
}

.mr-boot__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(107, 58, 42, 0.12));
  animation: mr-boot-logo-pulse 2.4s ease-in-out infinite;
}

.mr-boot__logo-ring {
  position: absolute;
  inset: -0.35rem;
  border-radius: 50%;
  border: 1px solid var(--mr-boot-line);
  animation: mr-boot-ring-breathe 2.4s ease-in-out infinite;
}

.mr-boot__brand {
  margin: 0;
  font-family: var(--mr-boot-font-display);
  font-size: 1.625rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--mr-boot-ink);
}

.mr-boot__product {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mr-boot-brand);
}

.mr-boot__product::before {
  content: var(--mr-boot-product);
}

.mr-boot__loader {
  position: relative;
  width: 3rem;
  height: 3rem;
  margin: 1.75rem auto 1.25rem;
}

.mr-boot__orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--mr-boot-brand);
  border-right-color: color-mix(in srgb, var(--mr-boot-brand-light) 55%, transparent);
  animation: mr-boot-spin 1.1s cubic-bezier(0.5, 0.1, 0.3, 1) infinite;
}

.mr-boot__orbit::before {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border-radius: 50%;
  border: 1px solid transparent;
  border-bottom-color: var(--mr-boot-brand-light);
  border-left-color: color-mix(in srgb, var(--mr-boot-brand) 40%, transparent);
  animation: mr-boot-spin-reverse 1.6s cubic-bezier(0.5, 0.1, 0.3, 1) infinite;
}

.mr-boot__gem {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.4rem;
  height: 0.4rem;
  margin: -0.2rem 0 0 -0.2rem;
  border-radius: 50%;
  background: var(--mr-boot-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mr-boot-brand) 18%, transparent);
  animation: mr-boot-gem 1.1s ease-in-out infinite;
}

.mr-boot__status {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mr-boot-muted);
}

.mr-boot__dots::after {
  content: "";
  display: inline-block;
  width: 1.25em;
  text-align: left;
  animation: mr-boot-dots 1.4s steps(4, end) infinite;
}

.mr-boot__house {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--mr-boot-line);
  width: 100%;
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--mr-boot-muted) 85%, var(--mr-boot-brand));
}

.mr-boot--out {
  animation: mr-boot-exit 0.32s cubic-bezier(0.4, 0, 1, 1) forwards;
  pointer-events: none;
}

@keyframes mr-boot-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes mr-boot-exit {
  to {
    opacity: 0;
    transform: scale(1.02);
  }
}

@keyframes mr-boot-logo-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes mr-boot-ring-breathe {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes mr-boot-spin {
  to { transform: rotate(360deg); }
}

@keyframes mr-boot-spin-reverse {
  to { transform: rotate(-360deg); }
}

@keyframes mr-boot-gem {
  0%, 100% { opacity: 0.55; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes mr-boot-dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

@media (prefers-reduced-motion: reduce) {
  .mr-boot__panel,
  .mr-boot__logo,
  .mr-boot__logo-ring,
  .mr-boot__orbit,
  .mr-boot__orbit::before,
  .mr-boot__gem,
  .mr-boot__dots::after {
    animation: none !important;
  }
  .mr-boot--out {
    animation-duration: 0.01ms;
  }
}
