body[data-page="probar"] {
  /* Estilos propios de la página donde vive la demo web. */
  background: var(--paper);
}

body[data-page="probar"] .site-header {
  position: static;
}

.try-hero {
  width: 100%;
  max-width: none;
  min-height: auto;
  padding-left: max(18px, calc((100% - var(--max)) / 2));
  padding-right: max(18px, calc((100% - var(--max)) / 2));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
  gap: 34px;
  align-items: center;
  color: var(--black);
  background:
    linear-gradient(115deg, rgba(246, 196, 0, 0.1), transparent 34%),
    #ffffff;
  border-bottom: 1px solid rgba(6, 6, 6, 0.08);
}

.try-hero p:not(.kicker) {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted-dark);
  font-size: 18px;
}

.try-hero .reveal {
  display: grid;
  align-content: start;
}

.try-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.demo-panel {
  padding: 24px;
  color: var(--white);
  background: #0f0f0f;
  border: 1px solid rgba(246, 196, 0, 0.36);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.demo-panel span {
  display: block;
  margin-bottom: 18px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.demo-panel strong {
  display: block;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.demo-panel p {
  margin: 20px 0;
  color: var(--muted);
}

.app-demo-section {
  scroll-margin-top: 24px;
  padding-bottom: 28px;
}

.app-demo-header {
  margin-bottom: 16px;
  display: block;
}

.app-demo-header > div {
  max-width: none;
}

.app-demo-header h2 {
  margin: 0;
  font-size: var(--display-h2);
}

.app-frame-shell {
  --app-native-width: 430px;
  --app-native-height: 760px;
  --app-fit-scale: 1;
  --app-max-scale: 1;
  --app-min-scale: 0.55;
  --app-viewport-width: 430px;
  --app-viewport-height: 760px;
  position: relative;
  min-height: 0;
  padding: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #101010;
  border: 1px solid rgba(6, 6, 6, 0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.app-frame-shell::before {
  content: "Cargando Metalink...";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--yellow);
  font-weight: 950;
  background: #101010;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.app-frame-shell.is-loaded::before {
  opacity: 0;
  pointer-events: none;
}

.app-frame-shell.is-demo-slow::before {
  content: "Conectando Metalink...";
}

.app-frame-shell.has-demo-error::before {
  content: "No se pudo cargar Metalink.";
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(246, 196, 0, 0.18), transparent 42%),
    #101010;
}

.app-frame-viewport {
  position: relative;
  z-index: 1;
  width: min(100%, var(--app-viewport-width));
  height: var(--app-viewport-height);
  max-width: 100%;
  max-height: calc(100vh - 150px);
  margin: 0 auto;
  overflow: hidden;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.metalink-app-frame {
  width: var(--app-native-width);
  height: var(--app-native-height);
  display: block;
  transform: scale(var(--app-fit-scale));
  transform-origin: left top;
  background: #ffffff;
  border: 0;
}

body[data-page="app"] {
  background: #101010;
}

.standalone-app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #101010;
}

.app-shell-toolbar {
  position: static;
  min-height: 78px;
  padding: 10px max(18px, calc((100% - var(--max)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(6, 6, 6, 0.12);
}

.app-shell-toolbar .brand {
  margin-right: 0;
}

.app-frame-standalone {
  height: calc(100vh - 78px);
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.app-frame-standalone .app-frame-viewport {
  max-height: calc(100vh - 118px);
}

.launch-grid {
  padding-top: 28px;
  /* Pasos de preparación antes del lanzamiento móvil. */
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.launch-grid article {
  min-height: 172px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
}

.launch-grid span {
  display: block;
  margin-bottom: 12px;
  color: var(--yellow-dark);
  font-weight: 950;
}

.launch-grid strong {
  display: block;
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.1;
}

.launch-grid p {
  color: var(--muted-dark);
}

@media (max-width: 860px) {
  .try-hero,
  .launch-grid {
    grid-template-columns: 1fr;
  }

  .try-hero {
    min-height: auto;
  }

  .app-demo-header {
    align-items: stretch;
    flex-direction: column;
  }

  .app-demo-header .btn {
    width: 100%;
  }

  .app-frame-shell {
    padding: 12px;
  }

  .app-frame-viewport,
  .app-frame-standalone .app-frame-viewport {
    max-height: calc(100vh - 126px);
  }

  .app-shell-toolbar {
    min-height: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell-toolbar .brand {
    justify-content: center;
  }

  .app-frame-standalone {
    height: calc(100vh - 134px);
  }
}
